Talk to Core/Photon over Wifi, but no local network available?

I’m working on a project currently based on the Arduino Yun. I’m thinking of replacing the Yun with the Core (and later with the Photon when that comes out). My application requires an iPhone app to be able interface to the device over WiFi. However, I don’t need internet access, and it will sometimes be used in areas without an internet connection.

Will I be able to get this to work with the Core? With the Yun, it acts as its own WiFi access point, with a default SSID that you can connect to from an iPhone. You then have the option to configure the Yun to use a local WiFi hotspot, or keep talking to it directly using the Yun’s SSID. I would think the Core would work the same way, but all the documentation I can find on the core says that you have to configure it to use a local WiFi hotspot.

  • Dave

The Core can’t act as an access point, so I don’t think the Core will work for you because you need to have an access point (Wi-Fi router) to connect through. The Photon, however, will be able to act as an Access Point (called SoftAP), so it might be a better solution for you.

Z

Huh. So is this a software thing? Is there any reason the Core couldn’t get the software necessary to be an access point (DHCP server, etc)? I thought any wifi enabled device was capable of acting as an access point.

Or for that matter, why can a smartphone talk to a Core to configure its wifi settings, but an app on the phone can’t talk to it?

Actually, isn’t it an option to enable “Personal Hotspot” on an iPhone, and have the iPhone act as the Core’s access point?

Unfortunately it’s not quite that simple; the software has to be baked into the Wi-Fi module itself. The CC3000 does not have the ability to act as an access point. The module on the Photon does.

The setup process uses Smart Config, a proprietary protocol by Texas Instruments, which they only allow to carry the Wi-Fi SSID and password.

Yes, I suppose so. Not something I’ve experimented with, if you do try it, let us know what you learn!

Though he might have a hard time trying to both act as a hotspot and configure the SparkCore to use the hotspot at the same time. Perhaps it can be done?

Ok, now I understand. It does seem like it should be possible to use the personal hotspot feature of the iphone. This would open up the Core to applications where you want to talk to it over wifi, but don’t have a wifi hotspot nearby. Can you please point me to source code or libraries to do the smart config?

Also - if the smartphone becomes the Core’s hotspot, will it be able to talk to it directly without any internet round trips? For example, does REST depend on an internet connection?

As for the source code for the phone apps I’d take a look at either the

As for your second question: if you are using the cloud you do need an internet connection to run functions like variable(), publish(), subscribe(), etc. If you want something that talks directly to your phone app I would look into the VoodooSpark firmware (https://github.com/voodootikigod/voodoospark)

Thanks. I’d like to know if I can talk to a Core directly via REST, without going through the cloud. I’m doing that currently on the Arduino Yun. I think I remember seeing someone saying that Spark was working on this a while back. Local REST?

Ok, I just found [this][1].

[1]: https://community.spark.io/t/tutorial-local-cloud-1st-time-instructions-30-nov-14/5589/. Will that let me use REST to talk directly to a Core, bypassing the cloud?

No, You need to use special firmware (like the Voodoo Spark firmware) to talk directly to the core in a rest-like format. The local cloud lets you host your own version of the cloud which is usually local so it would work if the internet goes out.