Author Topic: BT MP3 player module that can connect to a BT speaker (not phone)  (Read 959 times)

0 Members and 1 Guest are viewing this topic.

Offline scarr999Topic starter

  • Contributor
  • Posts: 31
  • Country: gb
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
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6709
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #1 on: March 06, 2024, 02:38:07 pm »
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.
« Last Edit: March 06, 2024, 02:40:30 pm by tom66 »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9019
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #2 on: March 06, 2024, 02:45:43 pm »
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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline scarr999Topic starter

  • Contributor
  • Posts: 31
  • Country: gb
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #3 on: March 07, 2024, 12:51:02 pm »
Hi All,

I was thinking more of a module like this https://www.amazon.co.uk/dp/B08GLLWC24?psc=1&ref=ppx_yo2ov_dt_b_product_details but 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?

 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6709
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #4 on: March 07, 2024, 02:02:37 pm »
Hi All,

I was thinking more of a module like this https://www.amazon.co.uk/dp/B08GLLWC24?psc=1&ref=ppx_yo2ov_dt_b_product_details but 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?

Yes.  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.
 

Offline scarr999Topic starter

  • Contributor
  • Posts: 31
  • Country: gb
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #5 on: March 08, 2024, 07:03:25 pm »
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)?
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6709
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #6 on: March 08, 2024, 10:01:24 pm »
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)?

Once 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.
 

Offline scarr999Topic starter

  • Contributor
  • Posts: 31
  • Country: gb
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #7 on: March 15, 2024, 12:25:59 pm »
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
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6709
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #8 on: March 15, 2024, 05:55:38 pm »
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

It 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.
 

Offline scarr999Topic starter

  • Contributor
  • Posts: 31
  • Country: gb
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #9 on: March 25, 2024, 11:52:54 am »
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 device

Thanks


« Last Edit: March 25, 2024, 12:20:16 pm by scarr999 »
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6709
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #10 on: March 25, 2024, 12:58:35 pm »
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.
 

Offline scarr999Topic starter

  • Contributor
  • Posts: 31
  • Country: gb
Re: BT MP3 player module that can connect to a BT speaker (not phone)
« Reply #11 on: March 27, 2024, 10:30:39 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf