This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to reconfigure/reset BLE? nrf 51822 - sd s130 2.0.1

Firstly the develop environment.

Windows 10 KEIL as IDE Device: nrf 51822 - sd s130 2.0.1 - SDK 12.1 nRF5_SDK_12.0.0_12f24da.zip

Use case: We have 2 application mode for BLE

Application 1 (using a 3th. framework): only send frequency advertising as "alive signal"

  • send advertising packets
  • analyse public advertising packets

Application 2: pair with smartphone and exchange data.

  • register event handle
  • softdevice_ble_evt_handler_set
  • softdevice_sys_evt_handler_set

The problem is (I'm uncertain about that)

After using application 2, the application 1 does not work anymore. If I'm trying to reinit softdevice, the whole application crashed. If I'm reset event handler e.g. (softdevice_ble_evt_handler_set(null)), the application crashed.

Can anyone help us to implements multi BLE-Modes with 1 device?

Thank you very much.

Parents
  • Are you sure you even need to reinit the SoftDevice? This is usually only needed when you change the attribute table, i.e. change the services, characteristics and so on. It seems application 1 only advertises and scans? And application 2 is the only one that ever is in a connection, and therefore only needs to use the attribute table.

    If you still want to reinit, how are you doing this? Maybe you can include some code? Are any of the functions returning errors?

Reply
  • Are you sure you even need to reinit the SoftDevice? This is usually only needed when you change the attribute table, i.e. change the services, characteristics and so on. It seems application 1 only advertises and scans? And application 2 is the only one that ever is in a connection, and therefore only needs to use the attribute table.

    If you still want to reinit, how are you doing this? Maybe you can include some code? Are any of the functions returning errors?

Children
No Data
Related