... | @@ -20,6 +20,12 @@ This report describes the team's findings so far for the multi-hop public mesh s |
... | @@ -20,6 +20,12 @@ This report describes the team's findings so far for the multi-hop public mesh s |
|
|
|
|
|
## Research Goals
|
|
## Research Goals
|
|
|
|
|
|
|
|
This research falls within the broad area of delay-tolerant networking (also called disruption-tolerant networking).
|
|
|
|
In circumstances where it's impossible to provide real-time connectivity between all the devices participating in a network, delay-tolerant networks propagate data in a "store, carry and forward" fashion: data is passed between participating devices whenever they have an opportunity to communicate, the devices store the data, and they may later pass it on to other devices, perhaps after moving to new locations.
|
|
|
|
|
|
|
|
We aim to build delay-tolerant mesh networks using hardware that is widely available around the world and is under the effective control of ordinary people at a local level.
|
|
|
|
Smartphones are nearly ubiquitous and have various means of connecting to each other, so they are the most promising devices for our purposes.
|
|
|
|
|
|
Before designing protocols to achieve high-level goals such as multi-hop propagation of data across the mesh, we need to understand the various transport layers that could be used for making connections between devices.
|
|
Before designing protocols to achieve high-level goals such as multi-hop propagation of data across the mesh, we need to understand the various transport layers that could be used for making connections between devices.
|
|
The properties of these transport layers will impose constraints on the higher layers of the protocol stack, and will also affect the mental models that users need to build (with the help of the user interface) in order to use the mesh effectively.
|
|
The properties of these transport layers will impose constraints on the higher layers of the protocol stack, and will also affect the mental models that users need to build (with the help of the user interface) in order to use the mesh effectively.
|
|
|
|
|
... | @@ -40,7 +46,7 @@ Several of the transports discussed below have advertising and discovery mechani |
... | @@ -40,7 +46,7 @@ Several of the transports discussed below have advertising and discovery mechani |
|
|
|
|
|
We are looking for transport layers that enable the creation of smartphone-based mesh networks. To achieve this, a transport layer must enable smartphones to discover and/or connect to other smartphones nearby, either with or ideally without the support of infrastructure.
|
|
We are looking for transport layers that enable the creation of smartphone-based mesh networks. To achieve this, a transport layer must enable smartphones to discover and/or connect to other smartphones nearby, either with or ideally without the support of infrastructure.
|
|
|
|
|
|
If infrastructure is needed, it must be of a kind that is already widely deployed worldwide and under the effective control of ordinary people at a local level (rather than national telecom providers, for example).
|
|
If infrastructure is needed, it must be of a kind that is already widely deployed worldwide and under the effective control of ordinary people at a local level.
|
|
|
|
|
|
Suitable transport layers must be supported by a wide range of smartphones of different models and manufacturers, and must not require root access, which is only available to technically skilled users and only on certain phone models.
|
|
Suitable transport layers must be supported by a wide range of smartphones of different models and manufacturers, and must not require root access, which is only available to technically skilled users and only on certain phone models.
|
|
|
|
|
... | @@ -82,9 +88,9 @@ All of the source code for this project can be found in the [Public Mesh Testbed |
... | @@ -82,9 +88,9 @@ All of the source code for this project can be found in the [Public Mesh Testbed |
|
|
|
|
|
## Bluetooth
|
|
## Bluetooth
|
|
|
|
|
|
Bluetooth is a short-range radio technology that comes bundled with most modern day mobile devices.
|
|
Bluetooth is a short-range radio technology that comes bundled with most modern mobile devices.
|
|
It allows devices to discover each other and transfer data over a range of up to 10 metres.
|
|
It allows devices to discover each other and transfer data over a range of about 10 metres.
|
|
The availability of Bluetooth APIs on most modern day smartphones makes Bluetooth an attractive transport for infrastructure-free data transfers, like those needed for a public mesh system.
|
|
The availability of Bluetooth APIs on most smartphones makes Bluetooth an attractive transport for infrastructure-free data transfers, like those needed for a public mesh system.
|
|
|
|
|
|
### Resources
|
|
### Resources
|
|
|
|
|
... | @@ -127,6 +133,9 @@ The Bluetooth standard defines a profile called RFCOMM that supports socket-like |
... | @@ -127,6 +133,9 @@ The Bluetooth standard defines a profile called RFCOMM that supports socket-like |
|
|
|
|
|
If encryption and/or authentication is needed at the Bluetooth layer then the devices must be paired, but an application can request a socket that does not use encryption/authentication at the Bluetooth layer, and therefore does not require pairing. This enables an Android device to connect to another device without user interaction, if the first device knows the second device's Bluetooth classic address and there is prior agreement about the UUID of the RFCOMM service.
|
|
If encryption and/or authentication is needed at the Bluetooth layer then the devices must be paired, but an application can request a socket that does not use encryption/authentication at the Bluetooth layer, and therefore does not require pairing. This enables an Android device to connect to another device without user interaction, if the first device knows the second device's Bluetooth classic address and there is prior agreement about the UUID of the RFCOMM service.
|
|
|
|
|
|
|
|
* <https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#listenUsingInsecureRfcommWithServiceRecord(java.lang.String,%20java.util.UUID)>
|
|
|
|
* <https://developer.android.com/reference/android/bluetooth/BluetoothDevice#createInsecureRfcommSocketToServiceRecord(java.util.UUID)>
|
|
|
|
|
|
#### Access to the Bluetooth classic address
|
|
#### Access to the Bluetooth classic address
|
|
|
|
|
|
If an application can find out the device's own Bluetooth classic address and share it with another device out-of-band then an RFCOMM connection can be made between the devices without needing user confirmation at any stage.
|
|
If an application can find out the device's own Bluetooth classic address and share it with another device out-of-band then an RFCOMM connection can be made between the devices without needing user confirmation at any stage.
|
... | @@ -134,6 +143,8 @@ If an application can find out the device's own Bluetooth classic address and sh |
... | @@ -134,6 +143,8 @@ If an application can find out the device's own Bluetooth classic address and sh |
|
On Android versions 6 and later (API level >= 23), applications do not have access to the device's own Bluetooth classic address.
|
|
On Android versions 6 and later (API level >= 23), applications do not have access to the device's own Bluetooth classic address.
|
|
There are workarounds for accessing the address up to Android 8 (API level <= 26).
|
|
There are workarounds for accessing the address up to Android 8 (API level <= 26).
|
|
|
|
|
|
|
|
<https://code.briarproject.org/briar/briar/-/blob/3bb39c2aa316b5911eab46b602b9029d281dbd1e/bramble-android/src/main/java/org/briarproject/bramble/util/AndroidUtils.java#L54>
|
|
|
|
|
|
Beyond that point, an application receiving an RFCOMM connection can still access the address of the remote device, and can send this information back to the remote device (via the RFCOMM connection or out-of-band) to enable the remote device to learn its own address. The developers of Thali who invented this technique called it "help a brother out" or "bro mode".
|
|
Beyond that point, an application receiving an RFCOMM connection can still access the address of the remote device, and can send this information back to the remote device (via the RFCOMM connection or out-of-band) to enable the remote device to learn its own address. The developers of Thali who invented this technique called it "help a brother out" or "bro mode".
|
|
|
|
|
|
This does not allow a group of devices to bootstrap connectivity entirely without user interaction, as would have been possible on earlier API levels: at least one device must be made discoverable in order to receive the first RFCOMM connection. But this technique can be used to reduce the amount of user interaction needed.
|
|
This does not allow a group of devices to bootstrap connectivity entirely without user interaction, as would have been possible on earlier API levels: at least one device must be made discoverable in order to receive the first RFCOMM connection. But this technique can be used to reduce the amount of user interaction needed.
|
... | @@ -403,16 +414,16 @@ While the library has methods built to enable auto-peering, our attempt to enabl |
... | @@ -403,16 +414,16 @@ While the library has methods built to enable auto-peering, our attempt to enabl |
|
|
|
|
|
Bluetooth Mesh is a relatively new Bluetooth standard that supports multi-hop communication among a set of devices, encrypted with a shared network key. Mesh devices can optionally act as relays, or as "friends" for power-constrained devices, storing messages on their behalf for later collection.
|
|
Bluetooth Mesh is a relatively new Bluetooth standard that supports multi-hop communication among a set of devices, encrypted with a shared network key. Mesh devices can optionally act as relays, or as "friends" for power-constrained devices, storing messages on their behalf for later collection.
|
|
|
|
|
|
* https://www.bluetooth.com/wp-content/uploads/2019/03/Mesh-Technology-Overview.pdf
|
|
* <https://www.bluetooth.com/wp-content/uploads/2019/03/Mesh-Technology-Overview.pdf>
|
|
* https://www.bluetooth.com/bluetooth-resources/controlling-bluetooth-mesh-networks-with-android-applications/
|
|
* <https://www.bluetooth.com/bluetooth-resources/controlling-bluetooth-mesh-networks-with-android-applications/>
|
|
|
|
|
|
The mesh stack shares some lower layers with the BLE stack in smartphones, but it also has some higher layers that aren't implemented in smartphones. So when a phone interacts with a mesh, it does so via a device called a proxy that implements both stacks. As far as we can tell, a mesh can't be formed from just smartphones.
|
|
The mesh stack shares some lower layers with the BLE stack in smartphones, but it also has some higher layers that aren't implemented in smartphones. So when a phone interacts with a mesh, it does so via a device called a proxy that implements both stacks. As far as we can tell, a mesh can't be formed from just smartphones.
|
|
|
|
|
|
There are several projects that implement the higher layers of the mesh stack in software, on Linux at least:
|
|
There are several projects that implement the higher layers of the mesh stack in software, on Linux at least:
|
|
|
|
|
|
* https://github.com/AndrewGi/BluetoothMeshRust
|
|
* <https://github.com/AndrewGi/BluetoothMeshRust>
|
|
* https://blog.drogue.io/bluetooth-mesh/
|
|
* <https://blog.drogue.io/bluetooth-mesh/>
|
|
* https://github.com/mfiumara/ble-mesh
|
|
* <https://github.com/mfiumara/ble-mesh>
|
|
|
|
|
|
The existence of these projects suggests that the higher mesh layers can be implemented in software if the platform allows access to the lower layers that are common to the mesh and non-mesh stacks. So it may be possible that in future, Android or iOS might either allow that kind of low-level access, or more likely provide their own software implementation of the higher layers of the mesh stack.
|
|
The existence of these projects suggests that the higher mesh layers can be implemented in software if the platform allows access to the lower layers that are common to the mesh and non-mesh stacks. So it may be possible that in future, Android or iOS might either allow that kind of low-level access, or more likely provide their own software implementation of the higher layers of the mesh stack.
|
|
|
|
|
... | @@ -952,7 +963,7 @@ TODO: Move this to the OuiSync/Briar collaboration report |
... | @@ -952,7 +963,7 @@ TODO: Move this to the OuiSync/Briar collaboration report |
|
It is currently possible to transport Briar messages between contacts via a OuiSync repo by using Briar's file export function.
|
|
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.
|
|
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.
|
|
|
|
|
|
A video demonstrating OuiSync as a Briar transport layer can be found here: https://vimeo.com/839579124
|
|
A video demonstrating OuiSync as a Briar transport layer can be found here: <https://vimeo.com/839579124>
|
|
|
|
|
|
#### P2P Connections over Intranets
|
|
#### P2P Connections over Intranets
|
|
|
|
|
... | @@ -969,7 +980,7 @@ A description of a possible implementation of this idea: |
... | @@ -969,7 +980,7 @@ A description of a possible implementation of this idea: |
|
|
|
|
|
This approach is not limited to OuiSync; developers of arbitrary data transport layers could create Android applications also following this file import/export system, allowing Briar messages to be tunneled through outside transport systems like a public mesh propagation application.
|
|
This approach is not limited to OuiSync; developers of arbitrary data transport layers could create Android applications also following this file import/export system, allowing Briar messages to be tunneled through outside transport systems like a public mesh propagation application.
|
|
|
|
|
|
For more information visit: https://code.briarproject.org/briar/public-mesh-research/-/issues/23#note_77366
|
|
For more information visit: <https://code.briarproject.org/briar/public-mesh-research/-/issues/23#note_77366>
|
|
|
|
|
|
## Future Considerations
|
|
## Future Considerations
|
|
|
|
|
... | @@ -1154,7 +1165,7 @@ Fire alarms for example, have been designed to stop accidental activation. A sim |
... | @@ -1154,7 +1165,7 @@ Fire alarms for example, have been designed to stop accidental activation. A sim |
|
|
|
|
|
A small caveat is that allowing simple and fast profile switching could allow users to quickly activate public mesh modes in important physical locations, thus increasing the amount of time spent in public mesh mode in active areas, which would lead to an increase in message propagation. This suggests there is not one definite approach to designing interfaces for these use-cases, but more of a balancing act between performance and keeping non-technical users safe.
|
|
A small caveat is that allowing simple and fast profile switching could allow users to quickly activate public mesh modes in important physical locations, thus increasing the amount of time spent in public mesh mode in active areas, which would lead to an increase in message propagation. This suggests there is not one definite approach to designing interfaces for these use-cases, but more of a balancing act between performance and keeping non-technical users safe.
|
|
|
|
|
|
For additional conversations surrounding this topic: https://code.briarproject.org/briar/briar/-/issues/972
|
|
For additional conversations surrounding this topic: <https://code.briarproject.org/briar/briar/-/issues/972>
|
|
|
|
|
|
## Connectivity Profiles
|
|
## Connectivity Profiles
|
|
|
|
|
... | | ... | |