App doesn't connect, USB connection refused - SOLVED

I'm on MacBook Air with iPad Mini and Nexus 6... had some issues getting connected and registering, here's how they were resolved:

Problem:
Cores arrived, apps installed (on iPad and Nexus) - using the apps, managed to get 'breathing cyan,' but both apps kept saying 'No Cores found' and CoolTerm would connect but commands wouldn't result in response - or the CoolTerm connection would be refused. Without a connection (or working app), no way to know core id's and no way to register cores on the web IDE.

Solution:
Spoke with Zach from Spark and he suggested the following fix, which worked:

Use 'screen' in the terminal to scan for and connect to the Core.

First, get a list of usb devices:

sudo ls /dev/tty.u*

My output was:

/dev/tty.usbmodemfd121

Then use screen to connect to that device:

sudo screen /dev/tty.usbmodemfd121

Once in, press 'i' for your core id or 'w' to enter network credentials and connect to your wireless network.

With core id in hand I was able to then go over to the web IDE (https://www.spark.io/) and register my core.

Hope that helps anyone who runs into a similar problem.

I know that I had some issues getting started with Coolterm. One thing that was a little confusing was getting the serial port right. First, you go to the Connection menu and select Options. It should default to the Serial Port selection on the left. In the Port dropdown, look for ā€œusbmodemā€ with other characters after it (itā€™s not the same for every Core). Sometimes, it will keep old ports in the dropdown, so you may want to click the ā€œRe-Scan Serial Portsā€ button. If youā€™ve been able to select the usbmodem option, click OK. Then you click the Connect icon just above the white box. Once connected, you may not get any sort of prompt, so you can just type the ā€œiā€ or ā€œwā€ to get to where you want to go.

I know Iā€™ve had some sporadic difficulties getting my Cores connection with the iOS app on my phone, so Iā€™ve become familiar with the process using Coolterm. It also seems that Coolterm will only be able to connect when the Core is in the wifi discovery (blinking blue) mode.

I hope those extra bits can also help!

1 Like

With Coolterm I was able to sometimes get a connection, sometimes not. Could see the USB device just fineā€¦ the issue was, once connected, the device would ignore any commands sent to it (ā€œiā€ or ā€œwā€). After ā€˜sudo screenā€™ worked, my assumption is that, by default, on my laptop, USB ports arenā€™t accessible to non-root users. Just trying to connect with ā€˜screenā€™ (no sudo) didnā€™t work. Coolterm didnā€™t workā€¦ seems like a permissions problem?

I know on Ubuntu, when I was setting up another microcontroller device over USB, I had to run a script (at system startup) to permanently change permissions on the USB port in order to make it so I could connect whenever I wanted without using sudo. Iā€™d guess the same is needed on my laptop?

1 Like

I was able to run both Coolterm and screen without sudoā€™ing. I donā€™t remember doing anything to modify /dev/tty.* permissions, but Iā€™ve moved, had a newborn, and slept in the last year. Iā€™m also using a MacBook Pro Retina running 10.9. Not sure if that helps or not!

These commands doesnā€™t work in MacOSX.