Skip to content(if available)orjump to list(if available)

Cross-Platform P2P Wi-Fi: How the EU Killed AWDL

jauntywundrkind

I really wish there were some write-ups for doing wifi-p2p aka wifi-aware (the wifi alliance's proprietary branding for it) on Linux! Incredibly sad that it's just so so so undocumented; such a neat sounding suite of capabilities.

Haven't looked in 2-3 years, but found so little ehm last I looked. Very dismaying. So many folks doing "p2p" file sharing apps, but generally they assume you have setup networking already. We really need to own the means of connectivity. Especially now!

londons_explore

Unfortunately I believe it requires your WiFi firmware have the ability to switch channels with microsecond timing precision.

That means you couldn't do it with off the shelf WiFi hardware.

You might be able to do it whilst dropping existing WiFi connections during the transfer.

snops

The article links to a Linux implementation that does it with off the shelf WiFi hardware. You do need specific features in the hardware/firmware, but there are consumer devices that have that e.g. Atheros AR9280.

https://github.com/seemoo-lab/owl

It currently drops connections to an AP, but the authors of the implementation seem to believe this could be fixed:

> OWL does not allow a concurrent connection to an AP. This means, that when started, the Wi-Fi interface exclusively uses AWDL. To work around this, OWL could create a new monitor interface (instead of making the Wi-Fi interface one) and adjust its channel sequence to include the channel of the AP network.

hollow-moe

I believe most android smartphones can actually do it: I often rely on having my phone connected to wifi and also being an AP at the same time (exactly to make up for the absence of simple direct connection between my devices, using adb and some other software you can "emulate" what apple is doing with AWDL, this wifi-aware thing looks like an answer to some of my problems). Sample size is around 5 but from different brands and price ranges so I'm pretty sure it's on basically all devices.

jauntywundrkind

I'm fine having a second wifi card for wifi-p2p on Linux. Ideally the situation gets better over time, as wifi-p2p becomes a better used better travelled system.

Ideally the second wifi adapter could be USB based! For years usb cards were very second tier; I haven't tried again lately but I assume that's still largely the case.

Given that there are some pretty affordable (below $70) barebones thunderbolt docks for GPUs, it'd be neat to see some thunderbolt docks designed for one or multiple wifi cards (or other m.2).

simfoo

WiFi Aware looks interesting but there seems to be very little information out there beyond Android related docs and associated links. It seems to be hidden away behind the doors of WiFi alliance.

Can anyone familiar with the topic chime in what it would take to utilize WiFi Aware in let's say a Raspberry Pi (maybe using a different wireless chip connected via usb)? Maybe even to connect to Android smartphones

tambre

I recently wanted to do point-to-point Wi-Fi for transferring some data but apparently support for the ad-hoc IBSS mode wasn't available on my MT7925. Wi-Fi Aware is completely new to me and didn't come up while searching on the topic at all. I can't find anything about using it on Linux now either. Anybody have any references on its support?

There's a single kernel commit referencing Wi-Fi Aware from 2023 [0]. iw supposedly supports a few commands pertaining to it [1].

  [0] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.14&id=9b89495e479c5fedbf3f2eca4f1c4e9dd481265e
  [1] https://stackoverflow.com/questions/53594406/implementing-a-wifi-aware-application-outside-android

zorgmonkey

The WiFi Alliance has a habit of always have a marketing name and a different name in the spec, you'll a lot more references to it in places like WPA supplicant if you search for Neighbor Awareness Networking (NAN). Also here is the link to the spec https://www.wi-fi.org/system/files/Wi-Fi%20Aware%20Specifica...

DecentShoes

>The WiFi Alliance has a habit of always have a marketing name and a different name in the spec

What, the same people that named a consumer facing product 802.11g?

dwaite

That would be the IEEE, and I don't think the marketing people in the Wi-Fi Alliance participate at that level.

chipsa

They didn’t name it that, IEEE did.

Avamander

Any WiFi operation besides STA is in general a crapshoot, especially if the card is not meant for use in an AP. WiFi hardware vendors can't be bothered to provide fully usable stacks for anything else (if even that).

For example Intel's broken Location Aware Regulatory completely breaks any use-cases where your device is not the STA (on anything besides 2.4GHz). Most cards also have no DFS support, meaning you'll be left with a microscopic usable segment. Then there's also the problem with incorrect regulatory information.

All of which in the end makes reliable high-speed point-to-point operation very annoying to achieve. Even if it'd be totally legal. Leaving you with a terribly slow link.

myself248

Adhoc was the coolest thing, I still miss it. One day in 2002-ish, I was showing a friend some photos on my laptop and noticed a crowd had gathered over my shoulder, and there simply wasn't enough room for everyone to get a good view.

"Fire up adhoc, set it to this ssid, vnc to this address"

Two minutes later, my photos are on five screens around the coffee shop and everyone can see.

Adhoc just worked, and that's more than I can say for a great many things before or since.

apitman

My windows laptop supports creating a wifi hotspot. It even allows sharing my upstream wifi internet connection over the hotspot, which I wasn't aware was a thing until recently (my Pixel 7 also supports this). I'm sure you could do the same thing with Linux with the right incantation. Not as cool as adhoc but it's also a paradigm people are very familiar with these days.

ryao

What stops you from using it today? A wiki claims it is just 3 commands and IP configuration:

https://wiki.archlinux.org/title/Ad-hoc_networking#Manual_me...

myself248

Last time I tried it I got some error that made me think the driver didn't support it, but it's been a while. I wonder if my new card is any better...

Calwestjobs

i think this is most important post of all

people hail apple for what is essentially 3 line script XD

i do understand that it does much more. but 3 line script is closer to what it really is, then what people think it is.

KennyBlanken

[flagged]

apitman

I frequently play Age of Empires 2 with my wife and her brother. Remarkably, this game still supports LAN play in 2025, even though the netcode has been completely overhauled since 1999.

However, we decided to try it on a recent flight, and it turns out it still requires an internet connection, both to satisfy Steam, and to connect to some sort of LAN coordination server. I ended up paying $20 for in-flight wifi.

We've lost a lot in the last 30 years, but tech like wifi aware might help bring back local-first networking. I choose to believe that if solid APIs exist, developers will use them.

dathinab

> and to connect to some sort of LAN

this is actually kind of a hard UI/UX problem for game developers

many p2p+local auto recovery protocols are very bothersome, partially due to some of the protocols being bad or incomplete and a lot due to all kind of hardware & OSs partially or fully crippling them

so game devs often have to fall back to a coordinator server to provide reliable and easy to use functionality for most which also happens to often be the easiest thing to implement and maintain, and then in addition they could also implement work-arounds for the no-internet case

but that is additional cost for a overall niche use case (local co-op without internet), so it ends up in the backlog with low priority at best or gets outright killed. To make that worse steam provides tools to make it much easier to implement co-op (focused on non local co-op), and the easiest way to use them is in a way which always requires internet even for local co-op

so as long as steam doesn't put in a lot of work to make no-internet local co-op close to free to implement for most games it will never happen for most games

fulafel

What's the problem with just sending some UDP beacons to the local network broadcast address? (or multicast all-hosts address)

dathinab

- middleware in the networks not forwarding broadcast messages

- depending on device and application type you not even being able to send broadcast/the OS silently dropping them

- firewall blocking incoming TCP/UDP without hole punching

- p2p in games having security implications (unsafe network stacks, game engine etc. allowing RCEs and similar) so you want to make sure only "more trusted" communication can happen, so TLS is needed, but without actually fully secure p2p TLS is not easy, mainly there are issues with establishing trust (you either have to involve some side channel (i.e. a pin, QR code or similar) or pre-established trust.

The biggest thing is still that as a steam game you have a reliably, proven, easy to use "solution" as part of your normal steam integration which you anyway want to use to be able to use the friend invite system which has the drawback of needing internet for local coop which is niche use-case likely not selling any games. Why would a company implement an additional solution and handle all the UX issues of switching between them?

apitman

All good points. This is why I'm so excited about this development. Maybe wifi aware will provide a reliable means of local discovery. At that point we're just missing an open source library that makes the devex for implementing LAN support as good as Steam's, and baby you got a stew goin.

lawlessone

>A quietly published EU interoperability roadmap mandates Apple support Wi-Fi Aware 4.0 in iOS 19 and v5.0,1 thereafter, essentially forcing AWDL into retirement.

Whats stopping Apple from doing both?

bigfish24

I think the EU mandate forces them to do both, so that devices with AWDL are not advantaged over non-Apple devices with Wi-Fi Aware, so my read is that mandate will mean Apple devices will do both modes until they can transition AWDL off entirely.

0x457

Nothing, but since Apple is the only user of AWDL and WiFi Aware makes it redundant, why support both (in long term)?

pmontra

Because they could want to offer WiFi Aware in the EU and AWDL anywhere else, even in the long term. And switch back to AWDL everywhere if the EU stops mandating interoperability some day in the future.

dmitrygr

I’ll bet $100 that AWDL is better designed and will work better. It isn’t like Google didn’t have all the time and chances to do this right. Android beam worked 50% of the time. IIRC half of the failures were BT and half were WiFi. Airdrop is much more reliable than 50%

dathinab

nothing excepts it doesn't make sense for them

basically the mandate requires them to not hamper WI-FI Aware in anyway which pushes developers into using AWDL instead, i.e. they require it to be as good +- some technical differences in features not so relevant for 3rd party use cases

and if you provide something which works as good why should they keep AWDL around, it's just double the dev cost and AWDL is getting older and Wi-Fi Aware is getting nice WiFi7 improvements soon

so as long as they don't have some use case outside of what Wi-Fi Aware is supposed to do which happens to work with AWDL they keeping both around long term is not a very good decision economically

dwaite

That seems to be based on the assumption that a fully compliant Wi-Fi Aware implementation would be equal or superior in every case to an optimized, proprietary protocol.

mschuster91

The interesting question is authentication/authorization - at the moment, macOS greatly simplifies this as long as both devices belong to the same Apple ID. On the opposite side, Samsung does the same.

How will that work out?

lxgr

That's certainly a nice feature, but in comparison to the elephant in the room, i.e. wireless file transfers between Android and iOS being completely impossible at the moment, it's completely insignificant.

tsujamin

> wireless file transfers between Android and iOS being completely impossible at the moment

P2P proximal wireless transfer, sure, but there's half a dozen apps on your phone that'll let you punt a document, a photo, an invite to someone on the other phone OS platform.

Maybe I'm an edge case, but probably 90% of my Airdrop usage is between my own devices, so the platform taking care of the authentication story is of more utility than cross-platform transfers. If someone isn't on iOS I'll just send them the file on Signal since, if the source is my phone in the first place, it's probably not a huge transfer anyway.

lxgr

> there's half a dozen apps on your phone that'll let you punt a document, a photo, an invite to someone on the other phone OS platform.

That's exactly my point: Apps – which users have to install, which requires an Internet connection.

Also all of them routing data through some centralized server, often not end-to-end encrypted.

> If someone isn't on iOS I'll just send them the file on Signal

Approximately none of the people that I've Airdropped photos to in the past have Signal installed, and even if they do, there isn't always an Internet connection available. Airdrop also sends the original photo including all metadata and resolution, which is another big reason I like it.

On top of that, I've Airdropped photos to complete strangers (e.g. if I managed to get a nice shot of something on a tour) with which I didn't have any desire to exchange numbers, and I just would not have been able to send the photo to Android.

sneak

https://sneak.berlin/20210425/signal-is-wrecking-your-images...

This also roundtrips to the internet, which is slow and expensive compared to a LAN transfer.

You also can't attach files >100MB in Signal. No transferring an installer .iso.

mschuster91

> P2P proximal wireless transfer, sure, but there's half a dozen apps on your phone that'll let you punt a document, a photo, an invite to someone on the other phone OS platform.

Yeah, via their server, which means it's slow even if you have wifi, requires valuable data credit if not, or it requires the installation of a companion app on the other device and putting the other device in the same network.

dmitrygr

Nice of you to state your option as fact. Now let me try. Compat with Android is “completely insignificant” but magical auto-auth based on Apple ID is the “elephant in the room”. See how that works?

lxgr

I meant the opposite: Cross-platform compatibility is what’s sorely missing, and authentication is only a cherry on top, so I don’t think it ought to be a blocker.

api

Vanilla P2P Wifi is amazing for the possibilities it unlocks, but unfortunately most developers can't do security to save their lives. There will be a lot of insecure apps.

bigfish24

For something like AirDrop this will need to be sorted out, but already work occurred to reverse engineer this: https://github.com/seemoo-lab/opendrop

Would be cool if an open standard on auth forms on top of this.

fire_lake

For this to succeed I think we need a C implementation that can be used by many languages and runtimes.

lxgr

Not in C, please, since this is something that by definition will handle at least some unauthenticated low-level protocol traffic.

lxgr

How would an open implementation be compatible with this, given that Apple's implementation is based on an Apple-operated PKI?

Note that this is only a conversation about sender identification, which allows sending to a "non-world-visible" receiving device and confirmation-less sending to devices with the same iCloud account on them. Anonymous sending isn't cryptographically gated by Apple, to my knowledge.

ryao

Their documentation suggests that is only needed by contacts only mode and they wrote some code to get the needed certificates from macOS:

https://github.com/seemoo-lab/airdrop-keychain-extractor

teleforce

There is a new alternative p2p mesh wireless in town, and suprisingly it was introduced by IEEE Wi-Fi Alliance rival 3GPP. It's the very first non-cellular standard for 5G namely DECT NR+ [1]. Since it's backward compatible with DECT it will be very supportive of real-time traffic for voice.

[1] What is DECT-2020 New Radio (NR), and how big a deal is it? (2021)

https://news.ycombinator.com/item?id=39849335

apitman

If you've never heard of Ditto before, they're one of the leaders in cross platform small-scale mesh networking.

If they're excited about this, I'm excited about this.

Eduard

> Wi-Fi Ad-hoc. It never gained widespread use.

I don't think this is true. In the early 2000s, in Germany, the alternative, now vastly used "infrastructure mode" was rare because Wi-Fi basestations were rare and expensive, e.g. DSL modems didn't have built-in Wi-Fi.

So the only way of wirelessly sharing internet at home / files with friends at university (which also didn't have Wi-Fi yet) was with ad-hoc mode.

rubatuga

This is good news

dwaite

My understanding is that Apple already does have Wi-Fi Aware support (as it is required for interoperable implementations of things like ISO 18013-5).

Is this about mandating a version upgrade, or about adding some developer API surface for it?

formerly_proven

I dunno what the site is doing (mining crypto?), but it takes two cores to fullest throttle for me.

ecshafer

I think it might be the css animation that moves the dots on the background.

Timon3

It's not a CSS animation, it's canvas with p5. It probably renders every frame, even though the rendered result doesn't change if there hasn't been a click.