how does wi-fi direct work?

226 views

Download play was one of the DS’s greatest features, and something I’ve always wondered why similar systems aren’t used anywhere else? Is there a reason why, is it difficult to do?

AFAIK it’s something like wifi direct, the thing printers use. I’m interested in game development myself so any details on how this works would be enlightening.

In: 0

Anonymous 0 Comments

Wi-Fi Direct is part of the [Wi-Fi spec](https://www.wi-fi.org/discover-wi-fi/wi-fi-direct), and not technically difficult to implement for a hardware/driver/platform manufacturer.

The Switch uses a form of it for “Local Wireless” multiplayer. Androids also use it for tethering (“hotspot”). It doesn’t really make sense outside of portable devices because they’re almost certainly going to have a wireless access point and router available. If it’s not used in gaming as frequently as you’d like it’s because of business decisions, not cost or technical reasons. Companies rarely enjoy losing the ability to monitor your activity, check licences, force updates etc.

From software development perspective there’s nothing really special to using it. As a game developer you’ll be using libraries/the game engine and/or the underlying platform to handle the actual network connection part. Your netcode only deals with data transfer over TCP/IP as it would with LAN or Internet access.

As for “how it works”, the high level is one of the devices essentially becomes a software Access Point (the Wi-Fi Direct Group Owner) which other devices can connect to. The devices use Wi-Fi Protected Setup (WPS) to secure the connection with WPA2. As long as the other devices support Wi-Fi/WPS/WPA2 they can connect even if they don’t themselves support Wi-Fi Direct.

More detail than that would require digging into the [spec](https://www.wi-fi.org/file/wi-fi-direct-specification) which isn’t suitable for ELI5.