BT MP3 player module that can connect to a BT speaker (not phone) - Page 1
Forum section: electronics / general

author: scarr999
author_rank: Contributor
timestamp: March 06, 2024, 02:12:15 pm
content: Hi All,The title says it all, I am looking for a module that I can put an SD card into and connect to a BT speaker (this is the sticking point I think) ideally I want some push buttons to play tracks, 1, 2, 3, 4.My basic use for this is "a sound effects module" connected to a Bluetooth speaker.I have found lots of BT modules but they all connect to phones as an audio source and not what I need, a BT speaker as an audio destination.I hope someone will say "Look here dummy!" or "Here, I used this and it will do what you need" or "all of the modules will if you so XZY"I hope someone can help, cheers

author: tom66
author_rank: Super Contributor
timestamp: March 06, 2024, 02:38:07 pm
content: Most Bluetooth modules accept PCM audio input over the I2S port, which means if you have an MP3 decoder IC/DSP chip with an I2S output connecting the two together with some glue logic to set up the A2DP connection should be sufficient.I am not aware of a dedicated out of the box solution.Be aware Bluetooth is a black hole as far as licencing goes. You can look forward to paying $10,000 in licensing fees if you want to use the technology and trademarks in a commercial product, as well as undergoing extensive certification.I have had some experience with PulseAudio on an embedded Linux platform connected to an onboard Bluetooth module. It was easier than expected and in that case I used UART to send the compressed A2DP audio (using SBC codec) to the module which then sent it to an Anker Bluetooth speaker. The other option is to do the compression on the module itself and that's what the I2S interface enables. With BlueZ and Linux it all kinda "just works" once you figure out the setup and build the kernel to include the useful toys.

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 06, 2024, 02:45:43 pm
content: ESP32 is as close as I'm aware of. Use the SPI to connect the SD card and program it to connect to the Bluetooth speaker.

author: scarr999
author_rank: Contributor
timestamp: March 07, 2024, 12:51:02 pm
content: Hi All,I was thinking more of a module like thishttps://www.amazon.co.uk/dp/B08GLLWC24?psc=1&ref=ppx_yo2ov_dt_b_product_detailsbut one that as I say, has the ability to connect to a BT speaker directly.When connecting a BT device you normally are connecting a smart device (phone, tablet etc) to the speaker, this enables you to select and pair. without a screen (just the module and a speaker) is it even possible?

author: tom66
author_rank: Super Contributor
timestamp: March 07, 2024, 02:02:37 pm
content: Quote from: scarr999 on March 07, 2024, 12:51:02 pmYes. Bluetooth implements Secure Simple Pairing, and the methods permitted are (at least):- Enter a code or password on the input keyboard/keypad when requested.- Verify that a code matches (typically used with a device that has a screen).- Time-based button press - device available for pairing for 30s - confirm pairing with button. Least secure method, but the limited time window for an attack makes it sufficient in normal use.There's also an NFC method that I'm not exactly sure about but I presume it's standardised somehow as I've seen a few devices implement that.

author: scarr999
author_rank: Contributor
timestamp: March 08, 2024, 07:03:25 pm
content: So, is there a BT module with SD card holder, buttons and pairs using the "press a button and wait xx seconds"Maybe if there is a module that has serial comm's and commands I could pair it, then it should remember the pairing when used stand alone (no comms)?

author: tom66
author_rank: Super Contributor
timestamp: March 08, 2024, 10:01:24 pm
content: Quote from: scarr999 on March 08, 2024, 07:03:25 pmOnce paired, a Bluetooth device should store keys in NVM which allows it to retain pairing, but I have seen some devices fail to do that. No idea where to find the device you need, though.

author: scarr999
author_rank: Contributor
timestamp: March 15, 2024, 12:25:59 pm
content: Hi Tom,but how do you get it connected in the first place with just a small PCB and BY speaker, no display like you would have on a phone? thanks

author: tom66
author_rank: Super Contributor
timestamp: March 15, 2024, 05:55:38 pm
content: Quote from: scarr999 on March 15, 2024, 12:25:59 pmIt powers up, advertises itself and you press a button to accept pairing. Some devices are configured to accept all pairing requests without any confirmation, this is insecure but depending on the application may be okay.

author: scarr999
author_rank: Contributor
timestamp: March 25, 2024, 11:52:54 am
content: Does anyone know of a BT module that will connect to the first BT speaker it sees without confirmation?OK, I have looked but cannot find a module that has the "Pair to first device it sees" if anyone know of a device please please send details. Just to clarify again, I am looking for a module with SD card that will connect to a BT speaker. The problem I have is there is no display so selecting a device is not an option.I have seen a kcx_bt_emitter module but this does not have a SD card for the sounds.Requirements:Small BT transmitter that has on board SD card.Button to select sounds or pins to add buttons.Ability to connect to the first device it sees or Serial AT commands to connect it to a selected deviceThanks

author: tom66
author_rank: Super Contributor
timestamp: March 25, 2024, 12:58:35 pm
content: That type of device will likely not work well because Bluetooth has a range of 30-40m, there is very likely to be at least a car or Bluetooth speaker in range so you will be sending pair requests to anything you see. Not compliant but also buggy and unreliable.You could probably implement this behaviour with an embedded Linux computer (or Raspberry Pi) and some scripting to auto-connect Bluetooth to the first device seen, but I can't recommend it. It's something you can do using `bluetoothctl` as a command line utilities, and there are Python tools that can interact with BlueZ too.

author: scarr999
author_rank: Contributor
timestamp: March 27, 2024, 10:30:39 am
content: Hi,I would pair then in isolation and I believe once paired it will autocratically pair to the speaker each power up, if it does not find the speaker it will "then" start searching.