LocoMotion – The build : captive portal

I needed a way to let the user change settings, without an actual connection to a WiFi network.
(not only for first time setup, but also if something goes wrong along the way)

The idea was to build a “captive portal” (wiki link) I could build it such a way, that whenever something goes wrong
(or by pressing a hidden button, to make changes), a WiFi AP pops up, and you simply connect to it, and a webpage with settings would come up on your PC/laptop/tablet/smartphone. No further fiddling with WiFi settings or IP configuration, passwords etc …
Just a simple click would bring up the config page. Can it be more easy ? I guess not 🙂

So, I developed such a thing. Whenever something goes wrong during the startup-check, a WiFi network would appear,
named “AP_LocoMotion”. Simply connecting to this AP, would bring up the config page … I tested it on my iPad …
(as said earlier, it works on every type of device: PC/laptop/tablet/smartphone, Raspberry Pi, even on SmartTVs with a browser,
or on a gaming console with a browser, you name it … It also works in Windows/MacOS/Linux …)

So, it’s as simple as clicking “AP_LocoMotion” in your WiFi network overview.
Next you will be redirected automatically to the following page …

Under the title, you see a list of available WiFi networks (in yellow), you should find your own WiFi network that you want to use … Simply click it !
The name is transferred to the “SSID” field, next enter your WiFi password.
If you are familiar with networking, you can fill in the IP you want the LocoMotion device to have, the Subnet and Gateway.
If this all sounds “hocus pocus” to you, you probably have DHCP configured somewhere. Just enter in those 3 fields.
The EcoS IP needs to be filled in correctly (otherwise communication between the EcoS and LocoMotion would be impossible,
compare it to trying to phone someone without knowing his phone number …)
Take a look in the EcoS manual, if you need help for this …
Next, click on “Save”, and your settings will be stored in LocoMotion. A simply reboot will activate your settings.
The “Refresh” button is to re-scan for WiFi networks …

This entry was posted in Blog, LocoMotion, Railroading. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *