... | ... | @@ -636,11 +636,11 @@ A local-only hotspot is similar to a Wi-Fi Direct legacy mode access point, whic |
|
|
When using any of these methods to create an access point, clients connected to the access point can typically connect to each other, and to the device providing the access point, via TCP and UDP.
|
|
|
The device providing the access point may not be able to connect to clients, however, because Android treats the access point's network interface differently from other network interfaces.
|
|
|
|
|
|
We still need to test whether LAN multicast and the NSD API can be used (by clients and/or the device providing the access point) on networks where the access point is created through each of these methods.
|
|
|
|
|
|
Some devices can provide an access point while simultaneously being a client of another Wi-Fi network, which might make it possible to create a mesh in which each device would act as a client, an access point, or both.
|
|
|
#### Notes
|
|
|
|
|
|
Once a device has created an access point, it could make the network name and password available via other transport layers (such as BLE or Wi-Fi Direct service discovery) to enable nearby devices to discover the access point, recognise that it belongs to the mesh, and connect to it.
|
|
|
* We still need to test whether LAN multicast and the NSD API can be used (by clients and/or the device providing the access point) on networks where the access point is created through each of these methods.
|
|
|
* Some devices can provide an access point while simultaneously being a client of another Wi-Fi network, which might make it possible to create a mesh in which each device would act as a client, an access point, or both.
|
|
|
* Once a device has created an access point, it can advertise the network name and password via other transport layers (such as BLE or Wi-Fi Direct service discovery) so that potential clients don't need to perform Wi-Fi scans.
|
|
|
|
|
|
### Wi-Fi Direct
|
|
|
|
... | ... | @@ -894,7 +894,7 @@ Not all devices would be able to act as access points, and users would not be ab |
|
|
|
|
|
Android versions 8 and later (API level >= 26) provides a high-level API for discovering nearby Bluetooth and Wi-Fi devices without the application needing to hold the various permissions that are required for using the Bluetooth and Wi-Fi APIs directly.
|
|
|
|
|
|
https://developer.android.com/guide/topics/connectivity/companion-device-pairing
|
|
|
<https://developer.android.com/guide/topics/connectivity/companion-device-pairing>
|
|
|
|
|
|
The API presents a list of devices to the user, who can choose a device. Information about the chosen device is then given to the application, which can interact with the chosen device again in future.
|
|
|
|
... | ... | @@ -904,8 +904,8 @@ This API is unlikely to be useful for creating mesh networks in which nearby dev |
|
|
|
|
|
Google Nearby is a closed source library that uses Bluetooth and Wi-Fi to make connections between nearby devices.
|
|
|
|
|
|
* https://developers.google.com/nearby/
|
|
|
* https://github.com/francozappa/REarby
|
|
|
* <https://developers.google.com/nearby/>
|
|
|
* <https://github.com/francozappa/REarby>
|
|
|
|
|
|
Most of our information about Nearby comes from the paper [Nearby Threats: Reversing, Analyzing, and Attacking Google’s ‘Nearby Connections’ on Android](https://francozappa.github.io/publication/rearby/) by Daniele Antonioli and colleagues.
|
|
|
|
... | ... | @@ -936,11 +936,15 @@ This was tested with the Samsung Galaxy A21s, LGE Nexus 5X and Moto G 4G. |
|
|
|
|
|
### OuiSync
|
|
|
|
|
|
It is currently possible to route Briar one-on-one messages using a Ouisync repo by using the file export function. This idea could be further explored by building processes in Briar to more easily export large amounts of messages, or even automate the import and export of encrypted files.
|
|
|
It is currently possible to transport Briar messages between contacts via a OuiSync repo by using Briar's file export function.
|
|
|
This idea could be further explored by adding features to Briar to more easily export large amounts of messages, or even automate the import and export of encrypted files.
|
|
|
|
|
|
TODO: Move this to the OuiSync/Briar collaboration report
|
|
|
|
|
|
#### P2P Connections over Intranets
|
|
|
|
|
|
One existing question related to Ouisync and other alternative networking tools is how they perform in situations where there is a national-level intranet, and two peers both inside the intranet want to connect. If reliable ways to make p2p intranet connections are found, it could be an interesting transport layer for Briar or a similar app to implement.
|
|
|
One open question related to OuiSync and other alternative networking tools is how they perform in situations where there is a national-level intranet that is cut off from the global internet, and two peers inside the intranet want to connect to each other.
|
|
|
If reliable ways to make p2p intranet connections are found, it could be an interesting transport layer for Briar or a similar app to implement.
|
|
|
|
|
|
### LoRa / Ham Radio
|
|
|
|
... | ... | @@ -948,16 +952,44 @@ TODO |
|
|
|
|
|
### Filesystem API
|
|
|
|
|
|
TODO
|
|
|
|
|
|
## Future Considerations
|
|
|
|
|
|
### Mix-and-Match Transport Layers
|
|
|
### Combining Transport Layers
|
|
|
|
|
|
There is no single transport layer that works for all devices without user interaction:
|
|
|
|
|
|
Out of the transport layers covered in this report, each transport layer has it's own trade-offs. By combining transport layers in interesting ways, we can create higher networking abstractions that could possibly offer better performance than each individual transport layer on it's own. One immediate example of this is using Bluetooth to advertise Wi-Fi identifiers to bootstrap LSD connections. Doing large file transfers over LAN is much preferred to doing it over Bluetooth, so this approach could lead to better performance in situations where one peer is connected to a Wi-Fi network that a nearby peer could also connect to.
|
|
|
* Bluetooth RFCOMM requires either making the device temporarily discoverable (which requires user interaction) or knowing the device's own address (which requires API level < 27 or "bro mode").
|
|
|
* BLE peripheral mode isn't supported on some older devices.
|
|
|
* BLE L2CAP CoC requires API level >= 29 and a Bluetooth 5 chipset.
|
|
|
* NSD and LSD use multicast, which is not supported by some devices and LANs.
|
|
|
* Connecting to a Wi-Fi Direct device requires user interaction with a confusing user experience.
|
|
|
* Connecting to a Wi-Fi network exposes the user to the soft AP attack, unless the network is a Wi-Fi Direct legacy mode access point and the client is using API level >= 29.
|
|
|
* Ad hoc Wi-Fi isn't widely supported and has no Android API.
|
|
|
* Wi-Fi Aware isn't widely supported.
|
|
|
* The companion device pairing API requires API level >= 26 and user interaction.
|
|
|
* Google Nearby requires a proprietary library and is vulnerable to the soft AP attack.
|
|
|
|
|
|
Each transport layer also has its own trade-offs (eg BLE GATT is slower than Wi-Fi for bulk data transfer).
|
|
|
|
|
|
By combining transport layers, we can create abstractions that may offer better performance than each individual transport layer on its own.
|
|
|
|
|
|
For example, a device could create a Wi-Fi Direct legacy mode access point and then advertise the network name and password via BLE advertising and Wi-Fi Direct service discovery.
|
|
|
Nearby devices running Android version 10 or later (API level >= 29) could use the Wi-Fi Direct API to connect to the access point, and could then use NSD or LSD to discover other clients connected to the same access point.
|
|
|
Nearby devices running older versions of Android could instead use BLE GATT to connect to the advertiser, with an allocator characteristic being used to manage concurrent connections.
|
|
|
The advertiser could inform connected centrals of their own Bluetooth classic addresses ("bro mode"), enabling those devices in turn to advertise their classic addresses via BLE, Wi-Fi Direct service discovery and NSD in order to receive RFCOMM connections.
|
|
|
|
|
|
The soft AP attack unfortunately rules out some interesting options, such as using the `WifiManager` API to connect to a legacy mode access point on Android versions 9 and earlier (API level <= 28), or using BLE advertising and Wi-Fi Direct service discovery to share the network name and password of an access point that a device is connected to.
|
|
|
|
|
|
### Evaluate Briar's Threat Model
|
|
|
|
|
|
TODO: What does this mean?
|
|
|
|
|
|
### Transport Energy Draw Experiments
|
|
|
|
|
|
TODO: Create a future work subsection in the Mobly section?
|
|
|
|
|
|
# Test Automation via Mobly
|
|
|
|
|
|
Testing mesh networking software is often challenging from a developer's perspective because it usually entails juggling handfuls of hardware devices.
|
... | ... | |