Skip to content

Discover remote Bluetooth address from connection

akwizgran requested to merge discover-bt-address-from-incoming-connection into master

This branch stores the remote address learned from an incoming or outgoing Bluetooth connection, after checking that the address belongs to the contact by recognising the transport tag.

An address learned in this way can be used for connecting to a contact who doesn't know their own address. Examples:

  1. Two devices running Android 8.1 or higher add each other as contacts via Bluetooth. Bluetooth discovery is used to make the initial connection. Each device learns the other's address from the connection and stores it, despite neither device knowing its own address.

  2. A device running Android 8.0 or lower has a contact running 8.1 or higher, not necessarily added via Bluetooth. The device running 8.0 or lower knows its own address, so it can receive incoming connections from the contact, learn the contact's address and subsequently make outgoing connections.

Merge request reports