Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Wifi / setup / configuration guide
#11
(10-06-2020, 05:09 PM)Tim Curtis Wrote: Did your Router's WiFi log show a rejected association attempt?

no that I can see
Reply
#12
(10-06-2020, 01:47 AM)McFly Wrote: Hi all!

I'm trying to use Moode in Wifi mode.  all is good in ethernet mode.  but I follow instructoin on how to configure the wifi at this link.

https://github.com/moode-player/moode/bl.../setup.txt

but DHCP always fails to asign an IP adress!  ................. snip  ................................

1. Can you get a RPi-friendly WiFi dongle? Give it a connectivity test...

 ...alternatively:

2. Have you got a spare uSD card...? Download and install an alternative image (a standalone music player or, even better, Raspberry Pi OS (previously called Raspbian) and give it a test https://www.raspberrypi.org/downloads/
Reply
#13
@McFly

MoodeOS uses the underlying Raspberry Pi OS WiFi subsystem with no modification so CallMeMike's suggestion that you try with plain Raspberry Pi OS is a good one.

I'm a little dubious there's a problem with your onboard WiFi transceiver but certainly trying an external adapter would be a check.

Alternatively, if you are confident using the Linux command line you can try this on your ethernet-connected moOde player:

1. log into the moOde command line using either the built-in Web SSH Terminal or ssh from another computer.

2. kill the running wpa_supplicant processes: 

Code:
sudo killall wpa_supplicant

3. start the wpa_supplicant process from the command line  [ETA: both here and in step 5---depending on which monitor, orientation,  and browser, this line may be folded into two with a line break between the '-' and the 'c'. This is not real.]

Code:
sudo wpa_supplicant -Dnl80211,wext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

4. examine the scrolling output

5. kill the running wpa_supplicant process with a ^C.

Here's what I get with the correct SSID/PW credentials for my access point (I have edited out the real SSID and MAC address):

Code:
pi@moode:~ $ sudo wpa_supplicant -Dnl80211,wext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: Trying to associate with SSID 'MyAP'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
wlan0: Trying to associate with SSID 'MyAP'
wlan0: Associated with 48:5d:36:xx:xx:xx
wlan0: CTRL-EVENT-CONNECTED - Connection to 48:5d:36:xx:xx:xx completed [id=0 id_str=]
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US

The key phrase is "Connection to xxxxxxx completed".

Here's what I get for a correct SSID and incorrect PW (I killed the process after several interations):

Code:
pi@moode:~ $ sudo wpa_supplicant -Dnl80211,wext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: Trying to associate with SSID 'MyAP'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=48:5d:36:xx:xx:xx status_code=16
wlan0: Trying to associate with SSID 'MyAP'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=48:5d:36:xx:xx:xx status_code=16
wlan0: Trying to associate with SSID 'MyAP'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=48:5d:36:xx:xx:xx status_code=16
wlan0: Trying to associate with SSID 'MyAP'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=48:5d:36:xx:xx:xx status_code=16
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MyAP" auth_failures=1 duration=10 reason=CONN_FAILED
wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="Phyllis"
wlan0: Trying to associate with SSID 'MyAP'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=48:5d:36:xx:xx:xx status_code=16
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MyAP" auth_failures=2 duration=23 reason=CONN_FAILED
qwlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="MyAP"
wlan0: Trying to associate with SSID 'MyAP'
^C

The key phrases are obvious.

Don't forget to reboot when you're done just for good measure.

Good luck.

Regards,
Kent
Reply
#14
I didn't know those diagnostics were available. Thats a great find :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#15
(10-08-2020, 02:26 PM)Tim Curtis Wrote: I didn't know those diagnostics were available. Thats a great find :-)

It's also possible to start wpa_supplicant in the foreground with debugging enabled---but you can hardly see the forest for the trees if you do. 

As well, it is possible to start it as a system service with logging to /var/log/syslog or elsewhere enabled---but this depends on wpa_supplicant being compiled with certain flags and I don't know if "ours" is. Besides, it isn't necessary for this one-off test.

The RPi with Raspberry Pi OS is a piece of cake compared with some SBCs I've wrestled with in the past.

Regards,
Kent
Reply
#16
So I tried it now, still not working. Something not configured well? I enabled debuging, if thats a concern.


Attached Files Thumbnail(s)
   
Reply
#17
@McFly

I have no idea why the WiFi subsystem is trying to initialize the peer-to-peer interface (p2p-dev-wlan0). This is only for "WiFi Direct" usage, not for connecting a WiFi "station" (your moOde player) to an WiFi access point. I've never seen this in my systems. It'll take a little time to figure out how you got here.

It's curious that your screenshot shows no wpa_supplicant process was running when you started this exercise. Do you see any relevant error messages in the logs, such as in /var/log/syslog, or in the output from the dmesg command?

It's also curious that your screenshot shows a line break in the middle of the command I suggested even though there's no comparable break in the subsequent lines which would suggest it is just line wrapping. I have to guess it was entered correctly because there's no error message of the form

Code:
Failed to open config file '/etc/wpa_supplicant/wp', error: No such file or directory
Failed to read or parse configuration '/etc/wpa_supplicant/wp'

You might try the command again for good measure, making sure that the entire command is entered as one line.

How about some background information:

Is this a vanilla install of the latest moOde iso? Other than making selections in the moOdeUI menus have you made any changes to it, say from the command line? What is your access point/router---make and model? When you are configuring the WiFi interface, does the scan function show your AP SSID in the results or are you entering the SSID manually?

Instead of a screenshot, how about attaching the entire text of the System Information output? You can generate this output from the command line with

Code:
moodeutl -s

(yes, it's long.)

Also, attach the contents of the file /etc/wpa_supplicant.conf. It's autogenerated by moOde so this is just a check.

Here's an example from my player (with the AP SSID edited and the psk obscured):

Code:
pi@moode:~ $ cat /etc/wpa_supplicant/wpa_supplicant.conf
#########################################
# This file is automatically generated by
# the player Network configuration page.
#########################################

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="MyAP"
scan_ssid=1
psk=5d3eeae34c0616d09ce5e1<my obscured psk>24e71a10fd212489cdc7eb887
}

Like I said, this may take a little time to sort.

Regards,
Kent

PS - before anyone asks, I can infer that you have not disabled the internal WiFi adapter from the wpa_supplicant output.
Reply
#18
Thanks for all that input and help!  

Ok now, just did a fresh install of the latest moode on the sd card.  

Reseted the router to factory and just modified password and SSID like it was before.  Tried again the regular wi-fi setup and it worked the second time!  why it did not work the first one, I can't tell.  

I guess it was something with the router?  

Glad we did not have to go tru the long road ;Wink Thanks again!
Reply
#19
Having the same issue as McFly, any fix on this problem?
Works while linked - but not on WiFi.
Front end developer at Fornye.no (Based in Oslo, Norway)
Reply
#20
(10-10-2020, 11:29 PM)McFly Wrote: Thanks for all that input and help!  

Ok now, just did a fresh install of the latest moode on the sd card.  

Reseted the router to factory and just modified password and SSID like it was before.  Tried again the regular wi-fi setup and it worked the second time!  why it did not work the first one, I can't tell.  

I guess it was something with the router?  

Glad we did not have to go tru the long road ;Wink Thanks again!

Hey McFly,

I did a fresh install of moode on SD, reset router to factory and modified PW / SSID - but still i can't connect via WiFi.
Any ideas?
Front end developer at Fornye.no (Based in Oslo, Norway)
Reply


Forum Jump: