8

Everything points to that the Raspberry Pi Zero W can be access point and connect to wifi at the same time.

According to this article, with the command iw list describes:

valid interface combinations:
* #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
   total <= 3, #channels <= 2
* #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
   total <= 4, #channels <= 1

I tried to follow the steps of this article, but I have not been successful:

When I reboot the rpi zero w, it does not automatically connect to the wifi network. Instead, it emits signal as access point (although when I connect to the network from my mobile, does not support the password as valid).

In this scenario, if I turn off the wifi and turn it on again, it connects to the internet through the WiFi network, but it does not act as an access point (it does not show the network to connect).

The distribution is Pixel (based Jessie).

Thanks in advance

Mario
  • 81
  • 1
  • 1
  • 2
  • 1
    The article was made with another hardware and not a zero W – user64698 Mar 29 '17 at 21:53
  • The pi zero w wifi interface doesn't support managed and AP mode if it did iwlist would look something like this `#{ managed, AP } <= 8, total <= 16, #channels <= 1` note that managed and AP are in the same { } – Rwky Jul 02 '17 at 22:55
  • The link referenced at _this article_ is dead. – Adrian W Feb 16 '19 at 23:11
  • I just checked a few minutes ago that the link is not dead. It must have been a temporary website problem. – Mario Aug 20 '19 at 16:13
  • there's an *excellent* script available on github that, with minor mods, works on Raspbian Buster (Dec 2019). see https://github.com/lukicdarkoo/rpi-wifi. the mods: change: ` wpa=2PASSPHRASE` to ` wpa=2` . next, insert `#!/bin/bash` after `sudo bash -c 'cat > /bin/rpi-wifi.sh`. – mahesh Dec 28 '19 at 04:07

4 Answers4

6

It is perfectly possible. Look at the link. Note that the channel used must be the same on the access point and on the Wi-Fi.

link rpi3 wifi-client-ap

2

As I commented here it is possible to do, but most of the articles I found online did not work for me. I wrote a detailed blog post on it here: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/

It's a little quirky, and I recommend reading the comments first, as I haven't yet updated the original post to include some helpful suggestions from the comments. Either way, I've gotten it to work using my instructions. Good luck!

albeec13
  • 41
  • 2
1

It is perfectly possible, my Pi Zero W does so, but the client and AP must use the same channel.

See a screenshot from my ZW:

enter image description here

The output from your iw list shows that only the second combination allows managed (i.e. client) and AP at the same time , but it says channels <=1. That is, they need to use the same channnel.

I have used the guide from http://imti.co/post/145442415333/raspberry-pi-3-wifi-station-ap (which is the same linked by Alfredo Pons Menargues) adapted to my own needs.

  • Did you significantly alter the instructions from your posted link? I'm trying to replicate with a pi zero w and Raspian Jessie, but struggling to get a static ip assigned to the uap0 interface – tomtomnz May 11 '17 at 04:11
  • @tomtomnz, do I didn't. – Javier Sedano May 11 '17 at 09:00
  • It is very important to use the SAME channel number in hostapd.conf as you use for your connected wireless network. I.e. you need to connect to WiFI first, find out which channel you're using (```iw wlan0 info```), and write this channel in hostapd.conf. If you connect to a different network, and channel changes, your setup will break - you'd have to change your channel manually again. – George Y. Jul 07 '17 at 05:59
-1

A single wlan interface may only connect to one WiFi network at a time. It cannot do both things simultaneously. If you have an​ external WiFi adaptor, then you can bridge the internal and external wlan interface, then you can bridge both of them to make one act as access point and the other as hotspot.

Adarsh
  • 25
  • 2