orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

RPi Wireless Access Point Not Showing Up [ubuntu]

Tue Jun 30, 2020 3:50 pm

I'm currently running a headless Ubuntu Server 20.04 on the RPi 3 Model B and tried to set up a wireless AP using the tutorial:
https://www.raspberrypi.org/documentati ... -routed.md
Everything seems to be running, the dnsmasq service is active and running, and I haven't gotten any outright errors. I'm not sure where to go from here to fix the access point so that I can connect to it from other devices.
This is the output of cat /war/log/syslog | grep hostapd
The time changed from the actual time and kept going into the future which was strange but I don't know the significance of this.

Code: Select all

Jun 30 14:38:56 ubuntu hostapd[1295]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 14:38:56 ubuntu hostapd[1295]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 14:38:56 ubuntu hostapd[1294]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 14:38:56 ubuntu hostapd[1294]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 14:38:56 ubuntu hostapd[1293]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 14:38:56 ubuntu hostapd[1293]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 14:38:56 ubuntu hostapd[1293]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 14:38:56 ubuntu hostapd[1293]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 14:38:55 ubuntu hostapd[1295]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 14:38:55 ubuntu hostapd[1295]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 14:38:55 ubuntu systemd[1]: hostapd.service: Can't open PID file /run/hostapd.pid (yet?) after start: Operation not permitted
Jun 30 14:38:55 ubuntu hostapd[1297]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 14:38:56 ubuntu hostapd[1297]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 14:38:56 ubuntu systemd[1]: hostapd.service: Can't open PID file /run/hostapd.pid (yet?) after start: Operation not permitted
Jun 30 14:48:19 ubuntu systemd[1]: hostapd.service: Succeeded.
Jun 30 15:32:22 ubuntu hostapd[1750]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 15:32:22 ubuntu hostapd[1750]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 15:44:49 ubuntu hostapd[1279]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 15:44:49 ubuntu hostapd[1279]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 15:57:49 ubuntu hostapd[1283]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 15:57:49 ubuntu hostapd[1283]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 17:05:22 ubuntu hostapd[1282]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 17:05:22 ubuntu hostapd[1282]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 17:30:05 ubuntu hostapd[1282]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 17:30:05 ubuntu hostapd[1282]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 30 17:33:20 ubuntu hostapd[1279]: Configuration file: /etc/hostapd/hostapd.conf
Jun 30 17:33:21 ubuntu hostapd[1279]: wlan0: Could not connect to kernel driver
Jun 30 17:33:21 ubuntu hostapd[1279]: Using interface wlan0 with hwaddr b8:27:eb:4b:d8:45 and ssid "pi"
Jun 30 17:33:21 ubuntu hostapd[1279]: wlan0: interface state UNINITIALIZED->ENABLED
Jun 30 17:33:21 ubuntu hostapd[1279]: wlan0: AP-ENABLED
This is the output of iwconfig wlan0:

Code: Select all

wlan0    
	  IEEE 802.11  ESSID:"VoltServer"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 30:B5:C2:09:98:E9   
          Bit Rate=65 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=46/70  Signal level=-64 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:40  Invalid misc:0   Missed beacon:0
After attempting to connect to the AP these are the relevant logs. The connection starts at 14:19:23. It seems to have connected but this still doesn't show up on my phone or computer.

Code: Select all

...
14:15:22 ubuntu hostapd[1285]: Configuration file: /etc/hostapd/hostapd.conf
14:15:22 ubuntu hostapd[1285]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
14:15:22 ubuntu hostapd systemd[1]: hostapd.service: Succeeded
14:18:25 ubuntu hostapd[1278]: Configuration file: /etc/hostapd/hostapd.conf
14:18:25 ubuntu hostapd[1278]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
14:19:23 ubuntu hostapd: wlan0: STA 60:30:d3:0a:50:94 IEEE 802.11: associated
14:19:23 ubuntu hostapd: wlan0: STA 60:30:d3:0a:50:94 RADIUS: starting accounting session 9AAF3A6B27DCB958
14:19:23 ubuntu hostapd: wlan0: STA 60:30:d3:0a:50:94 WPA: pairwise key handshake completed (RSN)

