Background:
I'm working on a project to connect a Motorola XPR 7550e to a Raspberry Pi B3+ via Bluetooth. The idea behind it, is to run a NodeJS application that listens to the radio and transmits it over the internet. What ever the NodeJS application hears from the internet, it transmits over the radio. This is using WebRTC. The problem that I'm having is, when ever I connect my Motorola radio to my Raspberry Pi, it connects as a Bluetooth Data Device, but I need it to connect as a Bluetooth Audio Device (and so that, my NodeJS application can use the Bluetooth connection to the radio as the Audio Source / Sink.) I would think that this would be easy ...
... But it would seem that we haven't come all that far in the past 10 years.
Technical Details:
- The Raspberry Pi B3+ has a Bluetooth 4.2 / BLE chip on it. I am running Raspbian Stretch Lite using the
4.14.74-v7+
Linux Kernel. - The Motorola XPR 7550e has a Bluetooth 4.0 chip on it. It is running the latest firmware.
The Connection Process:
The connection process is described on the XPR 7550e User Guide (Pg. 76). The connection process on the Raspberry Pi is as follows:
sudo bluetoothctl
power on
agent on
scan on
(Wait for the Radio To Show Up on the List)pair MA:CA:DD:RE:SS
trust MA:CA:DD:RE:SS
connect MA:CA:DD:RE:SS
Confirm on Radio & Pi.
But this doesn't seem to produce a useful connection interface. The radio accepts the connection, and then discards it and it never becomes apart of the Menu
-> Bluetooth
-> Devices
list on the radio. AHHH! The only thing that I've actually managed to get this connect to reliably is my Macbook and that's apart of the Bluetooth Devices list on my Radio. I don't get it!
The Question: How do I make the Raspberry Pi appear as a Bluetooth Audio Device to the XPR radio and get them to connect to each other so that the Raspberry Pi shows up in the Bluetooth connection list on the Radio as a audio device.
Prior Research:
- Setup Raspberry Pi 3 as Bluetooth Speaker The conclusion of this answer, basically states that the audio isn't great from this. And I'm not actually looking to output to the TRRS connector, or the HDMI connector. I want to sink this into a WebRTC connection.
- The bluetooth pairing process is from here But it doesn't seem to produce an actual bluetooth connection. It connects, but it doesn't ... Connect.
- Bluetooth Class of Device/Service (CoD) Generator Useful for getting the Bluetooth Class Hex Jussstttt right. (It seems that I would want,
0x20041C - Major Service Class = Audio; Major Device Class = Audio/Video; Minor Device Class = Portable Audio (Microphone + Headphones + Loudspeaker)
) - By the way, this is an awesome tool, and the guy who runs it decided to put a bunch of bullshit popups on it. That's really too bad. - This is the audio file that I am using to test
aplay /usr/share/sounds/alsa/Front_Center.wav
Apparently, this file is always available, even in the Light (Headless / Server) version of Raspbian.