I'm developing a Bluetooth server on a Raspberry Pi 5 running Debian Bookworm (64-bit) and targeting Bluetooth Classic (RFCOMM) communication. I'm using the bluer
crate in Rust for Bluetooth support.
So far:
- Device discovery, scanning, and SPP profile registration are working correctly.
- I’ve successfully set the adapter to
discoverable
,pairable
, andpowered
.
What I need help with:
- I want to implement the Classic mode using RFCOMM socket, so that Android devices can auto-pair and initiate a connection with no PIN or dialog (e.g., using "NoInputNoOutput").
- I need the server (Raspberry Pi) to handle auto-pairing and allow seamless data transfer over RFCOMM.
bluer
provides some support via theagent
andrfcomm
modules, but the documentation and examples are limited for Bluetooth Classic Setup.- There is very little available documentation on how to build a complete Classic Bluetooth stack in Rust using
bluer
or another crate.
Questions:
- Is it possible to fully implement auto-pairing and auto-authorization logic for Bluetooth Classic in Rust using
bluer
? - If not, are there alternative crates or libraries (Rust or C interop) that support this?
- How can I manage trusted device behavior and simplify or skip pairing dialogs programmatically?