Thank you for your donation!


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


Problem: wpa_suplicant not started automatically
#1
Hi all,
I have been struggling setting up Moode 6.4 on my Raspberry Zero W
The problem is that WiFi is not connected and I have tried creating a wpa_supplicant.conf but it does not fix it.
I tried to configure with

Code:
$ sudo raspi-config
But when trying to access the wireless configuration it throws an error message "Could not communicate with wpa_supplicant"
Then I tried

Code:
$ wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0
And then it connects to wireless!
There is something avoiding wpa_supplicant to start on boot but it does work when manually launching it.
Any help?
Thanks
Luis
Reply
#2
@luisrosety

You need to read and follow the Setup Guide. Here's the link, which is prominently displayed on the moodeaudio.org homepage: https://github.com/moode-player/moode/bl.../setup.txt

In a nutshell:

Start with a clean copy of moOde on a uSD card and boot your RPi0W. It will come up in AP mode. 

If you prefer to have it come up in WiFi client mode, you'll have to create a moodecfg.txt file in the /root directory of the uSD card with appropriate info in it. Again, read and follow the Setup Guide.

Regards,
Kent
Reply
#3
(12-26-2019, 11:27 PM)TheOldPresbyope Wrote: @luisrosety

You need to read and follow the Setup Guide. Here's the link, which is prominently displayed on the moodeaudio.org homepage: https://github.com/moode-player/moode/bl.../setup.txt

In a nutshell:

Start with a clean copy of moOde on a uSD card and boot your RPi0W. It will come up in AP mode. 

If you prefer to have it come up in WiFi client mode, you'll have to create a moodecfg.txt file in the /root directory of the uSD card with appropriate info in it. Again, read and follow the Setup Guide.

Regards,
Kent

I have followed the instructions but no results.
I find this configuration procedure non easily customizable when some changes need starting from a clean non used SD card.
In any case, my WiFi settings on http://moode configuration menu, show correct values so I find it strange it is not working.
Finally, I really can't understand the added value of configuring the Raspberry Pi as Access Point since for using it one must turn on WiFi on the mobile phone or computer but once you are connected to your home WiFi you have direct access to http://moode server. So, why is that AP for?
In any case, thanks for your explanation.
Reply
#4
AP mode is primarily used to configure a Home network SSID and password. It eliminates the need for users to have to hack in via SSH (most users don't know SSH). AP mode takes a couple of minutes to start on the slower single core ZeroW. If it's not working in your case on a stock image then the issue is external to moOde software.

Also, hacking the wpa_supplicant.conf file will not work because moOde manages it via the Network Config screen which writes out the file and updates a SQL table with the settings. If you want to manually set Home network SSID and password the moodecfg.txt file method must be used.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
I am facing the same issue on 6.4.2 2020-02-12
I am using a raspberry pi 2 and an WIFI USB Dongle which is working fine on every other Rasbian-based system on the very same pi so far.

I followed (https://github.com/moode-player/moode/bl.../setup.txt)
Code:
1. CONFIGURE FOR WIFI CONNECTION   
  - Ethernet mode
   a) Leave eth cable connected
   b) Insert wifi adapter (while Pi running)
   c) http://moode
   d) Menu, Configure, Network
   e) Configure a wifi connection
   f) Menu, Restart, Shutdown
   g) Unplug eth cable
   h) Power on



Without success. 
I am able to find my own wifi (step d) and was entering the correct key.
Restarting the Pi will not automatically connect to my wifi, most likely due the issue with wpa_supplicant.
Reply
#6
There is not generally an issue with wpa_supplicant. A more appropriate title for this thread would have been "I can't get moOde to come up in WiFi client mode". In any case, you really should have started a new thread of your own.

I expect you aren't entering a key but a passphrase (aka password) which is converted into a pre-shared key (PSK) after it is entered. Once you've entered the passphrase, and saved the settings, the computed PSK will be revealed when you click on the eye icon.

moOde's WiFi configuration panel has worked fine for me in all my test cases. Tim did recently fix a bug which bit when MS/Windows line-ends occur in the moodecfg.txt, but that was unrelated to the configuration panel.

