4

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?

  • 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 Jan 25 '15 at 23:03

2 Answers2

1

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.

FlorianB
  • 169
  • 3
  • 1
    We have tried to do the MAC whitelist thing ... but the network admins won't allow it. Most of the hardware devices I've seen won't connect to a network if there is a captive portal. They connect to the wifi, then can't get to the internet and determine that the network is not live, then they fail. I'm not sure when we would get the change to run such a script or execute a http-request without building into the hardware firmware. – Brett Jan 30 '15 at 14:19
0

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

Brett
  • 769
  • 6
  • 16
  • After checking network, how did you get your IoT to the WIFI? – Grace Huang Jul 12 '16 at 18:29
  • We ended up using a different platform and actually got around the portal issue by using a Raspberry Pi to talk to the portal with the IoT devices MAC address. Hacky, but it worked. – Brett Feb 22 '17 at 02:40