Hello
Is it possible to have access point on Raspberry Zero W? Do you know working tutorial? I tried one and I can see created network. I can connect with PC but it doesn't get IP from DHCP. I can't connect with smartphone because it also doesn't receive IP. I tried many tutorials and still same. Could you help?
- DougieLawson
- Posts: 40581
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Access point on Raspberry Zero W
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: Access point on Raspberry Zero W
I tried it, but still I don't get IP.
Re: Access point on Raspberry Zero W
So DHCP won't work on Raspberry Zero W? Only static IP?
Re: Access point on Raspberry Zero W
The RPi needs to be assigned a static IP, but the other client devices on the localnet will be assigned network settings by the DHCP server on the RPi. That is what dnsmasq does.
Re: Access point on Raspberry Zero W
RPi as AP has static IP, but clients have to get dynamic IP from RPi. Any idea why client devices don't get IP by DHCP?
Re: Access point on Raspberry Zero W
If your clients are getting a dynamic IP, then they are using DHCP.
Edit: My bad. They are not getting an IP. Are you able to connect to the RPi AP with the clients, just not getting an IP?
Post the contents of /etc/dnsmasq.conf and /etc/dhcpcd.conf.
Edit: My bad. They are not getting an IP. Are you able to connect to the RPi AP with the clients, just not getting an IP?
Post the contents of /etc/dnsmasq.conf and /etc/dhcpcd.conf.
Re: Access point on Raspberry Zero W
Make sure you are using Raspbian Jessie, then the tutorial that Dougie linked above will work straight away on the Pi Zero W (up to but not including the section "USING THE RASPBERRY PI AS AN ACCESS POINT TO SHARE AN INTERNET CONNECTION"). Took me 20 minutes start to finish.
The existing tutorials don't work on the latest Raspbian (Stretch) images. Some (like Tim) have managed to get it working using the dhcpcd method to assign a static IP to your Pi Zero W WiFi interface, so it can be done. But I tried for hours and failed. The general release of Raspbian Stretch is still quite new and the details of configuring an AP with this system seem not to be fully nailed down just yet.
If the only thing that isn't working for you is having connected clients assigned an IP in the subnet of your access point, then look at your dnsmasq configuration. That's the piece of software responsible for handing out IPs to DHCP clients of your access point. For example, make sure it's setup to hand out IPs in the same network you have your wlan0 interface setup in.
The existing tutorials don't work on the latest Raspbian (Stretch) images. Some (like Tim) have managed to get it working using the dhcpcd method to assign a static IP to your Pi Zero W WiFi interface, so it can be done. But I tried for hours and failed. The general release of Raspbian Stretch is still quite new and the details of configuring an AP with this system seem not to be fully nailed down just yet.
If the only thing that isn't working for you is having connected clients assigned an IP in the subnet of your access point, then look at your dnsmasq configuration. That's the piece of software responsible for handing out IPs to DHCP clients of your access point. For example, make sure it's setup to hand out IPs in the same network you have your wlan0 interface setup in.
- HermannSW
- Posts: 3481
- Joined: Fri Jul 22, 2016 9:09 pm
- Location: Eberbach, Germany
- Contact: Website Twitter YouTube
Re: Access point on Raspberry Zero W
Remembered this thread when reading "SIMULTANEOUS AP & CLIENT ON THE PI ZERO W" today:
https://hackaday.com/2017/09/29/simulta ... pi-zero-w/
https://hackaday.com/2017/09/29/simulta ... pi-zero-w/
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/working_with_FPGAs
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/working_with_FPGAs
Re: Access point on Raspberry Zero W
Tried it yesterday, and it didn't work with Stretch. I haven't tried it with Jessie yet. Are you looking for just an AP, or the simultaneous client/AP on the one onboard device?HermannSW wrote: Remembered this thread when reading "SIMULTANEOUS AP & CLIENT ON THE PI ZERO W" today:
https://hackaday.com/2017/09/29/simulta ... pi-zero-w/
Re: Access point on Raspberry Zero W
I have failed to get this to work and have spent days trying. I have followed these instructions but an access point still fails to show up on my android phone.
My goal is to be able to have the PI stream the video back to my phone. On another SD card, I have that working as I'd like, but it is useless to me unless I can stream it back to my phone.
Based on this thread, I gave up trying to use 'Stretch' working but having pulled down a fresh image of the jessie-lite, I still can not get it to work.
https://www.raspberrypi.org/documentati ... s-point.md
I'm almost ready to give up. Does anyone see an obvious issue? Here are my setting:
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/network/interfaces
/etc/dnsmasq.conf
/etc/hostapd/hostapd.conf
/etc/default/hostapd
My goal is to be able to have the PI stream the video back to my phone. On another SD card, I have that working as I'd like, but it is useless to me unless I can stream it back to my phone.
Based on this thread, I gave up trying to use 'Stretch' working but having pulled down a fresh image of the jessie-lite, I still can not get it to work.
https://www.raspberrypi.org/documentati ... s-point.md
I'm almost ready to give up. Does anyone see an obvious issue? Here are my setting:
/etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
#network={
# ssid="17117FF"
# psk="7aRYZ"
#}
Code: Select all
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
interface=wlan0
dhcp-range=192.168.0.2,192.168.0.20,255.255.255.0,24h
Code: Select all
interface=wlan0
driver=nl80211
ssid=PirateVirus
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=test
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Code: Select all
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
DAEMON_CONF="/etc/hostapd/hostapd.conf"
# Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more)
# -K include key data in debug messages
# -t include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""
Re: Access point on Raspberry Zero W
That access point doc is out of date by at least a couple of versions. This is the correct doc for Jessie and Stretch.
https://github.com/SurferTim/documentat ... s-point.md
https://github.com/SurferTim/documentat ... s-point.md
Re: Access point on Raspberry Zero W
Resolved.... Here was the culprit!
This is the faulty link.....
https://frillip.com/using-your-raspberr ... h-hostapd/
The command:
sudo nano /etc/dhcpcd.conf and add the following line to the bottom of the file:
Thank you SurferTim!
This is the faulty link.....
https://frillip.com/using-your-raspberr ... h-hostapd/
The command:
sudo nano /etc/dhcpcd.conf and add the following line to the bottom of the file:
Code: Select all
denyinterfaces wlan0
Thank you SurferTim!
Re: Access point on Raspberry Zero W
The difference is more than just that. It is where you assign network settings. If you use a bridge AP, that is different also. The way you add wlan0 to the bridge is with /etc/hostapd/hostapd.conf and the addition to /etc/network/interfaces.
Re: Access point on Raspberry Zero W
Just posting in case it saves someone else a few hours of pain trying to get this set up on a Pi Zero W. A sysadmin at work helped me track down the error to an unknown driver. When we editted
/etc/hostapd/hostapd.conf
and removed
driver=nl80211
it worked perfectly.
/etc/hostapd/hostapd.conf
and removed
driver=nl80211
it worked perfectly.
Re: Access point on Raspberry Zero W
Mine works perfectly with the driver=nl80211. I'm using Stretch 2017-09-07.stevieb wrote: Just posting in case it saves someone else a few hours of pain trying to get this set up on a Pi Zero W. A sysadmin at work helped me track down the error to an unknown driver. When we editted
/etc/hostapd/hostapd.conf
and removed
driver=nl80211
it worked perfectly.
-
- Posts: 13
- Joined: Fri Mar 18, 2016 9:24 pm
Re: Access point on Raspberry Zero W
I have a script for setting up access point on Raspberry Pi 3, I'm going to endeavour to make it work with the pi-Zero W as well because I now have one.
https://gist.github.com/Lewiscowles1986 ... 5b2029c390
There is also an interface passthrough script (potentially to be combined with USB-gadget mode ethernet interface, or USB ethenet dongle interface)
https://gist.github.com/Lewiscowles1986 ... f1b672c0c9
As per notes, these scripts were originally created pre-stretch release. There is another script below, used to fix the awful work done on dhcpcd that I've seen mess up so many tutorials.
https://gist.github.com/Lewiscowles1986 ... 0adfe04cdb
The script isn't stateless like Ansible, so I'd suggest using a vanilla raspbian that you've not modified at all.
https://gist.github.com/Lewiscowles1986 ... 5b2029c390
There is also an interface passthrough script (potentially to be combined with USB-gadget mode ethernet interface, or USB ethenet dongle interface)
https://gist.github.com/Lewiscowles1986 ... f1b672c0c9
As per notes, these scripts were originally created pre-stretch release. There is another script below, used to fix the awful work done on dhcpcd that I've seen mess up so many tutorials.
https://gist.github.com/Lewiscowles1986 ... 0adfe04cdb
The script isn't stateless like Ansible, so I'd suggest using a vanilla raspbian that you've not modified at all.
Re: Access point on Raspberry Zero W
The dhcpcd service doesn't seem to mess with my tutorial.LewisCowles1986 wrote: ↑Fri Jan 19, 2018 4:22 pmAs per notes, these scripts were originally created pre-stretch release. There is another script below, used to fix the awful work done on dhcpcd that I've seen mess up so many tutorials.
https://www.raspberrypi.org/documentati ... s-point.md
It does fine with Stretch and the RPi Zero W.
It does have some weird quirks when using a usb wireless device though.
Re: Access point on Raspberry Zero W
I made a docker container to make a hotspot. You may find it useful https://github.com/mrded/rpi-chat/tree/master/hotspot