Hotspot failing on RPI4

Hello Everybody,

I am facing an issue with hotspot on RPI4 in Volumio2. My aim is to have a standalone Volumio device, with a touch display, but I want also to control it from my laptop. So, hotspot on volumio is what I need.

Version is 2.917, freshly installed. I have only the “touch display plugin” installed. The rest is “as installed”.

My first attempt was with an old noname SD card. Installation was fine, but after a while, I lost the hotspot connection. Which means it worked great for a few days, and after that, impossible to connect from my laptop. But I could still play music, using the touch display.

So, I bought a pair of new Sandisk CD 16 GB cards, C10/A1, and made again a fresh installation on both.

It happens exactly the same thing on one of them: works great at the beginning, but after 2 days, impossible to connect.

When using the “faulty” SD card, freshly booted, when I try to connect from my laptop, the “Volumio” hospot appears (sometimes it takes time to appear), but the connexion cannot be established. And after that, the hotspot disappears from the list of available networks.

If I plug an ethernet cable in this state, I switch to wired connexion without any problem.

When using the “right” SD card, the hotspot appears immediately, and the connexion is quite fast.

I have some traces, searching for “hotspot” in journalctl:

Using the faulty SD card:

volumio@volumio-px:~$ journalctl | grep hotspot
Nov 29 01:22:38 volumio-px systemd[1]: Stopped hotspot.service.
Nov 29 01:22:38 volumio-px systemd[1]: Stopped hotspot.service.
Nov 29 01:22:38 volumio-px systemd[1]: Starting hotspot.service…
Nov 29 01:22:38 volumio-px systemd[1]: Started hotspot.service.
Nov 29 01:22:39 volumio-px hotspot[878]: Internet Systems Consortium DHCP Server 4.3.1
Nov 29 01:22:39 volumio-px hotspot[878]: Copyright 2004-2014 Internet Systems Consortium.
Nov 29 01:22:39 volumio-px hotspot[878]: All rights reserved.
Nov 29 01:22:39 volumio-px hotspot[878]: For info, please visit ISC DHCP - ISC
Nov 29 01:22:39 volumio-px hotspot[878]: Config file: /etc/dhcp/dhcpd.conf
Nov 29 01:22:39 volumio-px hotspot[878]: Database file: /var/lib/dhcp/dhcpd.leases
Nov 29 01:22:39 volumio-px hotspot[878]: PID file: /var/run/dhcpd.pid
Nov 29 01:22:39 volumio-px hotspot[878]: Wrote 2 leases to leases file.
Nov 29 01:22:39 volumio-px hotspot[878]: Listening on LPF/wlan0/dc:a6:32:dc:d7:7c/192.168.211.0/24
Nov 29 01:22:39 volumio-px hotspot[878]: Sending on LPF/wlan0/dc:a6:32:dc:d7:7c/192.168.211.0/24
Nov 29 01:22:39 volumio-px hotspot[878]: Sending on Socket/fallback/fallback-net
Nov 29 01:22:41 volumio-px hotspot[877]: Launching Hostapd 2.8
Nov 29 01:22:41 volumio-px hotspot[877]: Configuration file: /etc/hostapd/hostapd.conf
Nov 29 01:22:41 volumio-px hotspot[877]: wlan0: Could not connect to kernel driver
Nov 29 01:22:41 volumio-px hotspot[877]: Using interface wlan0 with hwaddr dc:a6:32:dc:d7:7c and ssid “Volumio”
Nov 29 01:22:41 volumio-px hotspot[877]: wlan0: interface state UNINITIALIZED->ENABLED
Nov 29 01:22:41 volumio-px hotspot[877]: wlan0: AP-ENABLED
Nov 29 01:23:56 volumio-px hotspot[877]: wlan0: STA 38:de:ad:65:99:bf IEEE 802.11: associated
Nov 29 01:23:57 volumio-px hotspot[877]: wlan0: STA 38:de:ad:65:99:bf IEEE 802.11: associated
Nov 29 01:23:57 volumio-px hotspot[877]: wlan0: STA 38:de:ad:65:99:bf IEEE 802.11: associated
Nov 29 01:23:59 volumio-px hotspot[877]: wlan0: STA 38:de:ad:65:99:bf IEEE 802.11: disassociated

