1

This question already has an answer here:

I’m struggling setting wifi for my new Raspberry Pi3 running Raspbian Stretch headless. I need to setup wlan0 to connect to a free hotspot that requires a specific login/passwd http POST sequence that can be done via wget.

The sample setup I’ve found was based on a NetworkManager/dispatcher.d shell script – but this does not seem recommended (supported?) on Raspbian/Stretch.

I’ve found another reference with pre-up, post-up & post-down statements in the interfaces file – which I understand should now stay almost empty…

Any advice on how to invoke a login script when the interface goes up? Or more generally, how to configure Wifi on public hotspot that require specific login sequence.

Thanks for any help/advice

marked as duplicate by goldilocks May 20 at 13:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Short answer: Write a systemd service file which runs your login script after the dhcpcd service has started. The script should verify that the wireless interface is active and check the SSID of the network. Once those two checks pass, the login sequence should begin... something like this: Running a script as a systemd service – RubberStamp Dec 29 '17 at 23:41
1

I am using puppeteer for this purpose. It is based on nodesjs and provides a javascript interface to control Chromium. It also supports a headless operation.

If you install puppeteer it will automatically install chromium. Unfortunately it will install an x86 version which will not run on raspberry.

So you have to do some additional steps which can be retrieved from

https://code-flow-hjbello.blogspot.com/2018/11/make-puppeteer-work-with-raspbian-vers.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.