Skip to content

Conversation

@oakamil
Copy link
Contributor

@oakamil oakamil commented Jan 21, 2026

The main addition here is a server that uses Bluetooth RFCOMM to expose the cedar grpc service. The server only runs when use_bluetooth is set to true in preferences.

A smaller addition is the exposure of the RPI's Bluetooth address in the GetBluetoothName API (I thought renaming this isn't a good idea for backwards compatibility). The address can be used to initiate pairing from an Android phone to the RPI in Cedar Aim directly (using the flutter_blue_classic package), without requiring the user to leave Cedar Aim to start Bluetooth pairing in their phone's settings.

Changing the rpc name etc. doesn't seem like the best idea, so leaving as is. With the address of the RPI device the goal would be to try to get easier pairing between the RPI and phone in Cedar Aim (using flutter_blue_classic for pairing).
adapter.set_powered(true).await?;

let profile = Profile {
uuid: Uuid::parse_str("4e5d4c88-2965-423f-9111-28a506720760").unwrap(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this UUID, and where does it come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's randomly generated, and needs to be the same on both the server and client side.

UUIDs used for Bluetooth can be 16-bit assigned numbers (either for Bluetooth SIG defined features or purchased by member companies) or 128-bit for custom services (typically randomly generated by whoever is using them).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also appear somewhere on the cedar aim side?

Can both sides have a comment explaining this magic value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to a constant here and added a comment.

No pull request yet for cedar-aim (still some polish needed), but it's used here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants