seemoo-lab / opendrop

An open Apple AirDrop implementation written in Python
https://owlink.org
GNU General Public License v3.0
8.48k stars 265 forks source link

OpenDrop can find/send to mac but not iPhones, and doesn't show up for receive #80

Open c1h1r1i1s1 opened 2 years ago

c1h1r1i1s1 commented 2 years ago

I've been battling away with a Raspberry Pi 4 trying to get owl/opendrop to work. To make owl/nexmon to work i've stepped the kernel version down to 5.4.81, and have installed specific firmware for the bcm43455c0 chipset. I've managed to get monitor mode working on interface mon0, and it seems that frame injection is working as well. When starting Owl, I can see peers being added/removed successfully and things seem to be working. On the opendrop side, the receive starts with

Announcing service: host raspberrypi, address fe80::e65f:1ff:fe78:f525, port 8771
Starting HTTPS server

as expected, however nothing shows up on mac/iphone airdrop menus. Weirdly enough, I can actually find my mac and send files to it, however not Iphones. I can also create a seperate tab with receive running, and i can send files to it just on the Pi. The problem is I cannot receive anything on the Pi itself. It does not show on other devices. When debuggin on owl, it seems that the awdl interface is not working correctly;

10:56:31 TRACE: awdl_action: receive MIF from 2a:be:86:5e:3:e (rssi -54)
10:56:31 DEBUG: peer 2a:be:86:5e:3:e () changed channel sequence to 149,149,149,149,149,0,0,0,6,149,149,149,149,0,0,0
10:56:31 TRACE: awdl: not handling HT Capabilities (7)
10:56:31 TRACE: awdl: not handling Synchronization Tree (20)
10:56:31 TRACE: awdl: not handling VHT Capabilities (17)
10:56:31 TRACE: awdl: not handling Service Parameters (6)
10:56:31 INFO : add peer 2a:be:86:5e:3:e ()
10:56:31 TRACE: send MIF
10:56:31 TRACE: awdl_action: receive MIF from 2a:be:86:5e:3:e (rssi -54)
10:56:31 TRACE: awdl: not handling HT Capabilities (7)
10:56:31 TRACE: awdl: not handling Synchronization Tree (20)
10:56:31 TRACE: awdl: not handling VHT Capabilities (17)
10:56:31 TRACE: awdl: not handling Service Parameters (6)
10:56:31 TRACE: send PSF
10:56:31 TRACE: send MIF
10:56:31 TRACE: awdl_action: receive MIF from 2a:be:86:5e:3:e (rssi -52)
10:56:31 TRACE: awdl: not handling HT Capabilities (7)
10:56:31 TRACE: awdl: not handling Synchronization Tree (20)
10:56:31 TRACE: awdl: not handling VHT Capabilities (17)
10:56:31 TRACE: awdl: not handling Service Parameters (6)
10:56:31 TRACE: send MIF
10:56:31 TRACE: send PSF
10:56:31 DEBUG: new election tree: e4:5f:1:78:f5:25 -> 2a:be:86:5e:3:e (met 61, ctr 10929)
10:56:31 TRACE: send MIF
10:56:31 TRACE: send MIF
10:56:31 TRACE: send PSF

However when I run 'ip n' I can successfully see a list of the current neighbours, so perhaps things are working.

Not sure if this has anything to do with it, but I'm also getting this error from opendrop: AttributeError: 'AirDropBrowser' object has no attribute 'update_service'

Lastly, I have also tried different channels 6,44,149 and am finding that I have to do a combination of 6 and 149 with nexutil and owl to make it work at the moment, otherwise I get this error; ERROR: unable to inject packet (send: Resource temporarily unavailable)

This may be more of an issue for OWL rather than opendrop but any help would be excellent; I'm sure there would be many other's hoping to get opendrop working on the Pi 4! Then again it might just be impossible for the Pi 4 to have this working at all at the moment. Sorry if i've left anything out, it's my first time asking questions on github.

Cheers

Sn0wfreezeDev commented 2 years ago

I think the main reason here is that the Mac can receive files using WiFi directly and the iPhone only uses AWDL. It could be that the current OWL version is no longer fully compatible with the newest AWDL on iOS

c1h1r1i1s1 commented 2 years ago

I think the main reason here is that the Mac can receive files using WiFi directly and the iPhone only uses AWDL. It could be that the current OWL version is no longer fully compatible with the newest AWDL on iOS

Thanks for the reply, I was worried this just may be the case. Hopefully OWL gets updated or airdrop goes open source some day!

mcr-ksh commented 2 years ago

not exactly the same issue but similar. iPhone13 can't receive (opendrop send) or won't be detected "opendrop receive". mt76x2u chipset. iPhone12 works. I would help out on fixing if any hints

hpfmn commented 2 years ago

Same here works with a Mac running macOS 11.6.3 but not with an iPhone 8 running 15.3

hpfmn commented 2 years ago

interesstingly enough I see peers added and remove in OWL