STMicroelectronics / STBLESensor_Android

"ST BLE Sensor" Android application source code.
https://www.st.com/en/embedded-software/stblesensor.html
Other
111 stars 57 forks source link

BlueVoiceFullBand Not Working #9

Open berlioan opened 4 years ago

berlioan commented 4 years ago

Hi,

I'm trying to use the BlueVoiceFullBand demo with a bluecoin, but It doesn't seem to work. For which kind of STM32 device this demo was created? Are there some particularities we must know to make it work?

Best regards,

A.

GiovanniVisentiniST commented 4 years ago

Hi,

yes the demo is not working with the BlueCoin board. you need a ST32WB + FP-AUDBVLINKWB1 firmware

Best Regards Giovanni

berlioan commented 4 years ago

Hi thanks for your fast response.

I would like to make a full duplex audio communication between an Android device and a bluecoin. Even this example doesn't work, it's still possible to integrate these functions into the BlueVoiceFragment, but which layers must be changed to make it work?

Does the ST32WB + FP-AUDBVLINKWB1 allow a fullduplex communication with an Android device?

Which advantages the second option brings compared to the first one?

Thanks a lot

GiovanniVisentiniST commented 4 years ago

Hi,

if you want to use the BlueCoin, using the ADPCM Codec you could have problem with the BLE Bandwidth since the codec is not the best. if you can use the Opus codec, into FP-AUD-BVLINK2 there is an fw that permit you to have a full duplex communication, between 2 BlueCoin.

checking with my colleagues, using that fw you should do some changes.

app side:

into the fw side you have to:

we have in the pipeline to add the support for the full duplex, but it will not be done in a short term.

the big difference between the BlueCoin and the STM32WB is that the STM32WB is bluetooth 5 complaint, so you can have more bandwidth -> better audio quality.

berlioan commented 4 years ago

Hi Giovanni, Thanks for your help. I will try to do so.

berlioan commented 4 years ago

Hi Giovanni, I succed to make the communication between Android and the STM32WB using the fullduplex demo but I still have an unresolved problem. If I force the « receiving mode » in the nucleo I’m able to start and stop the emission of audio. But I would like to avoid this by sending a control notification that will notify the Nucleo to change it state. After some researches I found two methods that might correspond to what I need to do but couldn’t make it work. The first one is sendCommand(byte commandType,@NonNull byte[] data) from the feature class and the other one is notifyOnFeature(feat: Class, dataToWrite: ByteArray) from the NodeServer class. So, could you tell me what’s the right way to send a control notification from the Android to the Nucleo ? Thanks