4
votes

I'm building out an IoT solution for a client and the network admins are insisting that the devices only connect through the guest network, which has a captive portal with terms of service that must be accepted with a UI button press before gaining external internet access. Most IoT Solutions I've looked at so far (electric imp, Spark core) explicitly state that they cannot connect to a captive portal. I've seen other higher-level code for automatically interacting with a captive portal but I have not found a solution that allows an embedded wifi device (like the CC3000) to automatically accept terms on a captive portal.

Has anyone seen or built a custom wifi stack for something like the CC3000 that can recognize and interact with a captive portal? is there another embedded wifi solution (xbee wifi maybe?) that has had success in this area?

2
You might start by viewing the source of the captive portal page in an ordinary browser or by firing a query through your board from a terminal.Chris Stratton

2 Answers

1
votes

I wouldn't solve this problem in the stack. I would go for a high-level code executed automatically after connecting to the network. Some simple script for example which automatically "presses the UI button" for you. Depending on the design of that page this may be as simple as a single http-request.

Another solution (maybe): Depending on the Wifi-Modules you've chosen the MAC-Addresses of your devices are predicable. Maybe the network admins can add a rule to their config to allow these devices on their guest network without the need of that captive portal.

0
votes

After considering all options, I believe we are going to go embed the behavour into the SparkCore firmware and insert a captive portal check in the wifi connection code.

spark_utilities.cpp line 807 (Internet_Test function) https://github.com/spark/firmware/blob/master/src/spark_utilities.cpp#L807