2

Running the latest download of Raspbian, trying to set up headless. I did the ssh file and wpa_supplicant.conf, but it didn't show up on the network.

So I've plugged it in with an ethernet cable, and ssh'd in to have a look. I tried to connect to the wifi with Raspi-config, but got errors communicating with wpa_supplicant. Opened wpa_supplicant with nano, and it was empty - which, fine, it wasn't when I copied it over, but ok. I copied the text back in and rebooted. It retained the content, but still doesn't connect.

SO I ran it manually, and got the following:

    pi@pi4:~ $ sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0
Successfully initialized wpa_supplicant
Line 1: unknown global field '{\rtf1\ansi\ansicpg1252\cocoartf2511'.
Line 1: Invalid configuration line '{\rtf1\ansi\ansicpg1252\cocoartf2511'.
Line 2: unknown global field '\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 ArialMT;\f1\fnil\fcharset0 Menlo-Regular;}'.
Line 2: Invalid configuration line '\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 ArialMT;\f1\fnil\fcharset0 Menlo-Regular;}'.
Line 3: unknown global field '{\colortbl;\red255\green255\blue255;\red67\green67\blue67;\red249\green249\blue249;\red27\green29\blue31;'.
Line 3: Invalid configuration line '{\colortbl;\red255\green255\blue255;\red67\green67\blue67;\red249\green249\blue249;\red27\green29\blue31;'.
Line 4: unknown global field '\red235\green236\blue237;\red27\green29\blue31;\red235\green236\blue237;}'.
Line 4: Invalid configuration line '\red235\green236\blue237;\red27\green29\blue31;\red235\green236\blue237;}'.
Line 5: unknown global field '{\*\expandedcolortbl;;\cssrgb\c33333\c33333\c33333;\cssrgb\c98039\c98039\c98039;\cssrgb\c14118\c15294\c16078;'.
Line 5: Invalid configuration line '{\*\expandedcolortbl;;\cssrgb\c33333\c33333\c33333;\cssrgb\c98039\c98039\c98039;\cssrgb\c14118\c15294\c16078;'.
Line 6: unknown global field '\cssrgb\c93725\c94118\c94510;\cssrgb\c14118\c15294\c16078;\cssrgb\c93725\c94118\c94510;}'.
Line 6: Invalid configuration line '\cssrgb\c93725\c94118\c94510;\cssrgb\c14118\c15294\c16078;\cssrgb\c93725\c94118\c94510;}'.
Line 7: unknown global field '\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0'.
Line 7: Invalid configuration line '\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0'.
Line 8: unknown global field '\deftab720'.
Line 8: Invalid configuration line '\deftab720'.
Line 9: unknown global field '\pard\pardeftab720\sl320\partightenfactor0'.
Line 9: Invalid configuration line '\pard\pardeftab720\sl320\partightenfactor0'.
Line 11: unknown global field '\f0\fs28\fsmilli14300 \cf2 \cb3 \expnd0\expndtw0\kerning0'.
Line 11: Invalid configuration line '\f0\fs28\fsmilli14300 \cf2 \cb3 \expnd0\expndtw0\kerning0'.
Line 14: invalid number "1\"
Line 14: failed to parse 'update_config=1\'.
Line 14: Invalid configuration line 'update_config=1\'.
Line 15: unknown global field '\'.
Line 15: Invalid configuration line '\'.
Line 16: unknown global field 'network=\{\'.
Line 16: Invalid configuration line 'network=\{\'.
Line 17: unknown global field 'ssid=\'93<<networkname>>\'94\'.
Line 17: Invalid configuration line 'ssid=\'9<<networkname>>\'94\'.
Line 18: unknown global field 'psk=\'93<<password>>\'94\'.
Line 18: Invalid configuration line 'psk=\'93<<password>>\'94\'.
Line 19: unknown global field '\pard\pardeftab720\sl300\partightenfactor0'.
Line 19: Invalid configuration line '\pard\pardeftab720\sl300\partightenfactor0'.
Line 21: unknown global field '\f1\fs26 \cf4 \cb5 \outl0\strokewidth0 \strokec4 id_str=\'932.5GHz\'94\'.
Line 21: Invalid configuration line '\f1\fs26 \cf4 \cb5 \outl0\strokewidth0 \strokec4 id_str=\'932.5GHz\'94\'.
Line 22: unknown global field '\pard\pardeftab720\sl320\partightenfactor0'.
Line 22: Invalid configuration line '\pard\pardeftab720\sl320\partightenfactor0'.
Line 24: unknown global field '\f0\fs28\fsmilli14300 \cf2 \cb3 \outl0\strokewidth0 \'.
Line 24: Invalid configuration line '\f0\fs28\fsmilli14300 \cf2 \cb3 \outl0\strokewidth0 \'.
Line 25: unknown global field '\}\'.
Line 25: Invalid configuration line '\}\'.
Line 26: unknown global field '\pard\pardeftab720\sl320\partightenfactor0'.
Line 26: Invalid configuration line '\pard\pardeftab720\sl320\partightenfactor0'.
Line 27: unknown global field '\cf2 \cb3 network=\{\'.
Line 27: Invalid configuration line '\cf2 \cb3 network=\{\'.
Line 28: unknown global field 'ssid=\'93<<networkname>>\'94\'.
Line 28: Invalid configuration line 'ssid=\'93<<networkname>>\'94\'.
Line 29: unknown global field 'psk=\'93<<password>>\'94\'.
Line 29: Invalid configuration line 'psk=\'93<<password>>\'94\'.
Line 30: unknown global field '\pard\pardeftab720\sl300\partightenfactor0'.
Line 30: Invalid configuration line '\pard\pardeftab720\sl300\partightenfactor0'.
Line 32: unknown global field '\f1\fs26 \cf6 \cb7 id_str=\'935GHz\'94'.
Line 32: Invalid configuration line '\f1\fs26 \cf6 \cb7 id_str=\'935GHz\'94'.
Line 33: unknown global field '\f0\fs28\fsmilli14300 \cf2 \cb3 \'.
Line 33: Invalid configuration line '\f0\fs28\fsmilli14300 \cf2 \cb3 \'.
Line 34: unknown global field '\pard\pardeftab720\sl320\partightenfactor0'.
Line 34: Invalid configuration line '\pard\pardeftab720\sl320\partightenfactor0'.
Line 35: unknown global field '\cf2 \}}'.
Line 35: Invalid configuration line '\cf2 \}}'.
Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplicant.conf'.

wpa_supplicant contents:

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid=“networkname”
psk=“password”
id_str=“2.5GHz”

}
network={
ssid=“networkname”
psk=“password”
id_str=“5GHz”
}

Any ideas..?

  • 1
    You cannot run Stretch on a Pi4 so this question is meaningless. – Milliways Dec 21 '19 at 21:43
  • And the file looks like an RTF file, not pure text. – Dirk Dec 22 '19 at 5:20
  • You wrote: "Running the latest download of Raspbian", that is raspbian-buster, but you flagged with raspbian-stretch. So what you are using? – Ingo Dec 22 '19 at 17:59
4

Did you make the wpa_supplicant file on Windows? Because, from the error messages, it looks as if it was it was saved as "rtf" and not as plain text. And if that's what happened, the pi will barf on it. Rtf files have lots of formatting information embedded in them which is no use at all for linux configuration.

Try writing the file on your windows machine in notepad to be sure it is saved as plain text. There are other suitable editors available on windows -- both Notepad++ and VSCode are free to use, though VSCode may be overkill for this purpose.

I hope this is helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.