Comments (15)
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.
from docker-ap.
Yes the container even remains started after the fail. There is indeed a dir where
pi@raspberrypi:/var/run/netns $ ll
total 0
lrwxrwxrwx 1 root root 17 окт 12 15:23 9624 -> /proc/9624/ns/net
so everything prior iw is correct, but then when I manually try:
pi@raspberrypi:/var/run/netns $ sudo iw phy phy0 set netns 9624
command failed: Operation not supported (-95)
The same error occurs. Please help, It would be great to switch my raspberry to AP and back with docker
from docker-ap.
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.
from docker-ap.
@fgg89 Any thoughts on this?
https://stackoverflow.com/questions/30019734/docker-get-access-to-wifi-interface
from docker-ap.
My current take on this is to use create_ap. Probably it will work in docker --privileged too
from docker-ap.
I'm running now after replacing -net=bridge
with -net=host
in line 178 of docker_ap as per the SO link I posted, will let you know how it goes.
If it doesn't work I'll try create AP!
from docker-ap.
Thanks, and good luck
from docker-ap.
It worked.
from docker-ap.
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?
from docker-ap.
Hi,
Thank you for the feedback! Running a container with -net=host
will open up a security breach since the container networking will not be containerized.
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.
from docker-ap.
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 wifi
module). However, the two don't work together, even if I first stop the docker container before interfacing with wln0 with the wifi
module.
from docker-ap.
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 net=host
you are able to access all the host network interfaces from the container and that goes against the idea of container isolation.
If I understand correctly, you want to be able to be connected to a wireless network and at the same time run docker_ap
to create a hotspot using the same wireless interface? If that's the setup, it cannot work as the interface will only work as a client or as an access point, in that case you would either need an Ethernet connection or a second wireless interface.
from docker-ap.
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
from docker-ap.
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:
Add bash script that starts AP + local web server to /etc/rc.local
so it runs on boot --> enter credentials fro web interface, store to txt --> restart wlan with:
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.
from docker-ap.
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 iw list
.
Thank you for your feedback @N2ITN, I'm glad you found the project useful.
from docker-ap.
Related Issues (13)
- typo error in code docker-ap/build/Dockerfile_x86_64 HOT 1
- is it possible to remove external network manipulation? HOT 3
- USB WLAN Interface not found HOT 5
- --net option to override docker --net=bridge on docker-ap start command
- modifications for "Realtek 802.11n WLAN Adapter" (usb connected) wifi (rtl8192cu)
- Cant get wifi ax on rtl8852be working?
- Help (odin project) HOT 1
- Remove privileged flag HOT 1
- `iw phy "$PHY" set netns "$pid"` Fails with "Operation not supported" HOT 5
- not working in stretch? HOT 1
- Support for arbitrary `hostapd` parameters HOT 1
- show connected devices HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-ap.