Hello everyone,
I hope that you are all doing well during those hard times...
I am writing a code for a nRF52840. The connection is successfully established with a cycling powermeter. Three services are sucessfully discovered, according to the Cycling Power Profile from Bluetooth SIG. Then the characteristics of these profiles are also discovered. Finally, after releasing all the discovery data, I am trying to read the values of the characteristics or subscribe to notifications on some characteristics.
Subscribing and reading both work fine as long as I am only doing 1 or 2 requests. But as soon as I am trying to read more than two characteristics (or subscribing to one and reading more than 1 characteristic), it crashes and causes a reset of the board :
My configuration is the following one :
- zephyr pointed on tag zephyr-v2.2.0
- nRF Connect SDK pointed on v1.2.0
I declared the bt_gatt_read_params and bt_gatt_subscribe_params struct statically as global variables :
They are global and filled with parameters from the discovery of services :
And finally they are used like that after all the services and characteristics have been discovered :
My prj.conf file looks like that :
If needed, I could provide more log files or code.
I hope that I was clear enough and that someone can explain me what I am doing wrong :-)
Cheers,
Sellig