Thank you for your donation!


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


Solved: 6.2 cant turn off AP mode and join wireless network
#11
(10-06-2019, 11:59 PM)TheOldPresbyope Wrote: I believe almost every printable character is legal in an SSID and so should be acceptable to wpa_passphrase. I’m on a road trip and have no convenient way to look at moOde sources ATM but might this instead be a shell script problem? Backtick is a special character in bash.

Regards,
Kent

Very possible - I don't have a problem using this SSID with any other device in my house, and I have some pretty oddball stuff.  I bet I could manually configure it to work but don't want to do something that might break updates.  Much easier to just use Ethernet for now.
Reply
#12
It looks like the wpa_passphrase utility hangs waiting for input if special characters for example back-quotes are not escaped. Same for embedded double quotes because moOde's use of the utility encloses the SSID and password in double quotes to cover embedded spaces and single quotes.

wpa_passphrase "SSID" "PASSWORD"

There is prolly a PHP function to perform escaping on the strings.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#13
...wondering if there’s a way to inject escape characters into the SSID field in wpa_passphrase or the Moode GUI to prevent this...

Sort of like abc\’def for SSID abc’def. I guess it depends on how the input is parsed.

I’ll give it a shot when I have some time.
Reply
#14
Yes, I think escaping does work in wpa_passphrase.

In moOde code I would prolly need to use the PHP function addslashes.
https://www.php.net/manual/en/function.addcslashes.php

Look in the source files below for wpa_passphrase. You only need to edit the lines in net-config.php to test whether addslashes() works for your password that has the back tick.

/var/www/net-config.php
/var/www/inc/playerlib.php
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#15
I have a similar problem.
Regardless of what is saved for the SSID name in the setup screen, when I run the command
Code:
wpa_passphrase SSID password

The result is always similar to:

Network={
    ssid="SSID"
    #psk="password"
    psk=2f6a0beddf2f0588ee426b0c3a0e3d9a523bb07a05cb857f85d826da80fa75c4
}

ssid always =SSID

Suggestions please
If it ain't broke fix it until it is.
Reply
#16
Sorry, I should have said SSID does not have strange characters just Barney and that is retained correctly in the setup screen
If it ain't broke fix it until it is.
Reply


Forum Jump: