New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to start on Raspberry Pi 3 #3
Comments
Hi @rosenk, unfortunately I don't have a Raspberry Pi 3 for testing. Was the docker container started successfully? otherwise the iw command will fail. |
Yes the container even remains started after the fail. There is indeed a dir where
so everything prior iw is correct, but then when I manually try:
The same error occurs. Please help, It would be great to switch my raspberry to AP and back with docker |
It seems that there is a problem when exporting the wifi interface of the Raspberry Pi 3 to a container, as pointed in the following link: https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=153212&p=1003680 I'm afraid I cannot help further here. I would give it a try with a USB wifi card to make sure the hardware (or possibly "iw"?) is the problem here. |
@fgg89 Any thoughts on this? |
My current take on this is to use create_ap. Probably it will work in docker --privileged too |
I'm running now after replacing If it doesn't work I'll try create AP! |
Thanks, and good luck |
It worked. |
I will upload to Dockerhub and specify it's for RPi3. Quick question - do you know of a way to bridge to local wifi network instead of just ethernet? |
Hi, Thank you for the feedback! Running a container with Regarding the question of bridging a local wifi network, can you provide more details about this setup? remember that a wireless interface in managed mode cannot be bridged. |
Good to know about security. Is password protection on the hotspot able to mitigate this? About bridging, I made a locally hosted page with for users to enter wifi credentials to transfer the Pi to the user's network. Right now the docker-ap hotspot and the local web page + data entry work, as well as the script to connect to a new network (using the python |
Exposing the host networking to the docker container is unrelated to wireless encryption. You will find more info in the Docker documentation but basically the thing is that by using If I understand correctly, you want to be able to be connected to a wireless network and at the same time run |
As far as I know the rpi3 can't be simultaneously wifi access point and wifi client. That is a hardware limitation that can't be circumvented with docker tricks |
I should have been clearer, I'm trying to set up an access point to get wireless credentials, store them, turn off the AP, then log on to wlan0 with provided credentials. EDIT - This works: os.system('sudo ifconfig wlan0 down')
os.system('sudo ifconfig wlan0 up') --> call wifi_login.py --> change startup script to call wifi_login.py instead of AP/web server Not the most graceful solution but it works! Will post to my account if anyone is interested. |
I am not aware of any wireless interface that works in client and AP mode simultaneously, this is simply not possible. If you want to see your wireless interface capabilities and possible mode combinations you can run Thank you for your feedback @N2ITN, I'm glad you found the project useful. |
I'm trying to use this to start access point into rpi3 but it fails with:
| \ ___ | |___ _ _ /\ | _ \
| |) / _ / | / / -) '| / _ | /
|/**/**|__|| // __|
[INFO] Architecture: armv7l
[INFO] Number of physical wireless interfaces connected: 1
[INFO] Docker image fgg89/armhf-docker-ap found
[INFO] Unblocking wifi and setting wlan0 up
[INFO] Found WLAN config file
[+] Generating hostapd.conf
[+] Generating dnsmasq.conf
[+] Starting the docker container with name ap-container
command failed: Operation not supported (-95)
[+] Configuring wlan0 with IP address 192.168.7.1
Device "wlan0" does not exist.
Cannot find device "wlan0"
Cannot find device "wlan0"
[+] Adding natting rule to iptables (container)
[+] Enabling IP forwarding (container)
[+] Starting hostapd and dnsmasq in the docker container ap-container
I have tried to debug it within my limited knowledge on this subject and apparently:
iw phy "$PHY" set netns "$pid"
fails with
command failed: Operation not supported (-95)
I have no idea what exactly this means. Is it not supported by the hardware?
$iw list
output:Please help.
The text was updated successfully, but these errors were encountered: