Skip to content

Architecture

Anirudh Balaji edited this page May 7, 2020 · 4 revisions

PearDrop is architected to work without a server given that both devices have the client.

PearDrop has two parts: the sender and the receiver.

Note: Fields marked with [A] should be in advertisement data.

Receiver

In order for a device to be a PearDrop receiver, it must have a PearDropReceiver service advertised over BLE.

The name should be PearDropReceiver with the following advertised characteristics:

  • ssid - SHA-256 hash of the currently connected WiFi network's SSID, or a hash of null otherwise.
  • data - Subscribed characteristic to transfer data over BLE.
  • [A] name - Name of this device.

When a sender attempts to pair and connect, the receiver and sender should compare SSID hashes. If they are identical, the sender publishes the ip characteristic to the receiver and allows the receiver to acknowledge itself as a receiver if interested. Otherwise, the receiver and sender should start sending data over BLE, optionally with DLE.

Sender

In order for a device to be a PearDrop sender, it must have a PearDropSender service advertised over BLE.

The name should be PearDropSender with the following advertised characteristics:

  • ssid - SHA-256 hash of the currently connected Wifi network's SSID, or a hash of null otherwise.
  • ip - (only published if SSID hashes are identical) The IP address of this device.
  • data - Subscribed characteristic to transfer data over BLE.
  • [A] name - Name of this device.
Clone this wiki locally