... | @@ -281,7 +281,9 @@ AdvertiseSettings adSettings = new AdvertiseSettings.Builder() |
... | @@ -281,7 +281,9 @@ AdvertiseSettings adSettings = new AdvertiseSettings.Builder() |
|
.setConnectable(true)
|
|
.setConnectable(true)
|
|
.setTimeout(0)
|
|
.setTimeout(0)
|
|
.build();
|
|
.build();
|
|
AdvertiseData adData = new AdvertiseData.Builder().addServiceUuid(SERVICE_UUID).build();
|
|
AdvertiseData adData = new AdvertiseData.Builder()
|
|
|
|
.addServiceUuid(SERVICE_UUID)
|
|
|
|
.build();
|
|
peripheralManager.startAdvertising(adSettings, adData, adData);
|
|
peripheralManager.startAdvertising(adSettings, adData, adData);
|
|
```
|
|
```
|
|
|
|
|
... | @@ -296,7 +298,9 @@ See the following file for the full implementation of advertising, discovery and |
... | @@ -296,7 +298,9 @@ See the following file for the full implementation of advertising, discovery and |
|
With L2CAP CoC, there is less of a conceptual divide between "central" and "peripheral" devices than there is with GATT. Instead of advertising a set of services consisting of characteristics, a peripheral using L2CAP CoC can just advertise a "PSM" value, which is similar to a port number, and open a Bluetooth server socket running on that PSM value. On our `blessed-gatt` branch, we advertise the PSM if the device supports L2CAP CoC:
|
|
With L2CAP CoC, there is less of a conceptual divide between "central" and "peripheral" devices than there is with GATT. Instead of advertising a set of services consisting of characteristics, a peripheral using L2CAP CoC can just advertise a "PSM" value, which is similar to a port number, and open a Bluetooth server socket running on that PSM value. On our `blessed-gatt` branch, we advertise the PSM if the device supports L2CAP CoC:
|
|
|
|
|
|
```Java
|
|
```Java
|
|
AdvertiseData adData = new AdvertiseData.Builder().addServiceUuid(PARCEL_UUID).build();
|
|
AdvertiseData adData = new AdvertiseData.Builder()
|
|
|
|
.addServiceUuid(PARCEL_UUID)
|
|
|
|
.build();
|
|
AdvertiseData scanResponse;
|
|
AdvertiseData scanResponse;
|
|
if (USE_L2CAP && SDK_INT >= 29) {
|
|
if (USE_L2CAP && SDK_INT >= 29) {
|
|
byte[] serviceData = new byte[4];
|
|
byte[] serviceData = new byte[4];
|
... | @@ -941,33 +945,32 @@ This was tested with the Samsung Galaxy A21s, LGE Nexus 5X and Moto G 4G. |
... | @@ -941,33 +945,32 @@ This was tested with the Samsung Galaxy A21s, LGE Nexus 5X and Moto G 4G. |
|
|
|
|
|
## Alternative Transports
|
|
## Alternative Transports
|
|
|
|
|
|
### Ouisync
|
|
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.
|
|
### OuiSync
|
|
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
|
|
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
|
|
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
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
### Filesystem API
|
|
### Filesystem API
|
|
|
|
|
|
During our research on using Ouisync as a transport layer, we had some thoughts on an approach to generalize this "file import/export" feature. As Briar already includes the necessary methods to import and export Bramble streams to files, this could be used in an automated way to link Briar with outside Android applications like Ouisync automatically, by using the Android filesystem.
|
|
During our research on using OuiSync as a transport layer, we had some thoughts on an approach to generalize this "file import/export" feature. As Briar already includes the necessary methods to import and export Bramble streams to files, this could be used in an automated way to link Briar with outside Android applications like OuiSync automatically, by using the Android filesystem.
|
|
A description of a possible implementation of this idea:
|
|
A description of a possible implementation of this idea:
|
|
|
|
|
|
- Outgoing messages would be encrypted and written to a list of directories for each contact/group, if there is no assigned directory for a given contact or group, it falls back to either a default directory or is simply not written to a file.
|
|
- Outgoing messages would be encrypted and written to a list of directories for each contact/group, if there is no assigned directory for a given contact or group, it falls back to either a default directory or is simply not written to a file.
|
|
- Users set a watch-list of directories for Briar to periodically scan for new files to test for contact tags
|
|
- Users set a watch-list of directories for Briar to periodically scan for new files to test for contact tags
|
|
|
|
|
|
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
|
|
|
|
|
|
### Combining Transport Layers
|
|
### Combining Transport Layers
|
... | @@ -1009,17 +1012,10 @@ Projects like [Reticulum](https://reticulum.network) have shown that it is possi |
... | @@ -1009,17 +1012,10 @@ Projects like [Reticulum](https://reticulum.network) have shown that it is possi |
|
|
|
|
|
#### Structured Sneakernets
|
|
#### Structured Sneakernets
|
|
|
|
|
|
Completely ad-hoc mesh networks and sneakernets often have issues with message latency and delivery rates. One way we can try to improve these metrics is by increasing the structure of message propagation. Further research in this area could search for ways of creating 'Social Consensus' for message rendezvous points, like finding town squares or popular physical locations for people to meet in order to increase the exchange of messages.
|
|
Completely ad-hoc mesh networks and sneakernets often have issues with message latency and delivery rates. One way we can try to improve these metrics is by increasing the structure of message propagation. Further research in this area could search for ways of creating "social consensus" for message rendezvous points, like finding town squares or popular physical locations for people to meet in order to increase the exchange of messages.
|
|
|
|
|
|
Another area of research is the use of long-range, low-bandwidth transports like packet radio or LoRa, to use as gossip channels for structuring message delivery systems, only sending announcement and delivery instructions over the air, and leaving data propagation to a sneakernet.
|
|
Another area of research is the use of long-range, low-bandwidth transports like packet radio or LoRa, to use as gossip channels for structuring message delivery systems, only sending announcement and delivery instructions over the air, and leaving data propagation to a sneakernet.
|
|
|
|
|
|
|
|
|
|
### Transport Energy Draw Experiments
|
|
|
|
|
|
|
|
TODO: Create a future work subsection in the Mobly section? Paul: yeah I like this idea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Test Automation via Mobly
|
|
# 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.
|
|
Testing mesh networking software is often challenging from a developer's perspective because it usually entails juggling handfuls of hardware devices.
|
... | @@ -1072,6 +1068,14 @@ If there is an exception associated with the log call, it is stored in a "throwa |
... | @@ -1072,6 +1068,14 @@ If there is an exception associated with the log call, it is stored in a "throwa |
|
In addition to that, a dictionary of arbitrary key value pairs can be passed to the logging call that will get added to the JSON log object as additional properties.
|
|
In addition to that, a dictionary of arbitrary key value pairs can be passed to the logging call that will get added to the JSON log object as additional properties.
|
|
That way, additional data points such as a recognized device's identifier or a signal strength can be logged structurally and later on be easily obtained from the logs during data analysis.
|
|
That way, additional data points such as a recognized device's identifier or a signal strength can be logged structurally and later on be easily obtained from the logs during data analysis.
|
|
|
|
|
|
|
|
## Burn-In Experiments
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
## Energy Usage Experiments
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
# Simulating Internet Shutdowns
|
|
# Simulating Internet Shutdowns
|
|
|
|
|
|
One aspect of our public mesh research is looking into how Android devices behave in case of an Internet shutdown. While it is clear that during a full or partial Internet shutdown, many websites and services cannot be reached from any device, it is not so clear which functionality remains intact. The Android operating system has mechanisms to detect whether a device has a working Internet connection, and we wanted to find out whether this assessment might prevent installed apps from communicating with servers that were technically still reachable.
|
|
One aspect of our public mesh research is looking into how Android devices behave in case of an Internet shutdown. While it is clear that during a full or partial Internet shutdown, many websites and services cannot be reached from any device, it is not so clear which functionality remains intact. The Android operating system has mechanisms to detect whether a device has a working Internet connection, and we wanted to find out whether this assessment might prevent installed apps from communicating with servers that were technically still reachable.
|
... | | ... | |