0

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,578
  • 15
  • 58
  • 113
NeilK
  • 1
  • 1
  • `ine 2` ... `.ne17` ... really? looks like there's a LOT going wrong, not just with the config file – Jaromanda X Jul 16 '20 at 03:46
  • **at the time of writing the current version is 'Wheezy'** - I would suggest reading a more up to date tutorial .... Wheezy was superseded by Jessie in 2015, which was superseded by Stretch in 2017 ... which in turn was superseded by Buster in 2019 ... you're working with instructions for a 2013 release of Debian (on which Raspbian / Raspberry Pi OS is based) – Jaromanda X Jul 16 '20 at 04:05
  • `I've tried many searches of the internet` - the best and simplest "guide" I found was on raspberrypi.org (you'd think they'd know how to do it correctly, right) - https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md - I've never set up an AP on any of my 17 raspberry pi's in the 8+ years I've owned them (Yes, I have an original Pi B 256MB!!) - but that guide had me up and running with an AP on a pi3B in about 3 minutes – Jaromanda X Jul 16 '20 at 05:17

1 Answers1

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
  • 40,606
  • 15
  • 76
  • 189