You can’t connect to a Wi-Fi directly if it’s SSID has any non-ASCII characters on Raspbian in GUI mode. For example, if your Wi-Fi’s SSID is 开源大法好1234, run the following command you will see this:

$ sudo iw wlan0 scan | grep 1234
     SSID: \xe5\xbc\x80\xe6\xba\x90\xe5\xa4\xa7\xe6\xb3\x95\xe5\xa5\xbd1234

Next, we can write this string to a file with Python3:

ssid = b'\xe5\xbc\x80\xe6\xba\x90\xe5\xa4\xa7\xe6\xb3\x95\xe5\xa5\xbd1234'
with open('ssid', 'wb') as file:

Then using xxd to convert it to hex dump:

$ xxd -p ssid

Finally, copy this hex string to /etc/wpa_supplicant/wpa_supplicant.conf without the quotation mark.


You can simply type the SSID to /boot/wpa_supplicant.conf inside the quotation marks, it works. I have tried this before but didn’t notice it failed because the SD card was dead.

Read more