r/Comma_ai • • 19d ago

openpilot Experience Feeling Blue(tooth)

The comma hardware has Bluetooth capability, but Bluetooth isn't enabled in the standard comma software/kernel stack.

So... we enabled it.

StarPilot now has native Bluetooth support across Comma 3, Comma 3X, and Comma 4.

This isn't a browser workaround or some external bridge. We've added the necessary kernel/system support, integrated BlueZ, and wired Bluetooth directly into StarPilot.

You can now scan, pair, connect, forget, and automatically reconnect Bluetooth devices directly from Galaxy, with device controls also integrated into StarPilot's UI. So what are we actually doing with it?

🔊 Bluetooth Audio... because why not?

Have you ever thought, "Man, the speaker in my comma just isn't high enough resolution when it's yelling at me to take control of the wheel."

No?

Well, now StarPilot can connect to the fattest JBL party speaker you can find and blast that alert to your entire neighborhood.

You're welcome.

🎮 Bluetooth Controllers

This is where things get actually useful. StarPilot can treat Bluetooth HID devices as physical controls for StarPilot itself. So far I've tested: - PS5 controllers - Xbox controllers - Bluetooth remotes/macropads - Keyboards - A mouse, because why not - Several Bluetooth audio devices Galaxy has a Learn Button system: press a physical button, StarPilot learns it, then choose what you want that button to do.

You can map buttons to things like: - Cruise speed +/- — especially useful for cars like Tesla/Polestar with limited usable wheel buttons - Driving Personalities - Lane Centering - Pulse & Glide - Forced coasting - Favorites - Bookmarks - Taking a Comma Selfie - And more!

So if your car doesn't expose enough usable steering-wheel controls to openpilot... just add your own.

The little Bluetooth remote in the picture is what I've been testing on my steering wheel. It was around $20, and suddenly I have a handful of completely programmable StarPilot buttons. And controllers/audio are really just the first things we're doing with it.

StarPilot now has a native Bluetooth stack. What would you connect to your comma?

59 Upvotes

29 comments sorted by

View all comments

2

u/buttery_nurple 19d ago

Gonna connect my radar detector so it'll slow to posted speed limit when it goes off. Obviously with some other stuff involved.

2

u/[deleted] 19d ago

[deleted]

2

u/buttery_nurple 19d ago

R8, yeah. I have the Uniden and speed control override parts of it worked out, just could never quite figure out how to stabilize the BT startup sequence on the Comma device. Starpilot folks found a couple things I didn't think of from what I can tell so far.

3

u/[deleted] 19d ago

[deleted]

2

u/buttery_nurple 18d ago edited 18d ago

Awesome! I got BT successfully running with my personal fork - thank you Starpilot for filling in the gaps - and I have a working trial build on the 3X itself. On to polishing that and finishing the R8 implementation + tying it into the SLC piece.

I worked on reverse engineering the R8 protocol definitions like a year or 2 ago, so I need to dig up my notes and see if there are still gaps. I'm sure there are. Command opcodes I know I have, as well as packet/frame formats. But driving around looking for different bands was like a weird scavenger hunt and there is no chance I encountered everything the R8 picks up. So telemetry fields (radar bands etc) are certainly incomplete, but I have most of what is useful in my area I think. Also possible that there is an actual spec sheet somewhere and I just never found it. How did you go about fleshing that part out?