Last edited by orbanm on Wed Jul 01, 2020 6:26 pm, edited 3 times in total.

User avatar
neilgl
Posts: 2111
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 4:48 pm

Have you got a mobile phone / laptop / ipad that you can look for WiFi SSID coming from the pi NameOfNetwork, with password AardvarkBadgerHedgehog

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 4:58 pm

neilgl wrote:
Tue Jun 30, 2020 4:48 pm
Have you got a mobile phone / laptop / ipad that you can look for WiFi SSID coming from the pi NameOfNetwork, with password AardvarkBadgerHedgehog
Yes, I've tried using the other networks option on my phone and inputting the SSID and password into there but it still says no network with that ID was found.

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 5:01 pm

Have you checked the log files? Is hostapd running?

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 5:44 pm

dickon wrote:
Tue Jun 30, 2020 5:01 pm
Have you checked the log files? Is hostapd running?
Just added the output

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 5:49 pm

So you've not configured the country code, then?

What does the output of 'iwconfig wlan0' look like?

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 6:11 pm

dickon wrote:
Tue Jun 30, 2020 5:49 pm
So you've not configured the country code, then?

What does the output of 'iwconfig wlan0' look like?
I added the output and the country code is specified as country_code=US

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up

Tue Jun 30, 2020 6:59 pm

That's showing it as a station, connected to 'VoltServer'. You'll probably need to dissociate from that first.

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up

Wed Jul 01, 2020 1:08 pm

dickon wrote:
Tue Jun 30, 2020 6:59 pm
That's showing it as a station, connected to 'VoltServer'. You'll probably need to dissociate from that first.
I removed 'Voltserver' and now the access point shows up but it won't let my other devices connect to it. The password is right but it just does a continuous loop of connecting or saying no internet connection. Obviously it shouldn't be connected to the actual internet but why does it say no connection?

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Wed Jul 01, 2020 1:42 pm

Dunno. Read the logs. You won't get anywhere if you don't look at the log files. That should be the first thing you do.

And check that you enabled IP forwarding. It's in those instructions, so you should have.

Why are you not using PiOS?

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Wed Jul 01, 2020 6:28 pm

dickon wrote:
Wed Jul 01, 2020 1:42 pm
Dunno. Read the logs. You won't get anywhere if you don't look at the log files. That should be the first thing you do.

And check that you enabled IP forwarding. It's in those instructions, so you should have.

Why are you not using PiOS?
I've followed everything in the tutorial and am not sure how to interpret these logs (updated original post). I'm pretty new to all of this. I'm not using PiOS because it wouldn't recognize a usb can0 that would stream in CAN data from a device. (Part of my project)

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Wed Jul 01, 2020 6:57 pm

And the dhcpd logs..?

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Thu Jul 02, 2020 2:28 pm

dickon wrote:
Wed Jul 01, 2020 6:57 pm
And the dhcpd logs..?
They state one error hundreds of times: "DHCP packet received on wlan0 which has no address." However, I did specify a range of addresses in the dhcpd.conf file so I'm confused as to why there wouldn't be an assigned address.

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Thu Jul 02, 2020 2:34 pm

You haven't put an IP address on the wlan interface. You're using the routed AP instructions: that suggests 192.168.4.1/24. You may well have put it in /etc/dhcpcd.conf, but I have no idea if Ubuntu uses that; you'll need to put it whereever you normally configure static addresses.

orbanm
Posts: 9
Joined: Mon Jun 22, 2020 7:38 pm

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Thu Jul 02, 2020 3:05 pm

dickon wrote:
Thu Jul 02, 2020 2:34 pm
You haven't put an IP address on the wlan interface. You're using the routed AP instructions: that suggests 192.168.4.1/24. You may well have put it in /etc/dhcpcd.conf, but I have no idea if Ubuntu uses that; you'll need to put it whereever you normally configure static addresses.
Thanks for your help. I just used:

Code: Select all

sudo ifconfig wlan0 192.168.4.0
to give wlan0 an ip address and now it connects.

User avatar
dickon
Posts: 1452
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi Wireless Access Point Not Showing Up [ubuntu]

Thu Jul 02, 2020 6:28 pm

Good. Glad you've got it working.

Return to “Ubuntu”