I know this is bringing up an old topic but I have a question for you programmers out there because some of us are just teachers...
When I run the KIWIX hotspot on a pi, it comes up with an instruction screen as soon as you log in. This seems to be linked to the connectivity check rather than as a captive portal. It works in both online and offline scenarios.
Could this be replicated for the moodlebox?
Captive portal when MoodleBox not connected to the Internet
Can you post some screenshots or photos of what you see with your KIWIX hotspot?
Can you please describe precisely the whole steps before you get this screen? (I cannot yet figure out what you describe)
- Edited
When I conect to the wifi (usually kiwix although you can change it, in this case "chatterchannel") this screen pops up automatically as soon as the connection is established. It does the same in windows computer as on cell phone. I believe it is linked to a connectivity check but don't know.
It does not auto redirect but it tells the user to connect to a certain address n their browser, in our case it would advise them to connect to http://moodlebox.home
It would be useful to have this instead of verbal instructions on how to connect to the moodle
- Edited
Ian When I conect to the wifi (usually kiwix although you can change it, in this case "chatterchannel") this screen pops up automatically as soon as the connection is established.
So this is a captive portal. I'll try to take time to see how it works in kiwix (note to self: kiwix hotspot captive portal source).
BTW, does "NDS" in the subject mean "NoDogSplash"? In this case, is it OK to change it?
I'm looking at the Balena blocks and was wondering if this would help:
https://github.com/balenablocks/wifi-connect
Ian Thanks. Rather: https://github.com/balena-os/wifi-connect.
- Edited
I've analyzed this more deeply. The news are not good for such use case.
How a captive portal works?
- The client device generates automatically a http (port 80) request. This requests tries to load a remote URL through the default gateway for a unique (or quasi-unique) time.
- The request URL depends on the user's device type (Android, MacOS, iOS, Windows, etc.) or on the user's browser.
- The captive portal "captures" it and does its thing (present a web page with infos, etc.).
Consequence: an Internet connexion is needed for a captive portal to work.
Nodogsplash, OpenNDS and Balena WiFi Connect all function like this, and do not work when the router (say MoodleBox) has no Internet connexion, since step 1 above fails.
What about Kiwix hotspot?
Kiwix hotspot works around this in its captive portal when offline by faking a correct answer from the URL given by the user's client, a complex thing to do.
That's why Kiwix's captive portal works also when the router isn't connected to the Internet.
Is it possible to do this in the MoodleBox?
Certainly, but it is complex (see above) and needs a lot of programming and testing. I'll open I've opened an issue for this, but won't be able to do this alone: I've not the expertise, nor the time to implement it.
I'm open to be sponsored for implementing such a feature.
Edit: See this issue on Github.
Greetings Nicolas. I have found this in Github: https://github.com/Splines/raspi-captive-portal/tree/e277d958a90074d2c7c29721ab10a393c15af31a
I can't seem to activate it because I cannot work over ethernet with the moodlebox (I'm not clever enough )
Maybe you could take a look, or advise me how to ssh via ethernet.
Thanks
Ian
Please open the MoodleBox dashboard moodlebox.home/admin/tool/moodlebox/index.php
Here we will see the ethernet ip address of your MoodleBox. Take a computer wired to the ethernet. Start the terminal application on your computer. Type the following terminal command … you should use the ip address you see in your MoodleBox dashboard. Enter the password "Moodlebox4$". Now you're connected over ethernet.
ssh moodlebox@192.168.1.100