8000 GitHub - fraschizzato/esp-idf-a2dp-source: ESP32 Bluetooth A2DP-SOURCE for esp-idf
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fraschizzato/esp-idf-a2dp-source

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-idf-a2dp-source

ESP32 Bluetooth A2DP-SOURCE for esp-idf.
Play wav to speaker via bluetooth.

Background

ESP-IDF contains A2DP-SOURCE demo code.
https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/classic_bt/a2dp_source

However, this example sends random noise data, not music.
This project sends WAV(RIFF waveform Audio Format) data using A2DP.
You can listen WAV data using your bluetooth speaker.
I used this as a reference.

Changes from the referenced code

  • You can specify your speaker name using menuconfig.
  • WAV data is defined as hexadecimal data.
    This reduces the size of the header file.
  • A header file generator is attached.

Hardware requirement

  • Bluetooth speaker

Installation

git clone https://github.com/nopnop2002/esp-idf-a2dp-source
cd esp-idf-a2dp-source
make menuconfig
make flash monitor

Configure

You have to set this config value with menuconfig.

  • CONFIG_SPEAKER_NAME
    Your bluetooth speaker name.
    config-main config-app
    You can use this application to find the name of your Bluetooth speaker.
    BluetoothView

Convert WAV file to C header format

It is necessary to read the WAV file at high speed.
If you put the WAV file in SPIFFS and read it, it will not be in time.
It can be read at high speed by converting it to the C language header format.
I made this program with reference to this site.

cd wav2code
make
./wav2code futta-prayer3t.wav music.h
cp music.h ../main/
cd ..
make flash monitor

Free WAV file

I downloaded the WAV file from here.
There is many WAV format data in the Internet.

Limitations

The WAV file header has an average number of bytes per second.
This determines the speed at which it plays.
This project ignores this.

About

ESP32 Bluetooth A2DP-SOURCE for esp-idf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%
0