Now using the “working” SD card:

volumio@volumio-px:~$ journalctl | grep hotspot
Nov 18 12:09:00 volumio-px systemd[1]: Stopped hotspot.service.
Nov 18 12:09:01 volumio-px systemd[1]: Stopped hotspot.service.
Nov 18 12:09:01 volumio-px systemd[1]: Starting hotspot.service…
Nov 18 12:09:01 volumio-px systemd[1]: Started hotspot.service.
Nov 18 12:09:01 volumio-px hotspot[883]: Internet Systems Consortium DHCP Server 4.3.1
Nov 18 12:09:01 volumio-px hotspot[883]: Copyright 2004-2014 Internet Systems Consortium.
Nov 18 12:09:01 volumio-px hotspot[883]: All rights reserved.
Nov 18 12:09:01 volumio-px hotspot[883]: For info, please visit ISC DHCP - ISC
Nov 18 12:09:01 volumio-px hotspot[883]: Config file: /etc/dhcp/dhcpd.conf
Nov 18 12:09:01 volumio-px hotspot[883]: Database file: /var/lib/dhcp/dhcpd.leases
Nov 18 12:09:01 volumio-px hotspot[883]: PID file: /var/run/dhcpd.pid
Nov 18 12:09:01 volumio-px hotspot[883]: Wrote 2 leases to leases file.
Nov 18 12:09:01 volumio-px hotspot[883]: Listening on LPF/wlan0/dc:a6:32:dc:d7:7c/192.168.211.0/24
Nov 18 12:09:01 volumio-px hotspot[883]: Sending on LPF/wlan0/dc:a6:32:dc:d7:7c/192.168.211.0/24
Nov 18 12:09:01 volumio-px hotspot[883]: Sending on Socket/fallback/fallback-net
Nov 18 12:09:03 volumio-px hotspot[882]: Launching Hostapd 2.8
Nov 18 12:09:03 volumio-px hotspot[882]: Configuration file: /etc/hostapd/hostapd.conf
Nov 18 12:09:03 volumio-px hotspot[882]: wlan0: Could not connect to kernel driver
Nov 18 12:09:03 volumio-px hotspot[882]: Using interface wlan0 with hwaddr dc:a6:32:dc:d7:7c and ssid “Volumio”
Nov 18 12:09:03 volumio-px hotspot[882]: wlan0: interface state UNINITIALIZED->ENABLED
Nov 18 12:09:03 volumio-px hotspot[882]: wlan0: AP-ENABLED
Nov 18 12:09:12 volumio-px hotspot[882]: wlan0: STA 38:de:ad:65:99:bf IEEE 802.11: associated
Nov 18 12:09:12 volumio-px hotspot[882]: wlan0: AP-STA-CONNECTED 38:de:ad:65:99:bf
Nov 18 12:09:12 volumio-px hotspot[882]: wlan0: STA 38:de:ad:65:99:bf RADIUS: starting accounting session AF825594E3FF598F
Nov 18 12:09:12 volumio-px hotspot[882]: wlan0: STA 38:de:ad:65:99:bf WPA: pairwise key handshake completed (RSN)

I see a difference only at the end, when the connection is established (or not…)

So my first assumption of using an old “noname” SD card seems to be wrong. Using a brand new and freshly installed SD card does not solve the issue. One is (still) working fine, but not the other one.

Any hint to help me to solve this issue?

NB: the dates on both traces are different, because it is really standalone, so no access to ntp. It’s only when I use a wired connexion that the date is updated. Could it be the cause of the problem?

Thanks for your help.

 Denis

i would say try the 3.xx version…

Thank you, but I would prefer to understand this issue on version 2 before moving to V3.

I have tried this:

After facing the issue on the “faulty” SD card, I have used a wired cable to connect on it. This gives acces to NTP to Volumio, so the date was updated.

And after reboot, the issue has disappeared… Could it be a problem of date? With DHCP? My laptop is of course at the right time, but not Volumio, except if I use a wired connection.

Could it happen that the hotspot/dhcp connexion cannot work when there is too much time difference between the server and the client?

do you use the ip’s instead of volumio.local?

I use the IP address

oke normal you could see the hotspot on your network in any device under the hotspot ip.
but the 3.xx is the way to go …

1 Like

Well, that’s not exactly true. The issue arises when trying to connect to the hotspot.
I see “Volumio” in the list. Click on it, and wait for the connection.

So I am not using IP or “local” adress, the problem is that my PC cannot connect to the hotspot named “volumio”.

is it a 5ghz or 2.4ghz connection

Well, not sure, but I would say 2.4Ghz. The configuration is made in the volumio UI, so it is managed by volumio…

I chose channel 4 which was proposed by default.

Here is the content of the dhcp leases file.

My PC is on 211.2. I don’t see anything suspect. I will have a look again if I reproduce the issue.

There is another lease on 211.3, but I don’t know which device it is, it is not in my list of “known” Mac Addresses…

volumio@volumio-px:~$ more /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.3.1

lease 192.168.211.3 {
  starts 0 2021/11/28 22:54:36;
  ends 1 2021/11/29 10:54:36;
  tstp 1 2021/11/29 10:54:36;
  cltt 0 2021/11/28 22:54:36;
  binding state free;
  hardware ethernet f6:f4:7c:29:34:00;
  uid "\001\366\364|)4\000";
}
lease 192.168.211.2 {
  starts 1 2021/11/29 17:05:08;
  ends 2 2021/11/30 05:05:08;
  tstp 2 2021/11/30 05:05:08;
  cltt 1 2021/11/29 17:05:08;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 38:de:ad:65:99:bf;
  uid "\0018\336\255e\231\277";
  client-hostname "denis-N230WU";
}
server-duid "\000\001\000\001)7\305\260\334\2462\334\327|";

lease 192.168.211.3 {
  starts 1 2021/11/29 17:26:50;
  ends 2 2021/11/30 05:26:50;
  cltt 1 2021/11/29 17:26:50;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet f6:f4:7c:29:34:00;
  uid "\001\366\364|)4\000";
}

best connection you will get on the 2.4ghz band best supported
is your hotspot switched on ?
and a timing problems could solve with wire connection it’s more stable.
i pref. a static ip then i know it’s always there dhcp can give a other ip
at your first boot did all start good of did it have faults?
if it’s failing in first boot you better try a new install,
with a good connection this will solve most of the starting problems.
put the pi in the front of your network and if you have any firewall or pi-hole this could disturp the connection.
pi-hole i set in the end of my network so it’s not messing up my network.

“best connection you will get on the 2.4ghz band best supported” : I have no choice, the hotspot is on Volumio side, not mine.

“is your hotspot switched on ?” => yes it is

“if it’s failing in first boot you better try a new install,” => no, on first boot, it’s fine. I just fall into problems after a while.

I still think I’m facing a SW issue, not HW or SD card…

Following your advice, I have switched to a static IP address on the laptop. For the moment, the problem was not reproduced, using this static IP adress. Wait and see.

i hope it stays like this :slight_smile: that would be nice :slight_smile:

Hi,

Unfortunately, it did not sty “like this”. I stlll have failures and connection loss, although the first connection is quite fast.

