-1

I want to create a dedicated wifi connection between my Raspberry Pi 3 and a windows 7 laptop. I thought the method here https://www.pi-point.co.uk/documentation/ would do the job. Managed to get the Pi wifi point visible from my windows laptop about a week ago. But my Pi was crashing a lot so I did a complete re-install from NOOBS. Now I can not get hostapd to run at all. My /etc/hostapd/hostapd.conf looks like this:

interface=wlan0
driver=nl80211
#driver=rtl871xdrv
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Pi3
country_code=AU
#hw_mode=g
channel=1
#wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=raspberrypifi
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ieee80211n=1
hw_mode=g

When I try to run hostapd I get the following error message:

pi@localhost:~ $ sudo hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
'ine 2: invalid/unknown driver 'nl80211
'ine 16: invalid key_mgmt 'WPA-PSK
'.ne 17: invalid cipher 'TKIP
'.ne 18: invalid cipher 'CCMP
'ine 20: unknown hw_mode 'g
FT (IEEE 802.11r) requires nas_identifier to be configured as a 1..48 octet string
7 errors found in configuration file '/etc/hostapd/hostapd.conf'
Failed to set up interface with /etc/hostapd/hostapd.conf
Failed to initialize interface
pi@localhost:~ $ ^C

I've tried many searches of the internet before posting here but I'm not getting any closer.

Any help would be much appreciated.

Thanks & Regards Neil Keron


Jaromanda, Many thanks for your help. I've followed the instructions in your link but hostapd still not running.
When I try pi@localhost:~ $ sudo service hostapd status, I get the following message |" hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2020-07-17 09:55:22 AEST; 127ms ago Process: 1091 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

One of the many previous websites I have visited for this problem told me to put "DAEMON_CONF="/etc/hostapd/hostapd.conf" in to the /etc/default/hostapd file. Is this now going to mess up the starting of hostapd?

As I said in my original post, I did get the Pi3 wireless exposed to my Windows laptop before I did my last system re-install so I assume the wifi hardware is working. Is there a test I can run to check this?

Many thanks again. Neil

Ghanima
  • 15,958
  • 17
  • 65
  • 125
NeilK
  • 1
  • 3

2 Answers2

3

Using NOOBS is not a good idea. We have seen many problems here using it. If you only want to have an access point running on the RasPi then just download Raspberry Pi OS (32-bit) Lite, flash it to an SD-Card and boot it in your RasPi. Then you can follow to Setting up a Raspberry Pi as an access point - the easy way.

Ingo
  • 42,961
  • 20
  • 87
  • 207
0

Check the line endings of your configuration file. I had the same type of error with CRLF line endings. It must be unix style LF only.