Caveat: I live in the USA and use only ASCII characters in my passphrase.

The IEEE spec for WPA2 says

Quote:Each character in the passphrase must have an encoding in the range of 32 to 126 (decimal), inclusive. (IEEE Std. 802.11i-2004, Annex H.4.1)

Does your passphrase by any chance contain non-ASCII characters, perhaps with diacritics such as umlaut, acute, grave, circumflex, diaresis, tilde, cedilla? I ask because some routers ignore the IEEE requirement but some software does not, and diacritics occur frequently in a number of Latin-script alphabets. I have no way of testing this since my AP strictly conforms to the spec.

If your passphrase is strictly ASCII and between 8 and 63 characters long then we have more digging to do to figure out why you player isn't associating with your AP.

Regards,
Kent
Reply
#7
Hi. I mainly wanted to confirm this issue, which still seems to be unfixed in verison. 6.5.2 2020-05-03

Quote:A more appropriate title for this thread would have been "I can't get moOde to come up in WiFi client mode"

I agree. It seems to be the essential issue.

Quote:I expect you aren't entering a key but a passphrase (aka password) which is converted into a pre-shared key (PSK) after it is entered. 

Yes, this is correct, but matters very little from the users perspective. What I was entering was the passphrase.


Quote:Does your passphrase by any chance contain non-ASCII characters

No. It does not. My passphrase only contains numbers. Way more than 8, way less than 63

Quote:If your passphrase is strictly ASCII and between 8 and 63 characters long then we have more digging to do to figure out why you player isn't associating with your AP.

That is the case. More digging it is. Here is what I was doing step by step, as verbose as I seem necessary
  • loading the image from http://moodeaudio.org/
  • unzip
  • flash using etcher on an 8gb micro sd card
  • put the sd card in the RPi2
  • put the ethernet cable
  • put power
  • following: https://github.com/moode-player/moode/bl.../setup.txt
  • http://moode
  • ignore all the audio setup for now
  • Menu, Configure, System
  • b) Select appropriate timezone then SET
  • Expand Storage and reboot (still with ethernet plugged)
  • Leave ethernet connected
  • Insert wifi adapter (while Pi running)
  • Menu, Configure, Network
  • Scan for SSID
  • Find my own SSID in the network
  • Select WPA/WPA2 personal
  • Enter the correct passphrase
  • Set the country to Germany
  • Hit Save
  • Shutdow
  • Remove the ethernet cable
  • Plug and unplug the power to boot it up
  • Cannot access http://moot, neither does my router find a new network device
  • plugin the ethernet again
  • can access http://moot again
  • Go to network
  • under "Address assignment" the message "Unable to activate AP mode" is shown.
  • no wifi connection
I am using a Raspberry Pi 2 and a TPLink tl-wn725n wifi usb device which is generally well supported on various Raspberry Pi systems and Linux distributions https://www.tp-link.com/us/support/download/tl-wn725n/
Reply
#8
Doesn't look like linux support is all that great based on the support link you provided but in any case you can try MrEngman's nice WiFi driver install service.

Run the command below to print out the help (-h), then either run it with -c (check if driver available) or run it with no options and it will try to find and install the kernel-specific driver for WiFi adapter thats plugged in.

If it fixes your issue then just remember to run it whenever the kernel is updated.

Code:
pi@rp3:~ $ sudo install-wifi -h

*** Raspberry Pi wifi driver installer by MrEngman.
*** Performing self-update
*** Relaunching after update

*** Raspberry Pi wifi driver installer by MrEngman.
#
# usage:
#
# sudo install-wifi [[-h | --help] |
#               [-c | --check [driver] [rpi-update | commit_id]] |
#               [-u | --update [driver] [rpi-update | commit_id]] |
#               [driver [rpi-update | commit_id]]]
#
# options:
#  none - install the driver for the wifi module connected to the Pi for the currently running kernel.
#
# -h|--help  - display usage.
#
# -c|--check [driver] [option]  - check if a driver is available, does not install it.
#                        driver - specific driver to check for, one of: 8188eu, 8188fu, 8192eu, 8812au, 8822bu, mt7610 or mt7612
#       [option]:-        blank - check driver for currently running kernel
#                    rpi-update - check driver for latest version of rpi-update
#                     commit-id - check driver for specific commit-id of rpi-update
#
# -u|--update [driver] [option] - update/install driver, can be used after running, but before rebooting, rpi-update
#                                 to update the driver to the one needed for the new kernel installed by rpi-update.
#                        driver - specific driver to update/install, one of: 8188eu, 8188fu, 8192eu, 8812au, 8822bu, mt7610 or mt7612
#       [option]:-        blank - update/install driver for currently running kernel
#                    rpi-update - update/install driver for latest version of rpi-update
#                     commit-id - update/install driver for specific commit-id of rpi-update
#
# driver [option] - install specific driver, enables installing the driver for a module not currently connected to
#                   the Pi, or installing a driver for a different module if you want to change your wifi module.
#                        driver - specific driver to install, one of: 8188eu, 8188fu, 8192eu, 8812au, 8822bu, mt7610 or mt7612
#       [option]:-        blank - update/install driver for currently running kernel
#                    rpi-update - update/install driver for latest version of rpi-update
#                     commit-id - update/install driver for specific commit-id of rpi-update
#
Press any key to continue...

#
# install-wifi examples:
#
#   Install/update the wifi driver for the wifi module connected to the Pi for the currently running kernel
#
#       sudo install-wifi
#
#   If you want to change your wifi module to one using a different driver that is compatible with this script
#   you can install the driver for the new wifi module, one of: 8188eu, 8188fu, 8192eu, 8812au, 8822bu, mt7610 or mt7612
#   In this example it will install the 8192eu wifi module driver. After installing the driver shutdown the
#   Pi, remove the currently connected wifi module and connect the new 8192eu wifi module and restart your Pi
#   and it should start up with the new wifi adapter connected to your network.
#
#       sudo install-wifi 8192eu - this will install the 8192eu module for the current kernel
#
#   if you want to run rpi-update, first check a driver is available before you update your code. If the check
#   indicates a driver is available run rpi-update to update the firmware/kernel and then before rebooting
#   update the wifi driver.
#
#       sudo install-wifi -c rpi-update - check for driver if rpi-update is run.
#       sudo rpi-update                 - if a driver is available you can run rpi-update to update firmware.
#       sudo install-wifi -u rpi-update - then update the driver for the new kernel installed by rpi-update.
#       sudo reboot                     - now reboot to update the kernel with the new wifi driver.
#
#   if you want to run, say rpi-update b2f6c103e5 to install 3.18.7+ #755, first check a driver is available
#   before you update your code. Then, if a driver is available update the code, and then before rebooting
#   update the wifi driver.
#
#       sudo install-wifi -c b2f6c103e5 - check for driver if rpi-update b2f6c103e5 is run to install kernel 3.18.7+ #755.
#       sudo rpi-update b2f6c103e5      - if a driver is available you can run rpi-update b2f6c103e5 to update firmware.
#       sudo install-wifi -u b2f6c103e5 - then update the driver for the new kernel installed by rpi-update b2f6c103e5.
#       sudo reboot                     - now reboot to update the kernel with the new wifi driver.
#
#   and finally, you can change the wifi module you are using and install the new driver for it as well as
#   running rpi-update to update the kernel, and assuming in this example the new adapter uses the 8812au
#   driver, using something like:
#
#       sudo install-wifi -c 8812au rpi-update - check for 8812au driver if rpi-update is run.
#       sudo rpi-update                        - if a driver is available you can run rpi-update to update firmware.
#       sudo install-wifi -u 8812au rpi-update - install the 8812au driver for the new kernel installed by rpi-update.
#       sudo halt                              - shutdown the Pi, replace the wifi adapter with the 8812au wifi adapter.
#                                              - restart the Pi with the new kernel and new 8812au wifi module.
#
pi@rp3:~ $
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
Even with the correct driver and firmware, that model WiFi adapter may not be able to run in access-point mode using hostapd. May be time to buy a different adapter. 

Regards,
Kent
Reply


Forum Jump: