Moode Forum

Full Version: Wifi connection issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having difficulty either getting wifi working, or when switching a box from ethernet to wifi.

A few times I've gone over to a friend's to show off Moode... and had difficulty going from my wifi to theirs.  Kinda crimps the evangelism...

I also notice that I have difficulty getting the 2.4ghz wifi working on my 3B+, that has both bands,  usually 5ghz is no problem, despite both being seen.  A possible issue here is the Ethernet and the 2.4ghz wifi radio seem to share the same MAC address, and the 5ghz has a different one?   Might that create issues?

When I go from wifi to ethernet,  then back to wifi, (2.4ghz)  I seem to have both working,  and even have seemed to connect to the IP that gets assigned to the wifi,  and have net access...  but if I pull the eth cable out,  the net access goes away,  so it's not really thru the air...

Hoping someone can shed some light on this,  and or point me in some ways of reading...  or tell me which logs and config files to start looking at....  Seems the 3B+ is the most problematic,  the 3B that has only a 2.4ghz radio is less so.
@JonPike

The current moOde WiFi configuration scheme is based on the assumption that a player is statically located and needs to know only a single network SSID and pw. "Set it and forget it" is the mantra.

Moving to a different WiFi network is a nuisance. I'd say the easiest thing to do is to first reset moOde to run in AP mode, move the player to the new location, and then use a phone/tablet/whatever to connect to the moOde AP and configure for the new location, exactly as if configuring it for the first time. 

Going home again will necessitate repeating the same procedure.

Maybe in future there will be the ability for moOde to remember more than one network but that will require changes to the database, to the moOdeUI, and to the internal routines which detect the presence of an AP and connect to it. Just because my phone, my tablet, and my laptop can do it doesn't mean it was easy to implement. Rolleyes

As for your experience with your Ethernet and WiFI, some things you said don't add up for me. Whether it's a single-band or a dual-band WiFi transceiver, each RPi has only one on board and it has only one MAC address. This MAC address is necessarily different from the MAC address of the onboard Ethernet transceiver.

You can use the "ifconfig" command to see yours.

Here, for example, is the output for the RPi3B+ on my desk (addresses partially obscured). "eth0" is the Ethernet adapter; "wlan0" is the WiFi adapter. The MAC addresses are labelled "ether" . You can't tell because of my obscuration but the two MAC addresses differ in the last three octets.

