Thank you for your donation!


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


Problem with wpa2
#1
Hello.

Firstly thanks for all of the work on moode, it’s epic.

I’ve just setup a clean install of moode 7.6.1 on a pi zero w 2. All is fine except when I try to configure wlan access. The scan detects my AP and I enter the wpa2 credentials. I can these are hashed when I save them. However on reboot the pi doesn’t connect to my AP. 

Is this a known issue with any fixes? 

Kristian
Reply
#2
After reboot and failure to connect plug in an Ethernet cable and post the Moode startup log.

Code:
moodeutl -l
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(12-24-2021, 02:36 PM)Tim Curtis Wrote: After reboot and failure to connect plug in an Ethernet cable and post the Moode startup log.

Code:
moodeutl -l

Cheers Tim,

This is where we end up before wireless AP  mode starts:

20211217 171644 worker: wlan0 wait 44 for IP address
20211217 171646 worker: wlan0 no IP addr for SSID
Reply
#4
(12-24-2021, 03:57 PM)phorize Wrote:
(12-24-2021, 02:36 PM)Tim Curtis Wrote: After reboot and failure to connect plug in an Ethernet cable and post the Moode startup log.

Code:
moodeutl -l

Cheers Tim,

This is where we end up before wireless AP  mode starts:

20211217 171644 worker: wlan0 wait 44 for IP address
20211217 171646 worker: wlan0 no IP addr for SSID

I'm attempting connection to a DHCP server on a pfsense router via a ubiquiti AP. It doesnt have issues with other devices.
Reply
#5
Post the entire log.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
20211217 194059 worker: -- Start
20211217 194059 worker: Successfully daemonized
20211217 194059 worker: Integrity check (passed)
20211217 194100 worker: File check (OK)
20211217 194100 worker: Session vacuumed
20211217 194100 worker: Session loaded
20211217 194100 worker: Debug logging (OFF)
20211217 194100 worker: -- Audio debug
20211217 194100 worker: ALSA cards: (0:b1 | 1:empty | 2:empty | 3:empty
20211217 194100 worker: MPD config: (0Tonguei HDMI 1 | mixerSadHDMI) | card:0)
20211217 194100 worker: ALSA mixer actual (HDMI)
20211217 194101 worker: ALSA HDMI volume set to (0%)
20211217 194101 worker: -- System
20211217 194102 worker: Host (moode-zero)
20211217 194103 worker: moOde (7.6.1 2021-12-17)
20211217 194103 worker: RaspiOS (10.6)
20211217 194103 worker: Kernel (5.4.77-v7+ #1371)
20211217 194103 worker: Platform (Pi-Zero 2 W 1.0 512MB)
20211217 194103 worker: ARM arch (armv7l, 32-bit kernel)
20211217 194103 worker: MPD ver (0.23.4_p0x3)
20211217 194103 worker: CPU gov (ondemand)
20211217 194103 worker: USB boot not available
20211217 194103 worker: File system expanded
20211217 194103 worker: HDMI port off
20211217 194103 worker: -- Network
20211217 194103 worker: IP address check timeout (90 secs)
20211217 194103 worker: eth0 adapter does not exist
20211217 194103 worker: eth0 address not assigned
20211217 194103 worker: wlan0 adapter exists
20211217 194103 worker: wifi country (GB)
20211217 194103 worker: wlan0 trying SSID
20211217 194103 worker: wlan0 wait 0 for IP address
20211217 194105 worker: wlan0 wait 1 for IP address
20211217 194107 worker: wlan0 wait 2 for IP address
20211217 194109 worker: wlan0 wait 3 for IP address
20211217 194111 worker: wlan0 wait 4 for IP address
20211217 194113 worker: wlan0 wait 5 for IP address
20211217 194115 worker: wlan0 wait 6 for IP address
20211217 194117 worker: wlan0 wait 7 for IP address
20211217 194119 worker: wlan0 wait 8 for IP address
20211217 194121 worker: wlan0 wait 9 for IP address
20211217 194123 worker: wlan0 wait 10 for IP address
20211217 194125 worker: wlan0 wait 11 for IP address
20211217 194127 worker: wlan0 wait 12 for IP address
20211217 194130 worker: wlan0 wait 13 for IP address
20211217 194132 worker: wlan0 wait 14 for IP address
20211217 194134 worker: wlan0 wait 15 for IP address
20211217 194136 worker: wlan0 wait 16 for IP address
20211217 194138 worker: wlan0 wait 17 for IP address
20211217 194140 worker: wlan0 wait 18 for IP address
20211217 194142 worker: wlan0 wait 19 for IP address
20211217 194144 worker: wlan0 wait 20 for IP address
20211217 194146 worker: wlan0 wait 21 for IP address
20211217 194148 worker: wlan0 wait 22 for IP address
20211217 194150 worker: wlan0 wait 23 for IP address
20211217 194152 worker: wlan0 wait 24 for IP address
20211217 194154 worker: wlan0 wait 25 for IP address
20211217 194156 worker: wlan0 wait 26 for IP address
20211217 194158 worker: wlan0 wait 27 for IP address
20211217 194200 worker: wlan0 wait 28 for IP address
20211217 194202 worker: wlan0 wait 29 for IP address
20211217 194205 worker: wlan0 wait 30 for IP address
20211217 194207 worker: wlan0 wait 31 for IP address
20211217 194209 worker: wlan0 wait 32 for IP address
20211217 194211 worker: wlan0 wait 33 for IP address
20211217 194213 worker: wlan0 wait 34 for IP address
20211217 194215 worker: wlan0 wait 35 for IP address
20211217 194217 worker: wlan0 wait 36 for IP address
20211217 194219 worker: wlan0 wait 37 for IP address
20211217 194221 worker: wlan0 wait 38 for IP address
20211217 194223 worker: wlan0 wait 39 for IP address
20211217 194225 worker: wlan0 wait 40 for IP address
20211217 194227 worker: wlan0 wait 41 for IP address
20211217 194229 worker: wlan0 wait 42 for IP address
20211217 194231 worker: wlan0 wait 43 for IP address
20211217 194233 worker: wlan0 wait 44 for IP address
20211217 194235 worker: wlan0 no IP addr for SSID
20211217 194235 worker: wlan0 AP mode started
20211217 194308 worker: wlan0 wait 0 for IP address
20211217 194310 worker: wlan0 wait 1 for IP address
20211217 194312 worker: wlan0 wait 2 for IP address
20211217 194314 worker: IP addr (172.24.1.1)
20211217 194314 worker: Netmask (255.255.255.0)
20211217 194314 worker: Gateway (0.0.0.0)
20211217 194314 worker: Pri DNS (127.0.0.1)
20211217 194314 worker: Domain (None)
20211217 194314 worker: Pi integrated wlan0 power save disabled
20211217 194314 worker: -- Audio config
20211217 194314 worker: MPD conf update skipped (USB device)
20211217 194314 worker: ALSA card number (0)
20211217 194314 worker: MPD audio output (Pi HDMI 1)
20211217 194315 worker: Audio formats (U8, S16_LE)
20211217 194315 worker: ALSA mixer name (HDMI)
20211217 194315 worker: MPD mixer type (software)
20211217 194315 worker: Hdwr volume controller exists
20211217 194315 worker: Max ALSA volume (100%)
20211217 194315 worker: ALSA output mode (Default: plughw)
20211217 194315 worker: ALSA loopback (Off)
20211217 194315 worker: Reset renderer active flags
20211217 194315 worker: CamillaDSP (off)
20211217 194315 worker: -- MPD startup
20211217 194315 worker: MPD started
20211217 194315 worker: MPD accepting connections
20211217 194315 worker: MPD output 1 ALSA Default (on)
20211217 194315 worker: MPD output 2 ALSA Bluetooth (off)
20211217 194315 worker: MPD output 3 HTTP Server (off)
20211217 194315 worker: MPD crossfade (off)
20211217 194316 worker: MPD ignore CUE files (yes)
20211217 194316 worker: -- Feature availability
20211217 194316 worker: Source select (available)
20211217 194316 worker: Source select (source: MPD)
20211217 194316 worker: Source select (output: Pi HDMI 1)
20211217 194316 worker: Bluetooth (available)
20211217 194316 worker: Airplay renderer (available)
20211217 194316 worker: Spotify renderer (available)
20211217 194316 worker: Squeezelite (available)
20211217 194316 worker: RoonBridge renderer (not installed)
20211217 194316 worker: Multiroom sender (available)
20211217 194316 worker: Multiroom receiver (available)
20211217 194316 worker: UPnP renderer (available)
20211217 194316 worker: DLNA server (available)
20211217 194316 worker: UPnP browser (available)
20211217 194316 worker: GPIO button handler (available)
20211217 194316 worker: Stream recorder (n/a)
20211217 194316 worker: -- Music sources
20211217 194316 worker: USB sources (none attached)
20211217 194316 worker: NAS and UPnP sources (none configured)
20211217 194316 worker: -- Other
20211217 194316 worker: USB volume knob (Off)
20211217 194316 worker: Shellinabox SSH started
20211217 194316 worker: USB auto-mounter (udisks-glue)
20211217 194316 worker: LED0 (Off)
20211217 194316 worker: LED1 (sysclass does not exist)
20211217 194316 worker: Saved MPD vol level (0)
20211217 194316 worker: Preamp volume level (0)
20211217 194316 worker: MPD volume level (0) restored
20211217 194316 worker: ALSA HDMI volume (96%)
20211217 194316 worker: Auto-play (Off)
20211217 194316 worker: Maintenance interval (3 hours)
20211217 194316 worker: Screen saver activation (Never)
20211217 194316 worker: Session permissions (OK)
20211217 194316 worker: Watchdog started
20211217 194316 worker: Ready
20211217 195648 worker: Job shellinabox
20211217 202509 worker: Job shellinabox
Reply
#7
(12-24-2021, 04:58 PM)phorize Wrote: ...
20211217 194231 worker: wlan0 wait 43 for IP address
20211217 194233 worker: wlan0 wait 44 for IP address
20211217 194235 worker: wlan0 no IP addr for SSID
20211217 194235 worker: wlan0 AP mode started
20211217 194308 worker: wlan0 wait 0 for IP address
20211217 194310 worker: wlan0 wait 1 for IP address
20211217 194312 worker: wlan0 wait 2 for IP address
20211217 194314 worker: IP addr (172.24.1.1)
20211217 194314 worker: Netmask (255.255.255.0)
20211217 194314 worker: Gateway (0.0.0.0)
20211217 194314 worker: Pri DNS (127.0.0.1)
20211217 194314 worker: Domain  (None)
20211217 194314 worker: Pi integrated wlan0 power save disabled
...

This is exactly the response I would expect if
 
  • no AP with the given SSID responds (because, say, an incorrect SSID was entered manually), or
  • an AP with the given SSID responds but it doesn't agree with the 256-bit psk it receives from moOde (because, say, an incorrect passphrase---aka password---wsa entered)
  • an AP with the given SSID responds but, based on a complicated handshake performed during association, it doesn't agree that it and moOde are using the same 256-bit psk (because, say, an incorrect passphrase---aka password---was entered in moOde).
You can prove this to yourself with 15 minutes of experimentation since in either case moOde eventually reverts to AP mode and, hence, can still be connected to wirelessly.

A note about WiFi language: what moOde and many other software systems call the password is a passphrase in Wifi parlance. It plays no role in the actual Wireless Protected Access (WPA) exchanges. Rather it is a human-readable string from which the 256-bit pre-shared key (psk) can be computed using the SSID as a salt value and running an agreed algorithm. It is this psk which is stored and exchanged used for data exchanges between WiFi clients/APs. [see, for example, https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access]

The 256-bit psk is frequently shown in its hexadecimal form as a string of 64 hexadecimal digits. It is this hex string which is displayed in the moOde Password window after "save" is clicked. Just like the passphrase, the psk should never be published/posted/left in a github repo, etc.

You can check the psk calculation for yourself using the Linux command wpa_passphrase. Refer to its man page.

Made-up example:

AP SSID: Whoville
passphrase: You're a mean one, Mister Grinch

Code:
kreed@T520:~$ wpa_passphrase Whoville "You're a mean one, Mister Grinch"
network={
    ssid="Whoville"
    #psk="You're a mean one, Mister Grinch"
    psk=cee88f2390c75cbd7e3cbc8c81f9ebe83ec8009f97fd19981c0bbb58d5aa1cea

This 64-character psk value should be the same as the "password" value displayed in moOde after saving. 

Note that the quotation marks are not part of my whimsical passphrase value just as they aren't part of my ssid value. However, a quotation mark is a legal character in passphrases. AFAICT, these days the net-config.php code in moOde correctly deals with spaces and punctuation marks.

Regards,
Kent
Reply
#8
I'd also check the Router WiFi logs to see if the association was successful and if so then why no DHCP address was delivered. If the association failed then the logs should print some sort of reason which is typically something like bad SSID or password.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
Thanks @Tim Curtis and @TheOldPresbyope

The DHCP log on pfsense isn't showing any connection attempts from the p mac address, so I'm assuming its my ubiquiti ap that is refusing the connection. I checked /etc/wpa_supplicant.conf against the output of wpa_passphrase and its all correct. Having trouble getting logs from the wireless AP ATM, but coincidentally I had a very similar issue with the debian 11 text installer with teh same AP and ended up having to use ethernet to install on a laptop.
Reply
#10
@phorize

Once you installed debian 11 on your laptop were you able to get it connected to the Ubiquiti AP via WiFi? If so, that could be a useful vehicle for exploring why your moOde player isn't. RaspiOS is essentially debian with a smattering of RPi-specific code and there's nothing special about its networking subsystem.

Regards,
Kent
Reply


Forum Jump: