Use CC3000 Smart Config to auto-magically set wifi SSID and

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
georgehawkins
 
Posts: 23
Joined: Wed Jun 12, 2013 12:12 pm

Use CC3000 Smart Config to auto-magically set wifi SSID and

Post by georgehawkins »

Adafruit are selling the CC3000 as a cool little Arduino friendly wifi module.

But they're not making a big deal in their product description or tutorial about what many people find the most exciting feature of the CC3000.

This is the ability to tell the CC3000 your network name and password without having to hardcode it in your Arduino code.

This has been a big problem for Internet of Things enthusiasts: you ship a small wifi enabled embedded device to an end user, it doesn't come with a screen or keyboard so how does the end user tell it the name and password for their wifi network?

TI think they've cracked it with the CC3000. You install a simple little app on your smartphone or desktop and you enter your network name and password into the app and it then auto-magically transmits these details to the CC3000 enabled device.

TI call this technology Smart Config.

Note: other people have come up with completely different solutions to this problem , e.g. Electric Imp use what they call BlinkUp - where an application running on a smartphone flashes its screen to pass the data optically to the device.

Adafruit have included a sketch that demonstrates Smart Config in their CC3000 repository.

You've probably already downloaded this if you've worked through the library section of their CC3000 tutorial.

They don't cover the Smart Config sketch in the tutorial but you can find it in the "examples/smartconfigtest" subdirectory of their library.

If you upload this sketch to your Arduino and look at its output on the serial console, you'll see it going through some initial setup and then you'll see:

Code: Select all

Waiting for SmartConfig connection (~60s) ...
This means it's waiting for you to send your network name and password via a Smart Config app.

I've written a blog post covering where you can get a Smart Config app for iOS, Android, Mac OS X, Windows and Linux here.

Smart Config isn't perfect yet and this may be why Adafruit aren't making a big deal about it. In particular the TI Java library used for Mac OS X, Windows and Linux doesn't work under some circumstances if the machine you're running it on is connected to your wifi access point using 802.11n - this is covered in more detail in my blog post.

TI have provided ok Smart Config apps for iOS and Android, but their implementation for desktop OSes was a rather unsatisfactory Java applet.

I've developed a more normal stand alone application and I'd be interested in your feedback.

Image

It's now ready - above you can see how it looks on Mac OS X, Windows 8 and Ubuntu 12.04. You can find all the details here:

http://depletionregion.blogspot.ch/2013 ... lient.html

I'd really appreciate any feedback on how you get along using either the ready to go binary distribution or compiling things up yourself and running from source.

Before people get too excited only the UI is open source, it still depends on a closed source library from TI.

I've also put together blog posts on: The second of these two posts is needed as (already noted above) the desktop Smart Config setup client may not work if run from a machine that is connected to the AP using 802.11n (rather than b or g).

I apologize in advance for my TL;DR style - the DNS-SD/mDNS related post in particular is way too long for what it covers.

Again any feedback is really very much appreciated,

/George

User avatar
vicatcu
 
Posts: 29
Joined: Sat Oct 01, 2011 9:35 pm

Re: Use CC3000 Smart Config to auto-magically set wifi SSID

Post by vicatcu »

@georgehawkins... this is great! The only thing is, while it works in delivering / storing the network profile on the device, there's no feedback apparently reaching the application so the phone app / desktop java program never depicts the process is complete. Is that inherent to the protocol, or is it a problem related to cc3000 firmware version.

User avatar
georgehawkins
 
Posts: 23
Joined: Wed Jun 12, 2013 12:12 pm

Re: Use CC3000 Smart Config to auto-magically set wifi SSID

Post by georgehawkins »

Sorry for being slow in responding.

When the CC3000 connects to the network it should announce its presence using mDNS.

TI claim some kind of DNS-SD compatibility but actually what they do isn't DNS-SD compliant at all.

I write about this here: http://depletionregion.blogspot.ch/2013 ... twork.html

Anyway in short when your device connects to the network the Adafruit driver tells the CC3000 to send a UDP packet with the device name (and various other bits of information) to the multicast address 224.0.0.251 port 5353.

It's this packet that the GUI looks out for - if it never sees it then it will never know that the process completed successfully.

And this is where the problem is - the Adafruit driver is doing the right thing but that the CC3000 firmware often fails to send the packet.

I've seen this many times and I've mentioned it on the TI mailing lists:

http://e2e.ti.com/support/low_power_rf/ ... 90584.aspx

Note: HCI_CMND_MDNS_ADVERTISE is what the driver uses internally when telling the CC3000 to send the UDP packet.

TI say they'll investigate - we'll see.

Good luck working with the CC3000 - I'm in two minds about it - in many ways it's a great little device but it's certainly not issue free.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”