Just got the Tympan Rev D. How do you set it up to work with Bluetooth headphones/earbuds?. I assumed that this would be a feature, since the bluetooth module supports audio.
Hi!
Sorry I missed this post earlier. My fault!
There is no special set-up for the Bluetooth module itself. You just need to tell the Tympan to listen to the analog audio being produced by the Bluetooth module.
To command the Tympan to listen to this connection, you need to change which input is selected. The BT audio is connected to the same lines that the “line in” inputs on the female headers on the sides of the board. So, to listen to the BT audio, you select the “LINE IN” input instead of the “MIC JACK” input.
The new (or modified) line of code would look like this:
// for BT audio or for line-in on the headers on the side of the Tympan
myTympan.inputSelect(TYMPAN_INPUT_LINE_IN);
Chip
Update: I extended the library to make it more clear. Now, if you want, you can use the line: myTympan.inputSelect(TYMPAN_INPUT_BT_AUDIO);
I created an example sketch and pushed it to the Tympan Library.
So, if you update your Tympan_Library repository, it’ll show up in the Arduiono IDE under File->Examples->Tympan_Library->Utility->BluetoothAudio_PassThru
Or, if you prefer a web link, try: https://github.com/Tympan/Tympan_Library/tree/master/examples/02-Utility/BluetoothAudio_PassThru
Hopefully this helps!
Chip
Great, thanks for the reply! Actually, I wanted to go in the other direction: I want to listen to the Tympan output with Bluetooth earbuds. Is there an equivalent LINE OUT selection to transmit audio? I looked at your Arduino example and it looked like it only played the Bluetooth output
Ah, I see what you’re trying to do. I have never tried to do that, but we can talk about what it might take.
First, yes, you can push audio to the Bluetooth module from the Tympan. The Bluetooth module’s audio inputs are wired to the Tympan’s “line-out”. So, with the correct Tympan settings, the Bluetooth module will have access to the Tympan audio.
The difficult part, IMO, is getting the Tympan to pair with your Bluetooth earbuds. That’s the part that I don’t know how to do. Do you have any experience with this part? Have you ever programmed a Bluetooth module to be the master to a pair of BT earphones?
Chip
I’m not a programmer, but I have some arduino experience. I haven’t connected to a module like that, but I’ll see what I can find online. If I have questions about the Tympan side, is there a more direct way I can contact you? You can reach me at michael (dot) biggs (dot) home (at) gmail (dot) com
This forum thread has gotten old, but the question is still out there: can a bluetooth headset be a peripheral to the Tympan (RevD or RevE).
As I said above, the main issue is not the Tympan hardware itself; the main issue is how to configure the bluetooth module in the Tympan to discover, pair with, and connect to your bluetooth headset.
To figure this out, I would probably follow a process like this:
-
Formulate a Plan: I would start by looking at the docs for the BC127 BT module. I would find commands to send to the BT module to make the connection to a BT headset. This is you formulating a game-plan of potential commands to send.
-
Try Your Plan: Now, you need to try your commands on the BC127 module. The difficulty is that, to talk to the BC127 module, you need to communicate through the Tympan. The best thing to do is to load this echo program onto the Tympan.
-
For this sketch, if you’re using a RevD, you’ll have to change the first #if to a “1” instead of a “0”. If you’re using a RevE, it is unclear what to do since this example was written with an early RevE, which is likely not the same as the up-coming production RevE.
-
After loading this sketch onto the Tympan, you’d open the Arduino serial monitor and type commands that you intend for the BT module. The Tympan receives your text and pipes the characters over to the BT module.
-
When you are typing commands in the Serial Monitor, be very careful about not sending unexpected carriage returns…the BT module is very sensitive to sometimes wanting carriage returns (not line feeds) and sometimes not wanting them. You might want to use a different Serial terminal (like RealTerm) to have tighter control over your line endings while you’re trying to figure it all out.
-
-
Make It Routine: After you interactively work with the BC127 to figure out all the commands to connect to your headset, you want to automate the process so that it works every time. To do that, you need to write a Tympan program to automate sending the commands. An example of a Tympan sketch that does this is the Bluetooth Renaming. I would use this as a model, not as an exact solution.