blatann.examples.peripheral_rssi module
This is a simple example which demonstrates enabling RSSI updates for active connections.
- blatann.examples.peripheral_rssi.on_rssi_changed(peer, rssi)
Event callback for when the RSSI with the central device changes by the configured dBm threshold
- Parameters:
peer – The peer object
rssi (
int) – The new RSSI for the connection
- blatann.examples.peripheral_rssi.on_connect(peer, event_args)
Event callback for when a central device connects to us
- Parameters:
peer (blatann.peer.Client) – The peer that connected to us
event_args – None
- blatann.examples.peripheral_rssi.on_disconnect(peer, event_args)
Event callback for when the client disconnects from us (or when we disconnect from the client)
- Parameters:
peer (blatann.peer.Client) – The peer that disconnected
event_args (blatann.event_args.DisconnectionEventArgs) – The event args
- blatann.examples.peripheral_rssi.main(serial_port)