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: