cancel
Showing results for 
Search instead for 
Did you mean: 

stm32wb55 BLE connection crashes with 0x8 error

MarcinGajewski
Associate II

Hi,

I'm having strange situation with mine BLE application on STM32WB5M module, i.e. Peripheral mode, which has implemented configuration characteristic (write with confirm) according by BLUEST protocol 00000000-000F-11e1-9ab4-0002a5d5c51b. 

Client reported, that during write operation to one of config characteristic (activate beep & 30s LCD), STM32 breaks connection, but it happens only on low battery!

I started investigation with debug console, as main objective was to replicate situation, using HopeRF and AT commands as Central (tested before all worked smoothly). Currently I can connect, but I can't proceed the write operation, as STM32 breaks BLE connection with very little feedback (picture), i.e. Reason 0x8. When I used the ST BLE Toolkit, it does work fine though. 

What I tried and failed:

- set the same interval, latency and timeout for Phone and HopeRF

- changing the ST BLE stack from 1.18 to 1.21

Thanks for any help. 

Marcin

MarcinGajewski_0-1754650550224.jpeg

MarcinGajewski_1-1754650686863.jpeg

 

 

4 REPLIES 4
FilipKremen
ST Employee

Hello,

the error code 0x08 means "Connection Timeout". If I understand correctly, it's working fine with ST Toolbox app. However, it's not working with HopeRF which I assume is a board from competitor?

The second log with Android messages, is it from your own application?

What exactly do you mean by "it happens only on low battery"? Can you please describe it more in detail?

Thank you.

Best regards,

ST support

 

When you say a "Connection Timeout", in which step it might happen? When trying to write to STM32 or when STM32 responses and there is no confirmation? I even set up a 10sec timeout. It really doesn't matter is it a 30ms or 10000ms, it either breaks connection, just quicker or need to wait a while, but same effect. 

Yes, on ST Toolbox all seems to work fine. HopeRF connects successfully, but when I try to send data it breaks connection, the same effect as reported from Android app (picture with logs), using a Flatter. What worries me is:
1. I tested it around 2 weeks ago, HopeRF could do all of the work, no issues.

2. The same situation seems to bother Flutter on Android. 

Client described it works fine, when new batteries are placed. When he works on almost discharged (low voltage), it guaranty to happen. 

Mine goal is to find out more details, as Reason 0x8 seems not to be accurate. There are debug pins, might that help to find a root cause. 

Regards

Marcin

FilipKremen
ST Employee

Hello,

regarding the low battery, you mean low battery on HopeRF side? If it's this case, I would recommend to contact their support team.

Did you update the Flutter BLE library? This could also cause the issue. I would suggest visiting other forums for Flutter development.

Best regards,

Filip Kremen

MarcinGajewski
Associate II

HI Filip,

If it would be case of low battery on HopeRF side, I would contact them.

Filip, situation is as follows-> both HopeRF and Flutter (Android) have identical issue in communication to write 21B value to characteristic on STM32WB. The issue of both sources, points to the potential issues with STM32. I did update the BLE stack (1.18 -> 1.21), changed parameters like MTU, interval and so on. My question is how to investigate situation further using more sophisticated tools like attached on the picture, e.g. using scope. Or any other BLE parameters that I could play with? 
The small hint, I managed to write data, by shorting the frame from 21B down to 8B.

MarcinGajewski_0-1755178364522.png