10
\$\begingroup\$

So I saw one of those one of those car USB bluetooth dongles, and there's pretty much no information about them. All the info I have about it is this video: https://www.youtube.com/watch?v=tvCOpf4Ow4M, which is titled "Bluetooth USB adapter for music streaming A2DP" from 5 years ago, and has around 250k views.

And the fact that "it creates fake MP3 files to work". But there's definitely more to it, right? So I googled it (or ecosia'd it) and the above video was the only thing I was able to find. Do you guys have any idea exactly how these things work?

P.S. I'm not sure if this is the right site to put this on, so please point me to the right one if it isn't.

\$\endgroup\$
6
  • \$\begingroup\$ What more detail you need about what? They receive phone audio and save it as MP3 file for car to play like you said. \$\endgroup\$
    – Justme
    Commented Sep 26 at 10:38
  • \$\begingroup\$ Does it stream on the fly? \$\endgroup\$
    – winny
    Commented Sep 26 at 10:49
  • \$\begingroup\$ Bluetooth supports many protocols. A2DP (Advanced Audio Distribution Profile used for stereo music) just being one of them. Others include serial data communications and telephone head sets. @ me here in the comments if this is the type of answer you were looking for and I'll add an answer with more details and links. \$\endgroup\$
    – st2000
    Commented Sep 26 at 11:42
  • \$\begingroup\$ @winny What do you exactly mean by that? What I know is that the device receives the bluetooth stream, somehow turns it into an MP3, and then the car system reads said MP3. If what you mean by "on the fly" is that it writes to the MP3 while it's receiving the stream, then to my knowledge the answer is yes. \$\endgroup\$
    – BOplaid
    Commented Sep 26 at 13:39
  • \$\begingroup\$ Wow! It actually streams. This would call for some file system and mp3 header trickeries/violations to happen on the fly. Impressive. \$\endgroup\$
    – winny
    Commented Sep 26 at 13:42

1 Answer 1

15
\$\begingroup\$

Disclaimer: I don't have one to investigate, and I've not designed one... this is all reasonable speculation that may need some supporting R&D effort to finesse. Images below are taken from the linked video.

But there's definitely more to it, right?

In the sense that it must be receiving an audio stream via bluetooth, probably transcoding it to MP3, and presenting a "well formatted" MP3 file to the car's head unit, yes... but it's probably not much more than that.

A basic filesystem (e.g: FAT32) can be feigned fairly easily without actually storing anything persistent. In this case it appears to have three files each named bt-music.mp3 (a little unexpected due to name conflicts - perhaps the head unit gathered them from multiple directories). If you connect it to a computer, I suspect you'd find they're each presented as large files (a maximum of 4 GB for FAT32) - that would allow the head unit or other reader to read() through the file for quite a long time before it's exhausted (estimated at ~29 hours for a 320kbit/s stream, and it's probably lower than that)... when it reaches the end of one, it'll probably move on to the next.

photo of the head unit showing three files

Now that we've got the presentation sorted, we need to fill the files with something interesting. The feigned file table discussed above will state what offset each file resides at, so the device "knows" which file is being accessed. There will be some "dynamic" content that isn't actually stored anywhere, but is generated automatically - this will contain the streamed audio. There will also be some static content that is probably the same for each file... MP3s use ID3 tags to provide metadata - from what's displayed on the head unit, I'd suggest this has fixed content along the lines of JL and JL-BT-MUSIC for the artist and/or track name. Note also the -16:24:_ time remaining - fun!

photo of the head unit showing currently playing informatino

The dynamic content just needs to "look reasonable". MP3s can be streamed without seeking through the entire file, which means that the received Bluetooth audio can be transcoded into MP3, and that data can then be presented to the reader via this dynamic region. Again, the data isn't stored anywhere, aside from a small volatile buffer. I fully expect that fast-forward / rewind won't work here, but it's possible that they could implement next / previous track skiping by detecting access to the three files and passing the relevant Bluetooth media control events to the original device.

The interesting ICs are almost certainly these... sadly I can't see the markings clearly to get part numbers.

poor quality photo of the interesting IC

I think it's a neat and quite usable concept, but I suspect it won't be very robust beyond very basic access and linear playback. The clever bit is all in transcoding the audio and the fake filesystem.


PS: I've just ordered one of these because it looks similar, and I'm curious.

\$\endgroup\$
8
  • \$\begingroup\$ "I fully expect that fast-forward / rewind won't work here, but it's possible that they could implement next / previous track skiping by detecting access to the three files and passing the relevant Bluetooth media control events to the original device." Yes. To my knowledge, at least some of them have implemented next/previous. Source? Well, I found out about these devices from a taxi. And the driver pressed the "next file" button on the system, and sure enough, the music changed on his phone. So yeah. \$\endgroup\$
    – BOplaid
    Commented Sep 26 at 13:45
  • 1
    \$\begingroup\$ I genuinely expected it to be a complete filesystem, and the device actually wrote the stream to these files. Basically I thought that the car was 4 or 5 seconds behind the actual endpoint of the MP3 at the time, so the device could have enough time to write to the current MP3 being read. So I thought that the device expands the file as the car is reading it. Now that I think about it, is that even possible? I mean expanding a file and writing to it while it is being read. \$\endgroup\$
    – BOplaid
    Commented Sep 26 at 13:49
  • \$\begingroup\$ Also please edit this answer if you receive this device and have any more discoveries. (by the way it looks like that one you found can work either as an actual bluetooth dongle, or one of those car receivers. Though I'm not seeing a switch or anything.. does it somehow detect what it's connected to?) \$\endgroup\$
    – BOplaid
    Commented Sep 26 at 13:49
  • 1
    \$\begingroup\$ "I genuinely expected it to be a complete filesystem" - I'd be very surprised. At the most fundamental level, having two hosts writing to a "real filesystem" would result in corruption and access issues due to things being changed by one host without the other noticing. This would also require an amount of real flash storage which would wear out over time, or an exceptionally large amount of RAM that such small devices don't typically have. \$\endgroup\$
    – Attie
    Commented Sep 26 at 16:15
  • \$\begingroup\$ "Also please edit this answer if you receive this device and have any more discoveries" - of course! \$\endgroup\$
    – Attie
    Commented Sep 26 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.