Tahr32 Bluetooth - stream .wav music

Moderator: Forum moderators

Post Reply
User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Tahr32 Bluetooth - stream .wav music

Post by greengeek »

This .pet allows Tahr users to stream music (from a directory containing wav files) to a bluetooth headset (or speaker).

(Suggestion 1: when trying .pets it is best to temporarily hide your savefile so it does not get changed. Also - hiding the savefile will also hide any failed BT software you may have been trying previously. I have tested this pet successfully on generic Tahr 6.0.5 and 6.0.6 - no other bluetooth files required except what comes in the pet)

(Suggestion 2: If you have been having trouble getting Bluetooth to run successfully - then stay off the internet when experimenting. Some machines cannot handle internet bandwidth at the same time as BT bandwidth).

Tahr32_BTwavstream does not require mplayer or any other media players - just uses the wav playing capabilities in the internal aplay utility.

What is the purpose?
- Maybe you want to make a BT music server out of an old underpowered laptop? (without loading any extra mediaplayers, libs or other BT software)
- Maybe your current laptop has crappy speakers (like mine) and you just want to play your music through bluetooth headphones or speaker?

Notes:
- This will ignore any mediafiles other than .wavs
- Just load the .pet then look in the "Network" menu for "Tahrstream Bluetooth Manager"
Hopefully you will find it straightforward to follow the steps in the gui that pops up.
- Turn on your bluetooth headphones or speaker and go through the gui steps
(Leave the terminal popups open for now)

Step 2&3: Please be patient with this step. You may have to perform it twice. If this step is successful you will see an "Agent has been released" message before it says "Done". If you just see "Done" (but not "Agent has been released") it suggests that pairing timed out. (For some reason the first attempt can take too long and doesn't complete the pairing. If that occurs leave that terminal open and click Step 2/3 in the gui again).
(You can click the "List current pairings" button at any stage to check if pairing has suceeded).

Step 4: Select the BT out destination - ie btheadset means BT headphones or speaker. (other options are for debugging or reversion)

Step 5: you choose a DIRECTORY (not individual file). Then click Play.
(Once playing you can click Next to step to the next song)

When you are finished playing music click "Stop" and then I recommend clicking the "Release a pairing" button.

Limitations:
- Some BT devices have different protocols and may not connect. YMMV
- This version only plays wavs (for simplicity) but if you have mplayer installed i have another version that can play mp3s too.
- No BT functions other than music streaming are performed (no obex etc).
- Unfortunately this utility ignores files that have spaces in the filenames
(*** have not figured out how to sort the spaces-in-filenames problem yet***)

V0.5 gui.png
V0.5 gui.png (55.56 KiB) Viewed 532 times

I used xz compression to make it small enough for the forum but have a gz version available if needed.
.
Version 0.5 offers improved gui comments to assist user:

Tahr32_BTwavstream_xz-0.5.pet
(461.55 KiB) Downloaded 45 times

.
Original version:

Tahr32_BTwavstream_xz-0.4.pet
(461.2 KiB) Downloaded 35 times
Last edited by greengeek on Thu Dec 15, 2022 9:47 pm, edited 13 times in total.
User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: Bluetooth - stream wav files to btheadset

Post by greengeek »

reserved

Post Reply

Return to “Tahr”