I have read the HSP bluetooth specification but I don't understand If I can use the headset bluetooth profile to send data (e.g. audio stream) from headset to phone and from phone to headset. If the HSP specification I see that the headset send AT commands to audio gateway, but I don't understand how the data are transferred from audio gateway to phone and from phone to audio gateway. I want to change data between 2 android devices that have only HSP, HPF and A2DP profiles. It is possible to send/receive data to/from 2 devices with only this bluetooth profiles?
1 Answers
Technically you can transfer data via the audio channel. E.g. a wav file is also some binary data, containing audio Ra data, so why not transfer any other binary? You just have to bypass the encoder (sbc or similar) what maybe is not so easy. Otherwise your binary data is destroyed.
Moreover, note that you talk from audiogate and smartphone. Usually the smartphone IS the audiogate. E.g. when using smartphone and headset, the smartphone also called audiogate in the Bluetooth spec.
If you try to connect 2 android devices with audio streams, of of these needs to take the headset role.
You could also transfer data using hfp by using AT commands. Might get a bit ugly. By the way, if you can send AT commands, these commands are most likely transferred over rfcomm. So I am wondering why you cannot access it.