I’am trying to solve this a different way, but I have other problems. Suspecting the hotspot to be wrong, I try to use an old wifi router as gateway: Volumio is connected wired on it, and my PC is wireless. I use only the LAN/Wifi side of the router, the internet port is not connected. It is a NETGEAR FWG114P.

Connecton is OK, from the router, I can see both my PC and volumio. So far so good.

Pinging volumio from my PC is also OK and fast:

denis@denis-N230WU:~$ ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
64 octets de 192.168.0.2 : icmp_seq=1 ttl=64 temps=1.49 ms
64 octets de 192.168.0.2 : icmp_seq=2 ttl=64 temps=1.97 ms
64 octets de 192.168.0.2 : icmp_seq=3 ttl=64 temps=1.73 ms
64 octets de 192.168.0.2 : icmp_seq=4 ttl=64 temps=1.57 ms

BUT I have issues

  • on the touch display attached to volumio, the webIU won’t come up. Instead, I have an error with a blank screen: “The LOCALHOST page is’t working”. This happens ONLY when volumio is connected to the router.

  • same if I try to load the webUI from my PC, using either the IP address or volumio.local.

  • I can ssh to volumio from my PC, although it takes some time, but once connected, it’s ok and stable.

Have a look at journalctl, I see these error messages, but I’m not sure they’re relevant, because Volumio is dhcp client on eth0, not server.

Dec 08 16:43:49 volumio-px dhcpd[950]:
Dec 08 16:43:49 volumio-px dhcpd[950]: No subnet declaration for eth0 (192.168.0.2).
Dec 08 16:43:49 volumio-px hotspot[950]: No subnet declaration for eth0 (192.168.0.2).
Dec 08 16:43:49 volumio-px dhcpd[950]: ** Ignoring requests on eth0. If this is not what
Dec 08 16:43:49 volumio-px hotspot[950]: ** Ignoring requests on eth0. If this is not what
Dec 08 16:43:49 volumio-px dhcpd[950]: you want, please write a subnet declaration
Dec 08 16:43:49 volumio-px hotspot[950]: you want, please write a subnet declaration
Dec 08 16:43:49 volumio-px dhcpd[950]: in your dhcpd.conf file for the network segment
Dec 08 16:43:49 volumio-px dhcpd[950]: to which interface eth0 is attached. **
Dec 08 16:43:49 volumio-px dhcpd[950]:

Any idea?

Is it because I am connected to the router without internet access?

I think I’m facing a trivial network issue, but I don’t know which one…

Any help appreciated.

 Denis
1 Like

It seems to me that as soon as I connect volumio to my main router (the one which is connected to internet), everything goes right. And then back to the other router (i.e no internet), things go wrong after a while.

Is there something that volumio is trying to do when connected to a router, and which may cause the problem if the router is “standalone”? Like trying to get updates? Or connect to MyVolumio?

That could be the issue? How could I prevent this?

Just to recall: my aim is to have a “standalone” volumio instance (only with USB HD attached), be part of a local network, without any internet connection (which I don’t need).

Is this possible?

Hello,

I finally moved to Volumio3 (3.173), and I must say that things go much better.

Concernnig Hotspot: I tested 2 clients connected, using a static IP address, and for the moment, everything is fine. Let’s see how it goes in the future.

Concerning my second problem, I was able to use my Netgear router to connect all clients: volumio is connected wired, the others in wifi. I assigned a reserved address to volumio, and everything seems to work. I did not reproduce the issue I had with version 2 (blank screen, bad connection, etc…).

And, at last, I noticed two things:

  • mpd is now configured without auto updating. That’s much better!

  • the time needed to have the webUI ready to play music after boot is now very short. Using a RPI4 with external USB3 HD, it took around two minutes for each boot with previous version. Now, it’s only 10 seconds!

I guess that something has changed somewhere, probably a different pagination method?..

This issue was a pain in the ass for me since the beginning, it seems to be solved! Thanks!

See: Performance issue. 5 mn to boot, each time. - #29 by dvo

 Denis