#bluetooth #RFCOMM #SDP #SPP

bluetooth-serial-port-async

Interact with Bluetooth devices via RFCOMM channels

2 releases

0.6.1 Oct 18, 2020
0.6.0 Oct 10, 2020

#182 in Hardware support


Used in 2 crates

MIT license

39KB
974 lines

Rust library for interacting with the Bluetooth stack via RFCOMM channels.

This library only works on Linux/BlueZ. You can find it on

You can use async_std to read and write async

crates.io.

Cargo.toml:

[dependencies]
bluetooth-serial-port-async = "0.5.1"

Important functions:

bluetooth_serial_port::scan_devices()
BtSocket::new()
BtSocket::connect()
BtSocket::connect_async()
BtSocket::get_stream() // Use for read/write. Only call it once.

Click here for a full example.

API Reference

API reference documentation is on docs.rs


lib.rs:

Interact with Bluetooth devices via RFCOMM channels.

Dependencies

~2.5–4MB
~78K SLoC