A2DP half duplex - possible? #1001
-
Is it possible to use Bluetooth A2DP profile half duplex (like a Push To Talk WalkieTalkie)? I am about to use an ESP32-A1S as a simple SDR transceiver frontend. In FT8 mode, it first receives for several seconds, and I like to transfer the received sound stream to the PC, to a program like WSJT-X. Then the PC (the WSJT-X program) sends sound stream to the ESP32. If the above is not possible (or just too hard to write such a program), maybe better to use Wifi RAW audio? For example UDP packets. In this case, how to handle the stream on the PC side? It has to be accessible to existing programs like a virtual sound card. How to do that? I searched for solutions, unfortunately found only hints for Linux, but I prefer Windows. It surprised me, because even a simple project, like a Wifi microphone for Skype etc. needs it. Bluetooth audio has the advantage that it appears as sound source or sink for audio programs, no interface program required. However, not sure, how the codec degrades the signal (the FT8 decoder is working even below noise level, overlapping strong and weak signals etc, maybe the codec kills important details of the signal). Wifi is capable to transfer without codecs, but I don't know how to make or find a stream<->[virtual soundcard] program. Please, point me to the right direction. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 14 replies
-
No, it is not: pschatzmann/ESP32-A2DP#283 and sending FT8 over an audio codec will just not work! I think you really need to decide if you transmit FT8 or audio: I would first try to stick with FT8 and do the decoding and encoding on the desktop. Did you already find out if USB/Serial is too slow for this ? If you want to write your own solution, I suggest that you have a look at the provided communication examples.You try to can compile and run the sketches written with the audio tools on the desktop as well. If you just want to deal with audio (record, convert, stream) on the desktop, I suggest that you have a look at ffmpeg Unfortunately I am not using Windows, so you will need to find this out yourself, but usually the concepts are pretty similar. |
Beta Was this translation helpful? Give feedback.
-
Like I have written in my A2DP Project: A2DP on the ESP32 expects PCM data that will be encoded via SBC and you can't really replace this. Wifi is not really relevant here but the communication protocols which are IP or UDP. That's why I was recommending ffmpeg which provides a lot of functionality... If you look for a Bluetooth solution, you will need to implement some more additional protocols: Headset (HSP) or Hands-Free (HFP) profiles which are supported by the ESP32, but you will need to dig into the related APIs yourself |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Just google and look at the command line parameters of ffmpeg. |
Beta Was this translation helpful? Give feedback.
-
I thought you talk windows: I would expect that you can just play audio from udp by defining a udp source and don't need to care too much how the output is working. Did you try just to play an audio file to check if the output is working a expected... |
Beta Was this translation helpful? Give feedback.
-
Well, I guess you skipped a topic: you can only play audio to an audio destination. FT8 is not audio and I would expect that you need to decode this somewhere first Ok, I am lamer, but not that much... :-) I already did it using USB. I defined a composite USB device, two way audio plus a serial port. It's working very well. (the serial port has an independent job, kind of remote control, sets the band, frequency, mode of the radio etc) Now I am about to do the same, but using wireless sonnection. The serial port is not a problem, but the audio i/o. |
Beta Was this translation helpful? Give feedback.
No, it is not: pschatzmann/ESP32-A2DP#283 and sending FT8 over an audio codec will just not work!
I think you really need to decide if you transmit FT8 or audio: I would first try to stick with FT8 and do the decoding and encoding on the desktop. Did you already find out if USB/Serial is too slow for this ?
If you want to write your own solution, I suggest that you have a look at the provided communication examples.You try to can compile and run the sketches written with the audio tools on the desktop as well.
If you just want to deal with audio (record, convert, stream) on the desktop, I suggest that you have a look at ffmpeg
Unfortunately I am not using Windows, so you will need to find…