You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot use a WiFi name with an apostrophe in it #2918
Describe the bug
The Pi cannot connect to a WiFi SSID with an apostrophe in the name.
To reproduce
Have a WiFi SSID with an apostrophe in the name (for example Jim's iPhone. the default personal hotspot name on my iPhone).
Try to connect to this.
Expected behaviour
The WiFi name should appear correctly and the Pi should be able to connect to it.
Actual behaviour
The WiFi name appears wrong in the SSID list, with the apostrophe replaced with \342\200\231.
After entering the password for this WiFi connection, an error pops up saying Invalid Argument and a connection cannot be made.
System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
P13B+
Which OS and version (cat /etc/rpi-issue)?
Raspberry Pi reference 2018-11-13
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7e0c786c641ba15990b5662f092c106beed40c9f, stage5
Which firmware version (vcgencmd version)?
Raspberry Pi reference 2018-11-13
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7e0c786c641ba15990b5662f092c106beed40c9f, stage5
There's no RFC for which characters can be used in SSID's, but the recommendation appears to be to avoid special characters. Looks like we are not the only device that complains when apostrophes are used...! A quick Google will show quite a few issues elsewhere.
Hi, not sure what is the contributions policy but I'm willing to check this bug out. May I be assigned to the issue? Contact me if necessary carmeli.tamir@gmail.com
@jimbobbennett It appears that there will be a possible fix for this in tonight apt update. So if you could update tomorrow using sudo apt update, sudo apt upgrade and retest and provide results that would be most excellent.
I suspect the wrong display is due to the AP rendering the apostrophe in Unicode, which the plugin / dhcpcd doesn't support. If the OP could confirm how the SSID name appears (and what it should be), I can pass this on to the author of dhcpcd.
(I suspect the AP name includes a ` rather than a standard ' apostrophe - that quite often gets rendered badly.)
Right, so that's E2 80 99 in hex, which is the Unicode for a "right single quotation mark". That's an extended character set symbol - the apostrophe is 27 in hex in Unicode. They look similar, but are not the same character.
iOS is using a bad character in the SSID name - that's not something which can be fixed without adding full Unicode support to the SSID parser, which is a non-trivial job. I'm pointing the finger of blame at Apple here... ;) I think this is a "wontfix" (or more accurately a "cantfix without a lot of work").
I guess the important thing here is fixed - users can connect a Pi to an iOS personal hotspot. Users savvy enough to do this should be ok to recognize their own hotspot if it has the name mangled around the apostrophe, so although it's not a perfect experience, it's not a show stopper.
That's progress. The remaining issue is a Unicode handling problem in the LXPanel plugin; that apostrophe isn't really an apostrophe (or so I've read), it's a single right quote which puts it into the Unicode character set.
The show-stopper bug in the octal parser is fixed; Unicode support hasn't been added to the dhcpcd code, but that isn't likely to happen in the short term. I think we can close this for now.
I added a WiFi SSID with the same apostrophie in my wpa_supplicant.conf (or in the advanced page of the RPi imaging software) and on first run, Raspberry Pi would not boot.
Removed "quiet" and "splash" from my cmdline.txt to see what the problem was, and sure enough there was an EOF error in my /boot/firstrun.sh file that was caused by the apostrophie in the SSID that I added to the wpa_supplicant. Seems like a pretty fatal bug, and thought it should be documented somewhere.
The physical behavior of the Pi is that it would boot normally, then power off after the splash screen with 10 short green light blinks indicating HALT state.
Failing to boot is a really annoying issue. I couldn't figure out why my Zero W wouldn't start or connect until I plugged in a monitor and keyboard. Saw the EOF -> HALT problem and ended up here. Since the device halts, if you're not actively looking at the boot sequence it's easy to miss the error and then be presented with a device that just powers off suddenly.
Perhaps the imager could alert that "an apostrophe in SSID will prevent the device from booting" or could disallow characters that will prevent the device from starting? It's not exactly a workaround for the problem, but maybe a little safety for what would be a nasty issue?
Activity
pelwell commentedon Apr 2, 2019
Does it work if you add the entry manually to wpa_supplicant.conf?
JamesH65 commentedon Apr 2, 2019
There's no RFC for which characters can be used in SSID's, but the recommendation appears to be to avoid special characters. Looks like we are not the only device that complains when apostrophes are used...! A quick Google will show quite a few issues elsewhere.
carmeli-tamir commentedon Apr 14, 2019
Hi, not sure what is the contributions policy but I'm willing to check this bug out. May I be assigned to the issue? Contact me if necessary carmeli.tamir@gmail.com
JamesH65 commentedon Sep 19, 2019
@carmeli-tamir Feel free to investigate and provide a PR if you get anywhere. No need to assign it.
JamesH65 commentedon Sep 19, 2019
@spl237 Is this in anyway related to that recent fix?
pelwell commentedon Sep 19, 2019
Yes - this is almost certainly a duplicate of #2883.
spl237 commentedon Sep 19, 2019
Three octal characters with the digit 2 in - yes, almost certainly the same bug!
spl237 commentedon Sep 19, 2019
Fix should be in apt by this evening if it isn't there already.
JamesH65 commentedon Sep 19, 2019
@jimbobbennett It appears that there will be a possible fix for this in tonight apt update. So if you could update tomorrow using
sudo apt update,sudo apt upgradeand retest and provide results that would be most excellent.jimbobbennett commentedon Sep 20, 2019
I can now connect. The WiFi SSID is still displayed wrong in the list, but I can successfully connect.
JamesH65 commentedon Sep 20, 2019
@spl237 One for you perhaps?
spl237 commentedon Sep 20, 2019
I suspect the wrong display is due to the AP rendering the apostrophe in Unicode, which the plugin / dhcpcd doesn't support. If the OP could confirm how the SSID name appears (and what it should be), I can pass this on to the author of dhcpcd.
(I suspect the AP name includes a ` rather than a standard ' apostrophe - that quite often gets rendered badly.)
jimbobbennett commentedon Sep 20, 2019
It's the same as in the original issue, the apostrophe is replaced with
\342\200\231.The original SSID is Jim's iPhone. I can't be sure what the ' character is as it's whatever iOS uses, but it looks like a standard apostrophe.
spl237 commentedon Sep 20, 2019
Right, so that's E2 80 99 in hex, which is the Unicode for a "right single quotation mark". That's an extended character set symbol - the apostrophe is 27 in hex in Unicode. They look similar, but are not the same character.
iOS is using a bad character in the SSID name - that's not something which can be fixed without adding full Unicode support to the SSID parser, which is a non-trivial job. I'm pointing the finger of blame at Apple here... ;) I think this is a "wontfix" (or more accurately a "cantfix without a lot of work").
jimbobbennett commentedon Sep 20, 2019
Damn you Tim Apple!!!!! 😜
jimbobbennett commentedon Sep 20, 2019
I guess the important thing here is fixed - users can connect a Pi to an iOS personal hotspot. Users savvy enough to do this should be ok to recognize their own hotspot if it has the name mangled around the apostrophe, so although it's not a perfect experience, it's not a show stopper.
Thanks @spl237
pelwell commentedon Sep 20, 2019
That's progress. The remaining issue is a Unicode handling problem in the LXPanel plugin; that apostrophe isn't really an apostrophe (or so I've read), it's a single right quote which puts it into the Unicode character set.
pelwell commentedon Sep 20, 2019
Apologies for the echo - it's one of the perils of patchy connectivity.
JamesH65 commentedon Feb 13, 2020
@spl Anything left for us to do, or can this be closed?
spl237 commentedon Feb 13, 2020
The show-stopper bug in the octal parser is fixed; Unicode support hasn't been added to the dhcpcd code, but that isn't likely to happen in the short term. I think we can close this for now.
JamesH65 commentedon Feb 13, 2020
Closing this issue as questions answered/issue resolved.
csz5024 commentedon Dec 1, 2022
Just wanted to add to this thread for posterity:
I added a WiFi SSID with the same apostrophie in my wpa_supplicant.conf (or in the advanced page of the RPi imaging software) and on first run, Raspberry Pi would not boot.
Removed "quiet" and "splash" from my cmdline.txt to see what the problem was, and sure enough there was an EOF error in my /boot/firstrun.sh file that was caused by the apostrophie in the SSID that I added to the wpa_supplicant. Seems like a pretty fatal bug, and thought it should be documented somewhere.
The physical behavior of the Pi is that it would boot normally, then power off after the splash screen with 10 short green light blinks indicating HALT state.
TLDR: Dont put apostrophies in your WiFi SSID.
pelwell commentedon Dec 1, 2022
I'm reminded of little Johnny Drop Tables: https://xkcd.com/327/
JosephCatrambone commentedon Dec 6, 2022
Failing to boot is a really annoying issue. I couldn't figure out why my Zero W wouldn't start or connect until I plugged in a monitor and keyboard. Saw the EOF -> HALT problem and ended up here. Since the device halts, if you're not actively looking at the boot sequence it's easy to miss the error and then be presented with a device that just powers off suddenly.
Perhaps the imager could alert that "an apostrophe in SSID will prevent the device from booting" or could disallow characters that will prevent the device from starting? It's not exactly a workaround for the problem, but maybe a little safety for what would be a nasty issue?