2

I followed the tutorial, Raspberry Pi Wireless Access Point, to set my Raspberry Pi Zero as an access point.

I do have an additional USB adapter connected. The pi that I’m working on will be an on board computer for a drone. The built in wifi will connect to my wifi at home to run updates browse logs and the like. The USB adapter will host the access point and will connect to a controller through a very directional antenna.

When I finished and rebooted the USB adapter connected to the same Wi-Fi network that the internal Wi-Fi connects to.

I know that I’ve got to be missing some detail somewhere but I’m not sure what steps to take first to troubleshoot this problem.

Edit

After following the tutorial listed in the comments this is returned from iwconfig:

wlan0     IEEE 802.11  ESSID:"Zimm_Wrls"  
      Mode:Managed  Frequency:2.462 GHz  Access Point: 48:5D:36:D3:C4:7C   
      Bit Rate=72.2 Mb/s   Tx-Power=31 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Power Management:on
      Link Quality=59/70  Signal level=-51 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

wlan1     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Upadate 20180705:

I ran lsusb to see what driver I should be using in case that was part of the issue. This is what was returned:

Bus 001 Device 002: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

This is /etc/hostapd/hostapd.conf:

interface=wlan1
driver=rt1871xdrv
ssid=BigBird
hw_mode=g
channel=6
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=ninarubysue
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

and then this:

bigbird:~/rt8192cu $ sudo hostapd -B /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 1: invalid line '$ cat /etc/hostapd/hostapd.conf'
Line 3: invalid/unknown driver 'rt1871xdrv'
2 errors found in configuration file '/etc/hostapd/hostapd.conf'
Failed to set up interface with /etc/hostapd/hostapd.conf
Failed to initialize interface
  • You might have more luck with the Foundation tutorial raspberrypi.org/documentation/configuration/wireless/… – Milliways Jul 4 '18 at 1:55
  • ASAIK, it's not possible to do both things at the same time with with a single wireless device. Do you have 2 wireless devices on the rpi? Perhaps the internal one and a USB-dongle? – eftshift0 Jul 4 '18 at 3:48
  • @eftshift0 It is possible. There are many articles on the web how to do that. @Milliways has pointed to the official. – Ingo Jul 4 '18 at 7:21
  • @Loren_Zimmer Do you have two wifi devices on your raspi, a wifi usb dongle and a build in wifi device (means you have a pi zero W)? – Ingo Jul 4 '18 at 7:33
  • 1
    @OyaMistAeroponics the pi that I’m working on will be an on board computer for a drone. The built in wifi will connect to my wifi at home to run updates browse logs and the like. The USB adapter will host the access point and will connect to a controller through a very directional antenna. – Loren Zimmer Jul 5 '18 at 4:16
1

When I originally started this process I had the adapter plugged in. I reinstalled the OS and then went through the entire Foundation Tutorial process without the adapter connected. I ran into some errors due to added spaces in the config files but once I fixed the errors and connected the USB adapter it works like it should.

Thanks to everyone for the comments and helpful tips!

Loren

0

Your setup cannot work because you are following a tutorial that configures only one wifi device, a wifi USB adapter or the wifi on board chip. This single device is configured to work as an access point. The traffic from its connected clients is routed to the ethernet port. So we have a wireless lan connected to a wired lan.

You use two different wifi devices so you try to work with two wireless lans. This does not match the conditions of the tutorial. You should look for an appropriate tutorial.

  • Correct. without modification to the tutorial – Wilf Jul 5 '18 at 9:38
  • @Wilf I'm not sure if you just can replace eth0 with wlan0 in the tutorial. I don't believe it but haven't yet tested it. – Ingo Jul 5 '18 at 10:44
  • I haven't either and can't test for a week, but I'm sure it should. the wifi should be on different channels (this is usually assigned automatically) so they don't interfere with each other as much – Wilf Jul 5 '18 at 10:48
  • 1
    @Wilf hostapd must have a channel in its conf file. wpa_supplicant (for wlan0) connects to the channel the remote ap offers; may conflict ... – Ingo Jul 5 '18 at 11:18
  • @Ingo do you have an example of an appropriate tutorial? – Loren Zimmer Jul 5 '18 at 15:05

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.