Something I've been thinking about doing recently is create some software that allows my computer via its Bluetooth card to broadcast itself as a Headset.
Now I can connect to my computer as a headset from my mobile phone so that when I have a call on my phone; I can route the microphone and speakers to my computer's audio system which is way higher quality.
I don't know anything about how Bluetooth works on the protocol level, but I'm willing/eager to learn whatever I have to.
The problem is, I don't really know where to start.
I know there is a headset profile, but there isn't a create that (at least publicly) implements this.
So... Do I need to learn all of Bluetooth from the ground up, first? Maybe it is worth the investment time? Or are there any steps I am able to bypass if I select my crates wisely (there are some offerings)? Bluetooth is a stack, i see, so why reinvent parts of that stack.
So to sum up, I'm a little out of my depth and a little bit scared of the dark, so if anyone has any guidance. that would be much appreciated!
I'm afraid that you will have to build your software more or less from scratch.
Most of Rust's Bluetooth crates target Bluetooth Low Energy which at least in the upper layers differs in the protocols used from headset profile. So you probably have to implment a lot from scratch (at least according to Uni Rostock). Even the more mature Bluetooth crates target native implementations like the Windows API or Bluez for Linux. I don't know how well Windows, macOS or Linux expose an API for the headset profile but that would be my way to start.
Oh i see, the OS natively implements the protocol?? Wow okay, So I would use something like
libc (on Linux) to find which functions I need to call to send my audio data, and read the audio data? (Something like that?)
So I've found some good resources to begin.
Bluetooth for Programmers - A PDF that feels very complete.
Then there is:
An Introduction to Bluetooth Programming - which feels more brief, but concise. So I'll start here and go to the other if I feel a bit out of depth later.
But it asks you to be comfortable with networking and sockets beforehand or to read Beej's Guide to Network Programming first so that will be where I start!!
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.