Closed ki9us closed 5 years ago
@keith24 Sorry I have been traveling a lot for work lately and have not had much time to check up on this project. Have you tried disconnecting the other interface? Are you able to manually create virtual interfaces?
@cjimti No problem... I've been travelling myself and finally got a decent wifi connection to try this out.
I physically disconnected the dongle and saw it disappear from ifconfig. But when I ran the docker container uap0 was still not created.
I rebooted with the dongle detached and then it worked, creating uap0.
I plugged it back in and restarted. Then I was able to create a new virtual interface based on wlan0 as well as the external dongle:
$ sudo ifconfig wlan0:0 10.43.0.1
$ ifconfig wlan0:0
wlan0:0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.43.0.1 netmask 255.0.0.0 broadcast 10.255.255.255
ether b8:27:eb:1b:58:0b txqueuelen 1000 (Ethernet)
$ sudo reboot
$ sudo ifconfig wlx00e04c1a7f2d:0 10.43.0.1
$ ifconfig wlx00e04c1a7f2d:0
wlx00e04c1a7f2d: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.43.0.1 netmask 255.0.0.0 broadcast 10.255.255.255
ether 00:e0:4c:1a:7f:2d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
At least I have a workaround: I can boot with the dongle unplugged, then plug it in after iotwifi starts up.
At least, that's the command I got when I googled "Add a virtual interface linux"
I see in iotwifi/commands.go#L39 that the command iotwifi uses is iw phy phy0 interface add uap0 type __ap
. So let's try that after rebooting with the dongle unplugged:
$ sudo iw phy phy0 interface add uap0 type __ap
$
And plugged in:
$ sudo iw phy phy0 interface add uap0 type __ap
command failed: No such device (-19)
So I guess there's the issue. Wish I could help more but I don't know what's going on at all.
Haven't tested yet (and I won't be able to for a minute), but according to the iw manpage, it might work to use iw phy#0
instead of iw phy phy0
, if I'm reading it correctly.
@keith24 Thank you for researching this. I have not encountered this problem, but it does look like you are using a much newer version of Raspian. Looking forward to your test results. Also if you would like to submit a pull request I am open to any contributions.
OK. I made the change. What docker build flags should I use? I'm new to docker.
@keith24 to test the build simply docker build -t somename .
if you want to put it on hub.docker.com you will need to tag it something like USERNAME/iotwifi:VERSION then do a docker push USERNAME/iotwifi:VERSION
OK, it still didn't create uap0
. And I could have probably saved time by just running
$ sudo iw phy+0 interface add uap0 type __ap
right in the shell. I did that and still got the same error, command failed: No such device (-19)
.
The first google results for the error yielded this answer on superuser SE, which inspired me to check if virtual interfaces are supported by my device:
$ iw list | grep 'interface combinations'
valid interface combinations:
interface combinations are not supported
So it sounds like it'll never work with this dongle. :disappointed:
I'm submitting a ...
Do you want to request a feature or report a bug?
Report a bug or get help
Then running
ifconfig
doesn't show uap0.I have two wireless interfaces, if that could be part of the problem.
See above
Making it work?
Please tell us about your environment:
Linux raspberrypi 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l GNU/Linux
)Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
See above