Closed IronBit-0 closed 2 years ago
On raspberry pi zero w 1.1, I found a method.
Installing OWL seperately, then running sudo owl -i mon0 -N
and leaving it running, then running sudo ./goopendrop ./config.json
in a separate terminal/ssh window works.
I installed OWL following the instructions from owlink.org.
However, running sudo owl -i mon0 -N
only works once, because every subsequent time you run it, it returns:
ERROR: pcap: unable to activate device mon0 (That device is not up)
ERROR: Could not open device: mon0
ERROR: tun: unable to set HW address
ERROR: Could not open device: awdl0
ERROR: could not initialize core
Running sudo ifconfig mon0 up
doesn't help, as that returns:
SIOCSIFFLAGS: No space left on device
The only fix I have found is to run sudo reboot
.
:/
I've hit another roadblock on Raspbian Lite 32 on Raspberry Pi 0 w 1.1.
I run sudo owl -i mon0 -N
in one terminal, and it returns:
INFO : WLAN device: mon0 (addr e8:4e:6:99:f:43)
INFO : Host device: awdl0
I run sudo ./goopendrop ./config.json
in another terminal. It returns:
INFO[0000] Config File: ./config.json
INFO[0000] Using Wifi Interface: mon0
WARN[0000] Waiting for AWDL Interface (awdl0) to Start
The terminal running OWL then returns:
Terminated
The window running goopendrop then returns:
INFO[0000] Config File: ./config.json
INFO[0000] Using Wifi Interface: mon0
WARN[0000] Waiting for AWDL Interface (awdl0) to Start
ERRO[0005] owl Interface not running: awdl0
panic: owl Interface not running: awdl0
goroutine 1 [running]:
main.initAllRequired(0x2c71710, 0x2e68be0, 0x2e4e8c0, 0x2e4e940)
/home/pi/GoOpenDrop/init.go:142 +0x6b8
main.main()
/home/pi/GoOpenDrop/main.go:32 +0xe0
If I don't run OWL in another terminal at all, only running goopendrop, I get stuck on:
INFO[0000] Config File: ./config.json
INFO[0000] Using Wifi Interface: mon0
WARN[0000] Waiting for AWDL Interface (awdl0) to Start
and I can't start OWL after I start goopendrop, because it always returns this:
ERROR: pcap: unable to activate device mon0 (That device is not up)
ERROR: Could not open device: mon0
ERROR: tun: unable to set HW address
ERROR: Could not open device: awdl0
ERROR: could not initialize core
until I restart the pi completely.
I'm not actually certain if I'm supposed to run OWL separately, I'm just testing things out.
Found the issue, fixed in #5. As it turns out OWL was getting terminated because goopendrop does that before it starts it's own OWL. When goopendrop tried to start OWL, it wasn't doing it with permissions, so adding sudo to owl.go worked for me. I have no idea what the problem with SIOCSIFFLAGS: No space left on device
and not being able to start OWL was about, but it doesn't happen anymore.
if you are using MT7601U chipset, you don't need to add "-n" to your owl command, since your adapter already support active monitoring mode. and you are right about owl, GoOpenDrop is killing any process that has the name of owl while starting its basically doing the following: kill any process that has owl in it disable the wifi adapter run owl
based on my testing, you never need to add mon0 interface. owl will take care of that, it will change the adapter to monitor mode
you can as well complely remove GoOpenDrop starting owl by just commenting this line in init.go
//Run Owl Interface
// go owl.StartOwlInterface(config.OwlWlanDeviceName, config.OwlChannel, config.AWDLInterfaceName, log)
this will prevent GoOpenDrop from killing running owl, and it will just wait for "awdl0" interface to be ready
If my pull request #5 makes sense, could you merge it?
I'l replied back to pull request
I would appreciate if you could give us your feedback on PI zero, and if the whole thing is working for you
Thank you
It's not working for me yet. I'm getting the INFO[0033] Airdrop Beacons Received from address=xx:xx:xx:xx:xx:xx, with rssi=xx
. I have a folder of the name of my iPhone in OUTBOX with a png picture in it. I have not gotten my phone to detect the Pi's Airdrop receive. I have not gotten the Pi to send any files to my phone. This is probably because I'm using self-generated keys instead of apple keys. I'll update you when I've got genuine apple keys to use and test for.
On a desktop computer, Software: Ubuntu 22.04.1 LTS Go version: "go version go1.18.1 linux/amd64" Hardware device is a Ralink Technology, Corp. MT7601U Wireless Adapter.
Ran
sudo iw phy phy1 interface add mon0 type monitor
sudo ifconfig mon0 up
iw dev shows that mon0 exists
Running
sudo ./goopendrop ./config.json
in out/amd64 returnsand it does not change from that.
Thanks for the support