Mopidy Discourse

Connecting to open wifi

Hi, I would like my pi musicbox connecting to open wifi network that requires confirmation of terms in order to start using it(setting spotify stream box in nurses room:)

Any insights please? Thank you!

Have you Pi Box a Wifi Adapter?
Is a Pi thing on which OS runs MusicBox?
Have you Shell Access to modify the Configs?

If using a WiFi connection you must enter your network details in settings.ini before you boot the system. You can also set other config options at this point but it’s generally a good idea to start with the minimum config required when booting for the first time. It’s easy to change other options later via the settings web page once you are up and running.

To do this, insert the SD Card into a computer (Windows, Mac, Linux), and open it in the file manager. It will contain a folder called config and within that will be a file called settings.ini. The file is structured as an ini file and should be opened in a text editor. All lines starting with a # are comments designed to help you and will be ignored by Pi Musicbox. Avoid changing the order or formatting of the non-commented out lines.

For details on specifically what WiFi settings you need to set, see Wifi Network.

Wifi Network

If you connect a supported wifi dongle to your Pi, the MusicBox software should be able to detect and use it instead of a cable connection. Most dongles are supported, but not all. If you buy one, make sure it’s supported by Raspbian, the Linux distribution on which MusicBox is based. To make wifi work, you have to fill in the network name (SSID) and your password in the config file. Add these lines to the basic configuration above, or edit the default file supplied with MusicBox:

WIFI_NETWORK = ‘mywifinetwork’ WIFI_PASSWORD = ‘mypassword’

Substitute the mywifinetwork and mypassword with the correct values of your own network. For now, the wifi on Pi MusicBox only supports WPA(2) encrypted networks, configured via DHCP. As with a wired network, if you want to use a static address, WEP encryption or no encryption, you need to get into the console and configure it yourself (see Getting Your Hands Dirty).

I have raspberry pi 3 with built in wifi, running music box. I can access the shell at home.

I can connect to wifi at home just fine, but at work the hospital open wifi network requires me clicking a checkbox to confirm my agreement to terms of using public WiFi. I am looking for a way to automate that confirmation because I intend to run the musicbox without a monitor.

This is known as a network with a ‘captive portal’. I don’t know how to configure pi musicbox to support that but maybe that term will help you research it yourself. I don’t think it’s straight forward, these systems are sometimes explicitly put in place to stop you connecting automatically like this.

1 Like

Fastet way is to ask your Sys-Ops to batch a ethernet plug or give your MAC/IP Access without Login but i don’t think he will do it.