Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/
curl https://raw.githubusercontent.com/lukicdarkoo/rpi-wifi/master/configure | bash -s -- -a MyAP myappass -c WifiSSID wifipass
Configures simultaneous AP and Managed Mode Wifi on Raspberry Pi
License: GNU General Public License v3.0
curl https://raw.githubusercontent.com/lukicdarkoo/rpi-wifi/master/configure | bash -s -- -a MyAP myappass -c WifiSSID wifipass
When installing OpenVPN, the AP persists but the client capabilities disappear. However, if you remove OpenVPN, then the client comes back. Is there any fix for this?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi,
Your work is excellent, It worked for me. One thing i am struggling is to set static ip to wlan0 with associated clients. still it should be able to act as both station and access point.
I have tried below things
in /etc/network/interfaces
changed
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.200
netmask 255.255.255.0
gateway 192.168.0.1
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
yet no success, in this case ifup wlan0 doesn't work well. I am new to networking kindly help me with the feature.
Hi,
I dont know exactly how this happens but there is a point when it is no longer possible to reach the raspberry thru the WLAN0 ip address when connected to the same WIFI Router.
But it is possible to connect thru the RPI AP and, once inside, its also possible to reach any destination behind the WLAN0 (Internet included).
Its like if there is a firewall blocking incoming connections from the WLAN0.
But it was working before... I manually changed the details of the /etc/wpa_supplicant/wpa_suppliant.conf but don't think that is the issue.. because it is correctly connected to the Router and the RPI can access the network behind the WLAN0.
what could be happening?
Kind regards.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I made a couple of changes to get the code to work on a Pi Zero 2 W running Debian Bullseye.
/etc/wpa_supplicant/wpa_supplicant.conf
sectionnetwork={
ssid="${AP_SSID}"
$([ $AP_PASSPHRASE ] && echo "psk=\"${AP_PASSPHRASE}\"")
scan_ssid=1
key_mgmt=WPA-PSK
id_str="AP1"
}
Populate /etc/network/interfaces
section
Add the line iface AP2 inet dhcp
right before the EOF to take into account the change above.
Populate /bin/start_wifi.sh
section.
I was having issues with /var/run/wpa_supplicant/wlan0
hanging around from previous invocations of wpa_supplicant as the Pi booted up, so I added the line sudo rm /var/run/wpa_supplicant/wlan0
right after the sleep(30)
line.
I changed line 191 to read sudo crontab -l 2>/dev/null | { cat; echo "@reboot /bin/rpi-wifi.sh"; } | sudo crontab -
so the contab reboot entry would run at every reboot as root as suggested in the original article.
I hope these changes saves others some time in getting everything set up.
Used the script and installed without issue. my AP comes up and can connect and is stable.
issue seems to be wlan0 dropping, it stays up for say 30 seconds then drops then comes back again after period of time
any ideas
Hello,
I have install your script it works fantasic ! Thanks!
I can connect to MyAP en I receive the correct ip and gateway etc. Now I will connect with ssh or rdp from my laptop. It works good before I install your script. Must I add someware the interface that he will listen on the new interface ?
regards,
Henri Apperloo
I tried using this script with the updates @mahesh2000 mentioned here on my Raspberry Pi Zero W, however I'm unable to get wlan0 to connect to the broader internet. My AP SSID works and I'm able to connect to my RPi W 0 via ssh, however not able to ping any external website (or run any apt commands). If I run ip addr
both wlan0 and ap0 seem to be up and have correct IP addresses. Any ideas?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi so I thought I had this working correctly but I can seem get internet traffic to pass through the AP to the internet. For example when I ssh into the RaspPi and ping outside my home network:
lombardo@raspberrypi:~ $ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=58 time=17.8 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=58 time=21.3 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=58 time=19.8 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=58 time=18.7 ms
Now if I connect my laptop to the RaspPi AP and ping from my laptops terminal:
Fedallahs-MacBook-Pro:~ lombardo$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
Request timeout for icmp_seq 0
ping: sendto: No route to host
Request timeout for icmp_seq 1
ping: sendto: No route to host
Request timeout for icmp_seq 2
ping: sendto: No route to host
Request timeout for icmp_seq 3
ping: sendto: No route to host
Request timeout for icmp_seq 4
--- 1.1.1.1 ping statistics ---
6 packets transmitted, 0 packets received, 100.0% packet loss
I ran the script only replacing the the following variables: MyAP
myappass
WifiSSID
wifipass
. Do you have an idea why the information is not being forwarded from the RaspPi to my home network?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Do you have any benchmark as to how many clients (STA) can attach to Pi 4B (Buster Raspbian OS) with this method?
Our approach (not this method uses hostapd and wpa_supplicant) shows that only 4 or 5 max before it slows or drops connections.
Some have suggested the CYW43455 on-chip RAM (not DDR) is the limiting factor.
Thanks for posting.
-Mike
Chicago, IL
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Regarding this line:
Line 169 in 44589e7
Running the script throws an error when running without defining -n
due to NO_INTERNET
being unset, causing it to not evaluate, and the &&
isn't run.
A quick hacky alternative would be:
[ "x${NO_INTERNET}" = "xtrue" ]
As this way, even if NO_INTERNET
is unset/undefined, the statement can still evaluate.
Hi, thx you for your work on this script
i'm trying to install the script but crash on these errors :
...
Fetched 1,099 kB in 2s (527 kB/s)
Selecting previously unselected package hostapd.
(Reading database ... 37646 files and directories currently installed.)
Preparing to unpack .../hostapd_2%3a2.7+git20190128+0c1e29f-6_armhf.deb ...
Unpacking hostapd (2:2.7+git20190128+0c1e29f-6) ...
Selecting previously unselected package dhcpcd.
Preparing to unpack .../dhcpcd_1%3a3.2.3-11_armhf.deb ...
Unpacking dhcpcd (1:3.2.3-11) ...
Selecting previously unselected package dns-root-data.
Preparing to unpack .../dns-root-data_2019031302_all.deb ...
Unpacking dns-root-data (2019031302) ...
Selecting previously unselected package dnsmasq-base.
Preparing to unpack .../dnsmasq-base_2.80-1+rpt1_armhf.deb ...
Unpacking dnsmasq-base (2.80-1+rpt1) ...
Selecting previously unselected package dnsmasq.
Preparing to unpack .../dnsmasq_2.80-1+rpt1_all.deb ...
Unpacking dnsmasq (2.80-1+rpt1) ...
Setting up dnsmasq-base (2.80-1+rpt1) ...
Setting up dns-root-data (2019031302) ...
Setting up dnsmasq (2.80-1+rpt1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
Setting up hostapd (2:2.7+git20190128+0c1e29f-6) ...
Created symlink /etc/systemd/system/multi-user.target.wants/hostapd.service → /lib/systemd/system/hostapd.service.
Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.
Created symlink /etc/systemd/system/hostapd.service → /dev/null.
Setting up dhcpcd (1:3.2.3-11) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.16-1) ...
Processing triggers for systemd (241-7~deb10u1+rpi1) ...
bash: line 162: NO_INTERNET: unbound variable
bash: line 162: NO_INTERNET: unbound variable
bash: line 162: NO_INTERNET: unbound variable
no crontab for pi
I'm working using a Raspberry Pi Zero W, on a fresh install of Raspbian Buster (official)
running the script with :
curl https://raw.githubusercontent.com/lukicdarkoo/rpi-wifi/master/configure | bash -s -- -a Love test -c Mywifi password
I'll Be happy if you can help me to find a solution for this. :)
Line 89 in fe29787
Hello There,
It's an amazing and very quick solution.
but i want something like this:
-->Rpi working on both mode AP+STA simultaneously, it's working with your script nicely.
-->Now esp8266 as a wifi client connects to the Rpi's access point and send sensor data to raspberry pi without internet over TCP communication between them. (here TCP server running on Rpi Static Ip )
and raspberry pi connected to home router in STA mode(in background) sending this data to server or MQTT. (I had Done this whole thing with ESP8266 as a wifi gateway and esp8266 as a client but to handle big network i want to use raspberry pi)
with your script Rpi working in AP+STA But it also rout the internet to connected device or it gives internet facility to each and every connected device, for my application this thing slowing down the internet connection if there is 5-6 devices. your script is making raspberry pi a INTERNET ROUTER"
So which lines i have to change to not rout the internet to connected devices?
This works great on fresh Raspbian Lite install on PiZeroW.
I used a too-short passphrase (<8 len) and hostapd failed, with no obvious error in journalctl until I ran it manually.
Very minor, but we could check the passphrase length.
Thanks again.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I installed this to a Raspberry Pi Zero W and nameserver
in /etc/resolv.conf
is being set to 127.0.0.1 and preventing wlan0 from having access to the internet
To prevent this you have to add DNSMASQ_EXCEPT=lo
to the end of /etc/default/dnsmasq
When it is added nameserver
is properly set to 8.8.8.8
This may be the solution to #15
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I have run this script on a RPI 4 using Buster, and my AP only shows up for a few seconds after reboot, and then disappears off my WiFi list almost immediately, and the only way to get it to show back up is seemingly reboot the pi itself.
Line 77 in 429801a
Hi,
thanks for this nice script!
It works nice on Raspberry Pi Zero wh. It seems to work better with the power management turned off. If someone wants to do that for ap0 and wlan0, just add following lines to /etc/network/interfaces:
post-up iw ap0 set power_save off
post-up iw wlan0 set power_save off
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
on my fresh installed bullseye lite on the pi4 wifi script doesn't work, 'no crontab for pi' is the last message
How can I undo what this script has set up?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Thank you for this script! I tried it on a raspberry pi 4 and it works fine, just with some changes.
I had to remove from /etc/hostapd/hostapd.conf
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
After reboot both ap0 and wlan0 got an IP, but something still feels wrong. Accessing the pi from ssh ( through eth0 ) was jittery. Also checking ip monitor
I was getting a lot more logs than usual
root@raspberrypi:~# ip monitor
10.0.0.2 dev eth0 lladdr b0:7f:b9:9c:42:3c PROBE
10.0.0.2 dev eth0 lladdr b0:7f:b9:9c:42:3c REACHABLE
4: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP>
link/ether
4: ap0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP>
link/ether
Deleted 224.0.0.22 dev ap0 lladdr 01:00:5e:00:00:16 NOARP
Deleted 224.0.0.251 dev ap0 lladdr 01:00:5e:00:00:fb NOARP
Deleted ff02::fb dev ap0 lladdr 33:33:00:00:00:fb NOARP
Deleted ff02::1:ffae:1f69 dev ap0 lladdr 33:33:ff:ae:1f:69 NOARP
Deleted ff02::16 dev ap0 lladdr 33:33:00:00:00:16 NOARP
Deleted ff02::2 dev ap0 lladdr 33:33:00:00:00:02 NOARP
4: ap0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
Deleted 4: ap0 inet6 fe80::1a43:4d05:ecae:1f69/64 scope link
valid_lft forever preferred_lft forever
Deleted local fe80::1a43:4d05:ecae:1f69 dev ap0 table local proto kernel metric 0 pref medium
Deleted fe80::/64 dev ap0 proto kernel metric 256 pref medium
Deleted 224.0.0.251 dev wlan0 lladdr 01:00:5e:00:00:fb NOARP
Deleted 224.0.0.22 dev wlan0 lladdr 01:00:5e:00:00:16 NOARP
Deleted ff02::fb dev wlan0 lladdr 33:33:00:00:00:fb NOARP
Deleted ff02::1:ff6a:e280 dev wlan0 lladdr 33:33:ff:6a:e2:80 NOARP
Deleted ff02::16 dev wlan0 lladdr 33:33:00:00:00:16 NOARP
Deleted ff02::2 dev wlan0 lladdr 33:33:00:00:00:02 NOARP
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
4: ap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
4: ap0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
Deleted 224.0.0.251 dev ap0 lladdr 01:00:5e:00:00:fb NOARP
Deleted multicast ff00::/8 dev ap0 table local proto kernel metric 256 linkdown pref medium
Deleted ff02::16 dev ap0 lladdr 33:33:00:00:00:16 NOARP
Deleted 4: ap0 inet 169.254.221.64/16 brd 169.254.255.255 scope global noprefixroute ap0
valid_lft forever preferred_lft forever
Deleted local 169.254.221.64 dev ap0 table local proto kernel scope host src 169.254.221.64
4: ap0 inet6 fe80::1a43:4d05:ecae:1f69/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 3: wlan0 inet6 fe80::c2a3:4298:386a:e280/64 scope link
valid_lft forever preferred_lft forever
Deleted local fe80::c2a3:4298:386a:e280 dev wlan0 table local proto kernel metric 0 pref medium
Deleted fe80::/64 dev wlan0 proto kernel metric 256 linkdown pref medium
Deleted 3: wlan0 inet 10.0.0.10/24 brd 10.0.0.255 scope global dynamic wlan0
valid_lft 3592sec preferred_lft 3142sec
Deleted broadcast 10.0.0.255 dev wlan0 table local proto kernel scope link src 10.0.0.10 linkdown
Deleted local 10.0.0.10 dev wlan0 table local proto kernel scope host src 10.0.0.10
Deleted 224.0.0.251 dev wlan0 lladdr 01:00:5e:00:00:fb NOARP
Deleted 4: ap0 inet6 fe80::1a43:4d05:ecae:1f69/64 scope link tentative
valid_lft forever preferred_lft forever
4: ap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
broadcast 10.1.0.255 dev ap0 table local proto kernel scope link src 10.1.0.231 linkdown
10.1.0.0/24 dev ap0 proto kernel scope link src 10.1.0.231 linkdown
multicast ff00::/8 dev ap0 table local proto kernel metric 256 pref medium
4: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
4: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev ap0 proto kernel metric 256 pref medium
4: ap0 inet6 fe80::1a43:4d05:ecae:1f69/64 scope link tentative
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP>
link/ether
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
Deleted 224.0.0.22 dev wlan0 lladdr 01:00:5e:00:00:16 NOARP
Deleted multicast ff00::/8 dev wlan0 table local proto kernel metric 256 linkdown pref medium
Deleted ff02::16 dev wlan0 lladdr 33:33:00:00:00:16 NOARP
4: ap0 inet6 fe80::1a43:4d05:ecae:1f69/64 scope link
valid_lft forever preferred_lft forever
local fe80::1a43:4d05:ecae:1f69 dev ap0 table local proto kernel metric 0 pref medium
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP>
link/ether
multicast ff00::/8 dev wlan0 table local proto kernel metric 256 pref medium
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP>
link/ether
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP>
link/ether
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP>
link/ether
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
3: wlan0 inet6 fe80::c2a3:4298:386a:e280/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 3: wlan0 inet6 fe80::c2a3:4298:386a:e280/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted fe80::/64 dev wlan0 proto kernel metric 256 pref medium
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether e4:5f:01:1a:bd:91 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
3: wlan0 inet6 fe80::c2a3:4298:386a:e280/64 scope link tentative
valid_lft forever preferred_lft forever
3: wlan0 inet 10.0.0.10/24 brd 10.0.0.255 scope global dynamic wlan0
valid_lft 3600sec preferred_lft 3600sec
local 10.0.0.10 dev wlan0 table local proto kernel scope host src 10.0.0.10
broadcast 10.0.0.255 dev wlan0 table local proto kernel scope link src 10.0.0.10
10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.10
default via 10.0.0.1 dev wlan0
3: wlan0 inet 10.0.0.10/24 brd 10.0.0.255 scope global dynamic wlan0
valid_lft 3600sec preferred_lft 3150sec
10.0.0.0/24 dev wlan0 proto dhcp scope link src 10.0.0.10 metric 303
Deleted 10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.10
default via 10.0.0.1 dev wlan0 proto dhcp src 10.0.0.10 metric 303
Deleted default via 10.0.0.1 dev wlan0
10.0.0.8 dev wlan0 lladdr f0:2f:4b:10:be:c8 REACHABLE
3: wlan0 inet6 fe80::c2a3:4298:386a:e280/64 scope link
valid_lft forever preferred_lft forever
local fe80::c2a3:4298:386a:e280 dev wlan0 table local proto kernel metric 0 pref medium
4: ap0 inet 169.254.221.64/16 brd 169.254.255.255 scope global noprefixroute ap0
valid_lft forever preferred_lft forever
local 169.254.221.64 dev ap0 table local proto kernel scope host src 169.254.221.64
broadcast 169.254.255.255 dev ap0 table local proto kernel scope link src 169.254.221.64
169.254.0.0/16 dev ap0 scope link src 169.254.221.64 metric 304
I also noticed that on system status hostapd
I get the following error:
May 06 15:33:35 raspberrypi systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 1329.
May 06 15:33:35 raspberrypi systemd[1]: Stopped Access point and authentication server for Wi-Fi and Ethernet.
May 06 15:33:35 raspberrypi systemd[1]: Starting Access point and authentication server for Wi-Fi and Ethernet...
May 06 15:33:35 raspberrypi hostapd[44157]: Configuration file: /etc/hostapd/hostapd.conf
May 06 15:33:35 raspberrypi hostapd[44157]: ctrl_iface exists and seems to be in use - cannot override it
May 06 15:33:35 raspberrypi hostapd[44157]: Delete '/var/run/hostapd/ap0' manually if it is not used anymore
May 06 15:33:35 raspberrypi hostapd[44157]: Failed to setup control interface for ap0
May 06 15:33:35 raspberrypi hostapd[44157]: ap0: Unable to setup interface.
May 06 15:33:35 raspberrypi hostapd[44157]: ap0: interface state UNINITIALIZED->DISABLED
May 06 15:33:35 raspberrypi hostapd[44157]: ap0: AP-DISABLED
May 06 15:33:35 raspberrypi hostapd[44157]: ap0: CTRL-EVENT-TERMINATING
May 06 15:33:35 raspberrypi hostapd[44157]: hostapd_free_hapd_data: Interface ap0 wasn't started
May 06 15:33:35 raspberrypi hostapd[44157]: nl80211: deinit ifname=ap0 disabled_11b_rates=0
I then removed ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
from /etc/wpa_supplicant/wpa_supplicant.conf and this seems to have improved the problem. No more jittering and ip monitor log looks more normal. But I also lost the ability to use wpa_cli
I wonder if there's a better solution than this that can allow me to use wpa_cli
Thank you, this works for me on rpi zero w with raspbian lite.
my question is, when I change hostname via raspi-config
and reboot, then I can't connect to rpi by ssh [email protected]
, neither client mode nor ap mode
I have been trying to set-up a wireless access-point on my new Raspberry Pi Zero. I stumbled up this script after reading this guide https://blog.thewalr.us/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/ and decided it would be faster to configure my Pi using it. However after running the script and rebooting my Pi, I noticed that while my access point was up and running, I was no longer able to open an SSH connection into the Pi. This has made it impossible to perform further configurations I had been planning to do, so I had to re-flash the micro-sd and start again. Is there a setting I need to change somewhere before running this script to prevent this from happening?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Dumb question...
Can I set ap_ssid ap_password and client_ssid client_password the same?
I use case is that I want the clients that are connected to the RPi0W to be able to share files via samba with clients that are connected to the AP.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I tried the script, it seems that every thing is OK, but the AP is not available, unless I ran rpi--wifi.sh from the console directly and the crontab is not working.
I have the issue with RPi 4.
I wanted to comment that I got this up and working on a Zero W using a Kali.rp0w.nexmon as the underlying system. It was fairly straightforward, but not easy at all and required many tweaks. Still, what a time-saver! And it ultimately works.
I wanted to point out that the closing quote is missing in line 89. I added it.
apt install dhcpd does not work in Kali, which suggests dhcpd5 instead, which works the same (kali-rolling main non-free contrib / armel).
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi there!
I forked the repo to make some test with this script.
https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP
I have some troubles on RPI3A who run raspbian buster, when i run the configure.sh script with args after reboot i can see the AP ssid and i can use it! But if i reboot the RPI, il loose the AP mode and i can't access on the RPI through ssh.
It's look like in second state....
Then i have to reboot the RPI a second time and the AP reappears.
EDIt: find something
On boot hostapd can't start and give an error. So i chech journalctl -ex and hostapd give:
-- L'unité (unit) hostapd.service a commencé à démarrer.
janv. 07 16:19:32 timelapse hostapd[1340]: Configuration file: /etc/hostapd/hostapd.conf
janv. 07 16:19:32 timelapse hostapd[1340]: ctrl_iface exists and seems to be in use - cannot override it
janv. 07 16:19:32 timelapse hostapd[1340]: Delete '/var/run/hostapd/ap0' manually if it is not used anymore
janv. 07 16:19:32 timelapse hostapd[1340]: Failed to setup control interface for ap0
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: Unable to setup interface.
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: interface state UNINITIALIZED->DISABLED
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: AP-DISABLED
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: CTRL-EVENT-TERMINATING
janv. 07 16:19:32 timelapse hostapd[1340]: hostapd_free_hapd_data: Interface ap0 wasn't started
janv. 07 16:19:32 timelapse hostapd[1340]: nl80211: deinit ifname=ap0 disabled_11b_rates=0
janv. 07 16:19:33 timelapse systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
So i'm looking for any explaination about the errors :
"ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/hostapd/ap0' manually if it is not used "
So i have to find where put the command: sudo rm -rf /var/run/hostapd/ap0
when interface exist cause when i delete it, the hostapd service start.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Thinking about using this for travel, it would be great if I could continue to append to a file and collect clients over time and have the script attempt to connect to them in order so I don't have to configure it as I move it around
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.