Raspberry Pi 3 Bring up wlan0 on Boot

I just set up Volumio 2 on a Raspberry Pi 3 and everything seems to be working except that it will not bring up wlan0 on boot.

If I log in via console and bring up the interface manually and add a default route everything works until the next reboot.

ifconfig wlan0 up ip route add default via 192.168.0.1 dev wlan0

Does anyone have a clue where I am going wrong?

/etc/network/interfaces

[code]auto wlan0
auto lo
iface lo inet loopback

allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
up ip route add default via 192.168.0.1 dev wlan0
[/code]

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="ssid"
psk="passwd"
priority=1
}
network={
ssid="ssid"
key_mgmt=NONE
wep_key0="passwd"
wep_tx_keyidx=0
priority=1
}

/etc/dhcpcd.conf

[code]hostname
duid
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
nohook lookup-hostname

interface eth0
static ip_address=192.168.1.10/24

interface wlan0
static ip_address=192.168.0.10/24
satic routers=192.168.0.1
static domain_name_servers=8.8.8.8 8.8.8.4
[/code]

My advice would be to not manually alter any of the networking files and use those provided by default by Volumio. Set up your networking via the Volumio UI.

There is definitely something wrong with the WiFi setup, as also other recent cases show. And I’d guess yours is one of the many manifestations of this major problem. I assume many, many people would need to use namely WiFi and not LAN to access their media and unfortunately the WiFi setup is simply a Volumio blocker for all of them.
See also: https://volumio.org/forum/wifi-connection-t5432.html

Dear Volumio team, please take a look at the general WiFi issue if you could possibly provide a seamless WiFi setup, where once Volumio is provided with one or two WiFi networks’ (incl hidden ones) details, it remembers them and always automatically connects to the lastly used one. Those should be also possible to manually delete (“forget”).

The Hotspot is a wonderful feature but it should be activated by Volumio only in cases where Volumio is not (yet) provided with any WiFi network details. Unfortunately this is currently not the case.

I realize now that I did not clarify that in my initial post. I tried that and it didn’t work. The default config does not automatically bring up the wlan0 interface and connect to any wifi network on the rpi3.

This. I can only speak for the rpi3 as this is the only platform I have attempted to set up volumio on. Everything seems to work great except the wifi configuraton. I specifically obtained an rpi3 for the built in wifi because I do not have the option of providing a wired connection to the location where the rpi will live.

I agree with xvol in that the Hotspot is great for initial config but once network credentials are supplied (and the Hotspot disabled) the default behavior should be to connect to any wifi network configured and in range.

I am not sure if the problem is strictly with volumio or with the underlying raspbian/debian distribution (systemd grumble grumble), but either way, I would like to get a resolution and will be glad to work with the devs to obtain one.

Yes, there are definitely problems here, and yes Raspbian’s Debian version is at the root of it (in my opinion). I think it is a tricky one to resolve.

This is indeed expected behavior.

Actually Volumio hotspot feature (for initial setup or else) is still unreliable with many wifi adapters, and maybe it is the case with rpi3 built-in interface. There are indeed some know issues with rpi3 wifi in some hotspot configurations, due to driver limitations for instance…

So, starting from unmodified Volumio settings, the best approach to successfully setup wifi operations, it to first disable hotspot (save settings, and reboot), and then hook the rpi3 with ethernet, and finalize wifi setup (ssid discovery, pass), save and reboot. Then you should get proper operation in wifi only.

This is essentially what I did before but I did it again and logged all steps just for good measure.

  1. Re-flashed SD card.
  2. Logged in and disabled hotspot and saved settings.
  3. Rebooted - Hotspot is disabled. Wireless networking is off.
  4. Turned on wireless networking, selected SSID, input password, and clicked connect.
  5. Get popup saying networking restarted but wifi does not come up. I confirmed on DHCP server that no new leases were granted.
  6. Rebooted - Wireless networking turned off.
  7. Turned on wireless networking and saved settings. Clicked SSID (credentials stored) clicked connect.
  8. GOTO 5.

Can anyone confirm they have Volumio 2.041 working–with wifi, on boot, with no user interaction–on a rpi3?

Hum…it may look like authentication error.
Indeed wifi adapter is used since rpi3 can scan SSIDs.
Any chance you can disable and/or change security settings on the router (none, WPA, WPA2, AES, TKIP, etc): maybe there is some error in automatic detection of authentication settings.

EDIT: you may check the journal log ssh-ing into the rpi3:

sudo journalctl -f

Things have gone from bad to worse and I think it’s the hardware. I can no longer get the pi to connect to the wifi network manually and the access point no longer shows up to other devices when it is enabled. I flashed raspbian light onto the sd card and get authentication errors when attempting to connect to my wifi network with known good credentials and connecting to an un-secured wifi network fails as well. I may try flashing a full raspbian image as a last ditch test when I get some more time but really think the wifi front end got damaged.

I will re-visit this when I get the wifi issue resolved. Hopefully things will just work :slight_smile:

Have also the problem that I can not set wireless to be on. The Rpi3 and the wireless is driving me crazy. Turning off hotspot and numerous times went through reboots saving wlan connection but eevery time when the Lan cable is not connected the wireless goes to off!
My solution was to use the good old Edimax Wifi USB stick and with this it works perfect.
But still I would like to get rid of it as I think its weird pluging in a Wifi USB Stick when the Rpi3 has wifi on board.

Thanks for all the help and ideas; I finally got it sorted.

The problem was the HiFi Berry DAC+ Pro. It boils down to a driver conflict with the onboard Wifi and the driver for the DAC (source). The solution ended up being that the DAC driver had to be loaded and the WLAN set on a fixed channel other than 1, 6, 11, or 14. If the driver wasn’t loaded and/or the wifi was on one of the verboten channels it would work intermittently or not at all.

I am still having a few issues browsing my music collection when using a web browser from a phone, but that is a whole different issue :unamused:

Glad to see I’m not the only one having this problem! I made Volumio music boxes for my daughters for Christmas. They still don’t have their gifts, because I could not get the WiFi working reliably with a Pi3 and HiFiBerry DAC + Pro. I even went and bought 2 new Pi2Bs to try to remedy this mess. They are so much slower, and still seemed to have intermittent issues. I’ve also tried to find a way to kill the Pi3 internal WiFi, but the only method I know is to un-solder the damn radio chip!

So now, I’m now going to write a new image and test what you’ve posted.

It’s really too bad there aren’t more DAC choices for Odroid. The Pi totally sucks in comparison. But the HiFiBerry DACs have pretty respectable sound quality. It certainly wouldn’t take much effort to make their DACs Odroid compatible… Oh well…

@spectrum

What exactly did you do to resolve the issue? Did you set the WLAN channel in Volumio via command line? How is this done?

I set the channel on my router and I am pretty sure that is sufficient, but wanted to check just in case.

What did you do, if anything, about the DAC driver?

Thanks!

I have the same problem.
The wifi is working when I click on “connect” into Volumio network settings, but nothing on boot.
I change the Wifi channel from 1 to 2, and still the same issue.

@spectrum
You talk about load the DAC driver, there is somethind else to do than select it in volumio settings?
Could you copy your network settings here?
Thanks a lot