iOS app never connects the core to the network

I always have to use the terminal to connect to the core. The app gives up at home and at work. Actually I would like to understand what is happening here. How does the app send the data to the core? Is it using Bluetooth low energy? Perhaps if this was explained I would be able to troubleshoot better.

Hi @pixelboy

When the core powers up and is put into flashing blue listening mode, it is listening for a special WiFi packet that tells it the SSID and password, which are sent encrypted. The core does not have any bluetooth connections; it all happens over WiFi even though the core does not have the SSID and password yet. It is really quite clever.

So the phone or device with the app needs to be on the network you intend to connect the core to.

The technical details can be found here:

Interesting. I will read furtherā€¦ it does seem magical. Is there any way to troubleshoot this? I can understand at work why there may be problems there a hundred networks but at home Iā€™m not sure why itā€™s not working. Is the hardware broken?

@pixelboy,

did you get past the listening mode (blinking blue) stage?

If you managed to get the core to blink green, it means that the router was able to communicate with the :spark: core :wink:

Otherwise, it might be the Iphone being on a higher frequency of 5 GHz Radio Mode.

Post back once you have more updates!

Right, agreed, @pixelboy you say ā€œthe app gives upā€ ā€” if you tell us the exact sequence of LED colors you see that will be especially helpful. A couple helpful tips:

  • The Core must be in blinking blue (not cyan) ā€œlisteningā€ mode to receive the Smart Config signal
  • As @kennethlimcp says, the Core can only listen on 2.4GHz, so if your router and all devices are at 5GHz, you may have to do something to force the router to fallback.
  • Is your Core stuck at flashing green or breathing cyan? Flashing green means it couldnā€™t get on Wi-Fi. Breathing cyan means itā€™s connected to Wi-Fi and the :spark: Cloud despite any error message the iOS app gives.
  • If the Core is breathing cyan and the iOS app gives an error, the problem may be less about Wi-Fi credentials and more about claiming the Core.

Looking forward to hearing more info!

Good to know about the 5g connection.

This is what I experience:

  • Open app the correct ssid is shown
  • Enter password
  • Waitā€¦ blue light flashes
  • App eventually says it canā€™t connect
  • I connect with USB using screen and it works like a charm. This is the same network info I attempted through the app.

More info:

  • iPhone 5
  • Apple Airport extreme WPA2

Question:

  • If Iā€™ve loaded a sketch on the device would this interfere with joining a new network?
  • Can I script the screen connection?

Hey @pixelboy. It can be hard to say exactly why SmartConfig is failing, but I'm glad that setup over USB is working for you. In our experience, SmartConfig can fail in the following cases:

  • The router is set to 5GHz mode
  • The network is configured as an enterprise network
  • The network is configured as an 802.11n or ac network without legacy support

You can find some more information about failure conditions for SmartConfig in this thread:

Ultimately lots of the issues with SmartConfig are rooted in hard limitations of the CC3000, and aren't "fixable" until we have a chance to redesign the Core.

Hope that helps!

1 Like

I Donā€™t understand any of this! I canā€™t get my Iphone 5s Spark App to connect, the core is plugged into by USB on my Mac and breathing, but thatā€™s all. The documentation gives the following instructions:
First, make sure you have node.js installed!

Next, open a command prompt or terminal, and install by typing:

$ npm install -g spark-cli
$ spark cloud login

Now Iā€™m ignorant in capitals IGNORANT! What program do I open a terminal? CoolTerm? It no longeer sees the spark on the USB, I presume because itā€™s on the WIFI now. So how do I claim it?What program and what steps. And yes I installed node.js on my Mac, but I canā€™t find it either. I really jjust want to give up and return this, as I donā€™t understand even simple instructions.

Once you have it connected to the network the spark is awesome and pretty easy to use. I had the same problem as you the auto config didnā€™t work. You have to use the terminal to get your spark connected. The terminal is a text based way of running programs. You can find the terminal in Applications/Utilities. Once you have it open do the following:

ls /dev/

This will list a bunch of stuff. Look for something that looks like this

cu.usbmoden1411

Yours will likely have a different number. Copy the one that you find and enter the line below (using the the name you found above)

screen /dev/cu.usbmodem1411 9600

If you have done this right the spark core will ask you a series of questions answer them and your core will connect. Note I donā€™t think the spark can connect to 5g networks.

I will point out it is very handy to have command line skills if youā€™re working with devices like Arduino and Spark.

1 Like

Hi @BILLG,

You can open a Terminal on the Mac by literally running the ā€œTerminalā€ program, itā€™s under Applications -> Utilities -> Terminal. Hereā€™s a guide on the Mac OS X Terminal - http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line

Make sure you install Node.js first, click the ā€œINSTALLā€ button here ( http://nodejs.org/ ), and follow those steps. Then run those commands you mentioned in the ā€œTerminalā€ application.

You can put your core back into Serial mode by holding the MODE button on the core until it starts flashing solid blue. Then you can type spark identify, if you email us that core id at hello@spark.io, we can help get you back on track.

Thanks!
David

Iā€™ve already got the core on to Wifi, but canā€™t claim it. Iā€™m trying to follow those instructions. When I open the Apple Terminal app and type the first line of what the CLI documentation says to do I get this screen
NOSs-MacBook-Air-5:~ nosveemos2$
NOSs-MacBook-Air-5:~ nosveemos2$ $
-bash: $: command not found
NOSs-MacBook-Air-5:~ nosveemos2$ npm install -g spark-cii
npm ERR! 404 404 Not Found: spark-cii
npm ERR! 404
npm ERR! 404 ā€˜spark-ciiā€™ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 14.0.0
npm ERR! command ā€œnodeā€ ā€œ/usr/local/bin/npmā€ ā€œinstallā€ ā€œ-gā€ "spark-cii"
npm ERR! cwd /Users/nosveemos2
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/nosveemos2/npm-debug.log
npm ERR! not ok code 0
NOSs-MacBook-Air-5:~ nosveemos2$
Please note that Iā€™ve installed Node on the MAC but I canā€™t see it as an app. I donā€™t know what Iā€™m doing and thereā€™s no meaniingful guidance I can find. This is beyond irritating, itā€™s designed to show off how smart you all are and how stupid I am.

you typed spark-CIIIIIIIIIIIIIIIIIIIIIIIII

It should be spark-cliā€¦ :wink:

Thank you your post make some sense here. I have the core connected to my Wifi and it breathes. However, my Iphone 5s when connected to SAME networkd wonā€™t log in. And I canā€™t claim the core for reasons well-beyond me. Iā€™ve tried to follow the instructions in the Spark CLI. When I open the terminal app on the mac (and how on earth does it know where the core is?) (and I have installed node.js on the mac) I get this:
NOSs-MacBook-Air-5:~ nosveemos2$
NOSs-MacBook-Air-5:~ nosveemos2$ $
-bash: $: command not found
NOSs-MacBook-Air-5:~ nosveemos2$ npm install -g spark-cii
npm ERR! 404 404 Not Found: spark-cii
npm ERR! 404
npm ERR! 404 ā€˜spark-ciiā€™ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 14.0.0
npm ERR! command ā€œnodeā€ ā€œ/usr/local/bin/npmā€ ā€œinstallā€ ā€œ-gā€ "spark-cii"
npm ERR! cwd /Users/nosveemos2
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/nosveemos2/npm-debug.log
npm ERR! not ok code 0
NOSs-MacBook-Air-5:~ nosveemos2$

Iā€™m totally befuddled and hate punching in the dark like this. Thank you for your help

No I typed it correctly. And now I copied it and pasted it like this "NOSs-MacBook-Air-5:~ nosveemos2$
NOSs-MacBook-Air-5:~ nosveemos2$ $ npm install -g spark-cli
-bash: $: command not found
NOSs-MacBook-Air-5:~ nosveemos2$ $ npm install -g spark-cli
-bash: $: command not found
NOSs-MacBook-Air-5:~ nosveemos2$ "

and thatā€™s what I get

I also tried this
NOSs-MacBook-Air-5:~ nosveemos2$ is /dev/
-bash: is: command not found
NOSs-MacBook-Air-5:~ nosveemos2$ Is /dev/
-bash: Is: command not found
NOSs-MacBook-Air-5:~ nosveemos2$

DISREGARD ALL ABOVE: I resent the core with mode button and this time was able to sign-in from Iphone, acquire the credentialls as indicated by LED, and I assume CLAIM, as the app on the phone move to Tinker. Iā€™ve no idea what I did different. THANK YOU for your help, I assume Iā€™ll stumble again shortly. But first I go run itā€™s last light here and I need to sweat out the fustration. Thanks again.

Hi @BILLG,

Awesome, glad you got it working! Please feel free to keep asking questions here, all skill levels are represented, and all questions are welcome. :slight_smile:

When you were typing commands earlier, I think you were getting stuck on typing the$ symbol. That tutorial I posted mentioned that, but the $ is just there to remind you itā€™s on a command line, and isnā€™t something you need to type. Weā€™re happy to help you use the Spark command line interface (spark-cli) as well, and any documentation feedback is also helpful.

Thanks!
David

1 Like

I thought I had made progress: The Core is connected and breathing, and for a few moments this morning the APP on IOS was fine. Running on my iphone5s Iā€™d gotten to tinker, while trying to do the first exrercise the Iphone disconnected from the wifi network. Now I canā€™t Login on the Iphone to Spark and seemingly back to square two. Iā€™ve logged into the same account on Macā€™s browser window and hereā€™s coreā€™s id 55ff69065075555343131787
What do I need to do to get this to work reliably?

What 1st excercise?

Tinker App for mobile only works when the tinker firmware is running on the :spark: core.

Also, Wifi connection on the same network for the core and your phone is only required during sending of Wifi Credentials.

You can reach the core via API once it is connected to internet and does not require you to be on a same Wifi network as the core

2 Likes