How to set WiFi data for customers using embedded spark.core

The core can only be used when WiFi is available. How can a customer without technical knowledge set the WiFi parameters to bring the product to the cloud?

3 Likes

This seems easy enough: http://docs.spark.io/#step-3-connect-your-core-to-the-cloud :wink:
I believe thereā€™s someone working on a desktop application. That might be useful as well.
Though with the Photon, youā€™ll be able to connect to its hotspot, and enter your credentials there, which should be easier.

Yes, but this means that the core must be in this state (blue blinking) . Is it possible to go there with a function on the core?

According to this, itā€™ll boot in listening mode. But Iā€™ve got a feeling more people would find it beneficiary to have a firmware function to get there. Perhaps we can ask the guys at Spark, @Dave maybe?

There is already a function to enter Smart Config mode.

See http://docs.spark.io/firmware/#wifi-listen

6 Likes

Guess I missed that one. Awesome though!

Yes. I think the best thing for a end-consumer product would be for the project owner to claim the core and then erase all wifi config details that way, when the customer boots it up for the first time, it would (perhaps after a ā€œHi, itā€™s nice to meet youā€ on an LCD) enter listening mode. Once it connects the core will already be claimed and online.

So it would be as simple as thisā€¦?

setup() {
  if ( !WiFi.hasCredentials() ) {
    WiFi.listen();
  }
}

Do you even need to do this check if youā€™re in semi-automatic mode and calling WiFi.connect()?
Is WiFi.listen() a blocking call like connect is? Also, how long does WiFi.connect() go for before timing out? Will my code continue to run if the WiFi.connect() fails?

2 Likes

@harrisonhjones even with the Core in listening mode the customer will still need to use the Spark Core iOS app to send their network credentials, but to get to that point in the app you need to have logged in with your Spark account. Are you recommending that we give the end-users our account credentials so they can set it up on their network?

The alternative here is that you build a custom iOS app with the Smart Config SDK integrated. But with the Photon coming out in a few months thatā€™s a lot of work for something that will be obsolete very soon

Hope everyoneā€™s having a great holiday so far! Anyone come up with a better solution than giving end-users our Spark account info or integrating the Smart Config SDK into a mobile app ourselves?

1 Like

I would prefer a WPS button for easiest connection to the end users network (which to my knowledge is impossible with the spark core).

Will this be possible with a Photon device?

2 Likes

Iā€™m working on a modified Spark App with a ā€œSetup my deviceā€ section which does not require a Spark cloud login

Hopefully will be completed within the week

Note: It will be the android version not the iOS version. If it goes official Iā€™ll see if we canā€™t do the same with the iOS app

5 Likes

I think the WPS idea is genius. But I am also happy to hear that @harrisonhjones is working on a solution. I have built a product ready for ā€˜the real worldā€™ and the ONLY hangup is I have no way for end users to connect the device.

I hope to see progress on this and if you need people to test I am happy to break it for you.

Thanks for volunteering to break my work :stuck_out_tongue: I look forward to beta testing it though trurth be told the Spark android team has already done most of my work for me :slight_smile:

So it turns out that the fact that the user is signed in or not is heavily tied into the SmartConfig process on the AndroidApp. Iā€™m trying to decide the best way to go about this. I may end up having to remove the Action bar from the smartConfig section (ActionBar = Account Checks in the app) and replacing it with a simplified bar. Itā€™ll mean you canā€™t log out from the Smart Config section but I donā€™t think thatā€™ll bother anyone

Nice @harrisonhjones!

So following the train of thought ā€“ youā€™re working on a version of the Spark Core app that has the login credentials hard coded into the program rather than entered by the user. The process for using your work would be to fork the application, change the login credentials, add some branding, and then release it into the app stores under our own name. Is that correct?

You could do it that way if you wish.

My plan was to do something a little different:
I expect you to ship your product/device with the core pre-claimed to your own account but with no WiFi credentials
When users unbox your product they will be greeted with a flashing blue LED
They will go online to the app store and download the Official Sparkcore app. Once installed they will open it and select ā€œSetup my spark deviceā€ (or similar). From there the Spark app will do the necessary SmartConfig stuff to get their device online.

Does that make sense?

2 Likes

Makes perfect sense @harrisonhjones but honestly the ability to easily ā€˜brandā€™ the app is important. A simple ā€˜logoā€™ would suffice.

I dont really like launching my device and telling folks ā€˜hey you need the spark core app to use itā€™.

Has anyone considered the WPS option? Is it viable or to much work to integrate?

1 Like

Youā€™d have to look into if the CC3000 can do WPS.

I could fairly easily release a brandable Spark configure app sure. Iā€™ll go that route then. Youā€™d still have to compile it yourself or I imagine I could do that if I had the logos/branding material

2 Likes

@Herner, the CC3000 does not do WPS, which is why they have their SmartConfig stuff. The Photon will take a totally different approach. :smile: