cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the handle of a service and characteristic from an initialized BlueNRG-MS module?

Muhammad Waseem Abbas
Associate II
Posted on May 05, 2017 at 15:14

Hi All,

Can we somehow retrieve the handle of service and characteristic of that service form an already initialized BlueNRG-MS module. I need to do this for the following scenario:

I initialize a BlueNRG-MS module, add some services and characteristics to it and then shutdown the external processor while the BlueNRG-MS module is still running in initialized state and advertising. Then I connect to the BLE module through an Android App and the module sends a wake-up signal to the external MCU via SPI-IRQ pin. The external MCU wakes up but we do not initialize the BLE module again as it has been already initialized and is directly connected to the Android app. Now, to update the values of characteristics we need the characteristic and service handles but as the external MCU has restarted, we have lost those handles and thus can't update the characteristic values without handles. Is there any way that we can get those handles from the BLE module after the external MCU has been restarted?

Thanks,

Waseem Abbas

CC: 

Vilei.Antonio

,

Palmieri.Andrea

#bluenrg-ms
2 REPLIES 2
Antonio Vilei
Senior III
Posted on May 05, 2017 at 16:34

Dear Waseem Abbas,

before shutting down the MCU, you could store the state information in the non-volatile flash memory of your MCU. After wake up, you will then be able to restore the previous state.

As an alternative, depending on the specific MCU you are using, you may also evaluate some different low-power configuration (not a complete shutdown), so that volatile memory is preserved after wake up. In this case, if you use any of the STM32L series, the power consumption will be minimal.

Hope that helps,

Antonio

Posted on May 08, 2017 at 15:13

Hi Antonio,

Can't we retrieve the handles using UUIDs of services and characteristics?

Regards,

Waseem Abbas