Code:
pi@moodeVU:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10<host>
       loop  txqueuelen 1000  (Local Loopback)
       RX packets 104  bytes 9763 (9.5 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 104  bytes 9763 (9.5 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.1.182  netmask 255.255.255.0  broadcast 192.168.1.255
       inet6 fe80::xxxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
       ether b8:27:eb:xxx:xx:xx  txqueuelen 1000  (Ethernet)
       RX packets 52124  bytes 7268601 (6.9 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 16134  bytes 1555420 (1.4 MiB)You can use either Ethernet or WiFi but not both at the same time. 


I'm not sure I follow the flow of your "when I go..." description. You should be using either Ethernet or WIFI but not both at the same time; e.g., don't leave a live Ethernet cable plugged in while trying to use WiFi.

Regards,
Kent
Understand that having a multi site database with saved passwords is a lot of work "under the hood"... (bonnet?)  It's just how easy is it to switch between the modes of input (eth - wifi and back)

I seem to have mixed up in my mind two different devices,  in  my late night post.. its a router device that seems to share a MAC,  not the Pi..  Apologies.

IIRC...  back with the Pi 1, and needing to have a plug in wifi dongle,  things went smoother.  With the later ones that have built in wifi, there is no remove or install the wifi device,  when switching between network modes.  The setup guide is still written this way.   Seems to be less robust,  in getting the system to switch over, on the internal  wifi models.

When I have two devices apparently active,  I'm not trying to create that,  it's as a recovery technique,  when I have a non-responsive wifi after a reboot.  Plugging in the eth will get me connected,  but with both (trying) to be active.   Wonder if it puts things in some nether state?   I'd be willing to dig into status and config files to see if we can figure out what's going on here...
(07-16-2020, 01:10 PM)TheOldPresbyope Wrote: [ -> ]@JonPike

The current moOde WiFi configuration scheme is based on the assumption that a player is statically located and needs to know only a single network SSID and pw. "Set it and forget it" is the mantra.

Moving to a different WiFi network is a nuisance. I'd say the easiest thing to do is to first reset moOde to run in AP mode, move the player to the new location, and then use a phone/tablet/whatever to connect to the moOde AP and configure for the new location, exactly as if configuring it for the first time. 

Going home again will necessitate repeating the same procedure.

>>

I'm not sure I follow the flow of your "when I go..." description. You should be using either Ethernet or WIFI but not both at the same time; e.g., don't leave a live Ethernet cable plugged in while trying to use WiFi.

Regards,
Kent

OK..   here's my typical case.  I have moode player set up on my wifi at home.   I want to go to a friends house,  and demo it so he can experience all the moode goodness of streaming,  the massive radio station list,  etc.   

I go into settings,  network, and set SSID to none, which should set it back to AP mode.  Usually, it works going back to AP mode,  and I can connect to the player on 172.24.1.1.   Often, it seems, when I then detect and load my friend's SSID and password,  (or even my own at home)  it does not work I just end up back in AP mode.
I thought this was my fat fingering the password,  one of the reasons I suggested the "view password" feature that we now have.  Seems like it's not me and the password, so much.

At this point, in desperation, I plug in the ethernet cable,  it will connect and get an IP, and I can access the moode box.  If at this point, I look at the network,  I have both a eth connection and a wifi.  The wifi says it's got a good signal, it's own different IP, but I don't get any response trying to talk to it, only on the ethernet IP.

I have recently found that most of the time (all of the time?) if I choose my home 5ghz radio,  vs my 2.4ghz,  it works.   Starting to wonder if my Pi 3b+ has a bad 2.4 radio?  Guess I'd have to buy another one to check,  since (I think) my pi 3b only has a 2.4ghz?


I'll try playing with the 3b to see how it's behaving.

So, batch of questions:

Are there any other steps needed in changing between wifi to ethernet and back,  for Pi's that have internal wifi?  (setup still seems to tell you to pull dongles out, etc)

Should using the network Reset button be a part of this process?  Not?   What exactly does that command do for you, anyway?

What commands and where to look for status of network connections and devices? 

I've been here before, and this time will make a record of these for later.   I would be willing to write up procedures to do troubleshooting and proper network switching,  for general use if that could be useful, once I understand what the issues is here.
The RESET button sets the Ethernet config to DHCP (no static IP address entries) and it sets the WiFi config to "None (activates AP mode)". it's a throw back to the early days of moOde and I should probably get rid of it.

Your issue "I have recently found that most of the time (all of the time?) if I choose my home 5ghz radio,  vs my 2.4ghz,  it works." suggests some sort of interference in the 2.4 GHz band, maybe on channel 6 which AP Mode is set to by default.

You might try changing the channel to 1 or 11.

A good util for getting a sense of your wireless environment is the WiFi Explorer app. Below are some screenies showing the horror in my own surrounding area :-0 WiFi Explorer is running on my iMac in the Study.

You can see the challenge for my 2.5GHz WLAN (AirnetN2). It's slow and problematic due to the high number of competing networks that have relatively high signal strength. My 5GHz WLAN (AirnetN5) on the other hand works really well because there is much less interference from other 5GHz WLAN's. Part of the issue with my 2.4GHz band is the location of my Router which I haven't gotten around to moving to central location yet.

[attachment=1467] [attachment=1468]
@JonPike

Quote:I go into settings,  network, and set SSID to none, which should set it back to AP mode.  Usually, it works going back to AP mode,  and I can connect to the player on 172.24.1.1.   Often, it seems, when I then detect and load my friend's SSID and password,  (or even my own at home)  it does not work I just end up back in AP mode.

I thought this was my fat fingering the password,  one of the reasons I suggested the "view password" feature that we now have.  Seems like it's not me and the password, so much.

So you're already doing what I suggested. The behavior you experience seems peculiar. I have not had such problems connecting to a LAN AP with any of my RPi models that have internal WiFi.

Quote:At this point, in desperation, I plug in the ethernet cable,  it will connect and get an IP, and I can access the moode box.  If at this point, I look at the network,  I have both a eth connection and a wifi.  The wifi says it's got a good signal, it's own different IP, but I don't get any response trying to talk to it, only on the ethernet IP.


Again, this seems peculiar. I just took an RPi3B+ with moOde 6.6.0 set up as a WiFi client to my LAN AP and plugged it into an Ethernet port on the LAN as well. Since I had to take it downstairs to reach an empty Ethernet port it was power cycled in the process (maybe you need to power cycle as well?). Here's the output from ifconfig

Code:
pi@moodeVU:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.1.165  netmask 255.255.255.0  broadcast 192.168.1.255
       inet6 fe80::xxxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
       ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
       RX packets 456  bytes 236892 (231.3 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 496  bytes 61827 (60.3 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10<host>
       loop  txqueuelen 1000  (Local Loopback)
       RX packets 2348  bytes 1080429 (1.0 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 2348  bytes 1080429 (1.0 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.1.182  netmask 255.255.255.0  broadcast 192.168.1.255
       inet6 fe80::xxxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
       ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
       RX packets 68  bytes 9379 (9.1 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 57  bytes 14225 (13.8 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

As you can see, both the eth0 interface and the wlan0 interface have live IP addresses. I have one Web browser open on 192.168.1.165 and another Web browser open on 192.168.1.182. Both instances of the moOdeUI are working. I still don't recommend using Ethernet and Wifi connections at the same time, but that's a different issue.

My home situation isn't as bad as Tim's. I have only three dozen other APs visible in my equivalent tool to his WiFi Explorer, but still there's plenty. Yes they cause mutual interference which slows down throughput but it's still possible to connect clients with the moOde player's AP or to connect the moOde player to my LAN AP.

Do you have a DAC HAT on your RPi? Do you have the RPi in a metal enclosure? Either or both conditions will worsen your transmitted and received WiFi signal strength. If so, an external WiFi dongle could alleviate the problem.

If you can log into your RPi and run the ifconfig command, then look for RX and TX errors frequently greater than zero as an indication that your communication path is poor.

Another command you can explore once connected is iwconfig. Continuing my RPi3B+ example from above

Code:
pi@moodeVU:~ $ iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11  ESSID:"xxxxxxxx"  
         Mode:Managed  Frequency:2.412 GHz  Access Point: 48:5D:36:xx:xx:xx  
         Bit Rate=24 Mb/s   Tx-Power=31 dBm  
         Retry short limit:7   RTS thr:off   Fragment thr:off
         Power Management:on
         Link Quality=51/70  Signal level=-59 dBm  
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:16  Invalid misc:0   Missed beacon:0


For reasonable communication, you should see "Signal level" values above, say, -70dBm ("above" means closer to zero; my -59dBm is above -70dBm). 

Rumor has it that turning off the WiFi adapter's power management improves range. I haven't tested that but you can search the Web for HowTos.

Good luck with your player.

Regards,
Kent
(07-18-2020, 11:38 PM)Tim Curtis Wrote: [ -> ]The RESET button sets the Ethernet config to DHCP (no static IP address entries) and it sets the WiFi config to "None (activates AP mode)". it's a throw back to the early days of moOde and I should probably get rid of it.

Your issue "I have recently found that most of the time (all of the time?) if I choose my home 5ghz radio,  vs my 2.4ghz,  it works." suggests some sort of interference in the 2.4 GHz band, maybe on channel 6 which AP Mode is set to by default.

You might try changing the channel to 1 or 11.

A good util for getting a sense of your wireless environment is the WiFi Explorer app. Below are some screenies showing the horror in my own surrounding area :-0 WiFi Explorer is running on my iMac in the Study.

You can see the challenge for my 2.5GHz WLAN (AirnetN2). It's slow and problematic due to the high number of competing networks that have relatively high signal strength. My 5GHz WLAN (AirnetN5) on the other hand works really well because there is much less interference from other 5GHz WLAN's. Part of the issue with my 2.4GHz band is the location of my Router which I haven't gotten around to moving to central location yet.

 

OK, was wondering if it might do more to reset everything back to basic eth only...  sounds like it's no different than no SSID.

Yeah, you have a really busy neighborhood.  Mine's nowhere near that bad.  Though, I'll rescan,  been a bit since the last check, could be new stuff out there now.  I use WifiAnalyzer on Android,  (watch out, several by that name, icon is green circle with waves)  a rather nice example of a wifi monitoring tool.  EVERYONE should have one of these, to map out which channel is your best choice.  Seems you can't trust routers to autoselect  the best one,  most are notorious for failing that task.  And, check periodically,  for changes.  I don't have playing issues with my Pi 3b that only has a 2.4ghz radio, so I'm not expecting that to be the reason,  but will check. 

Again, I don't have issues getting AP mode connections from the player (172.24.1.1), that's another sign the radio CAN work, the issue is switching over to my LAN AP and the net.

It's late, so I'll get to Kent's questions later, and after gathering some info...