hi i am using nrf52840 s140 softdevice and 15.2 sdk.
can anyone tell how to add default services like hrs,battery and temperature in our own programs
hi i am using nrf52840 s140 softdevice and 15.2 sdk.
can anyone tell how to add default services like hrs,battery and temperature in our own programs
thanku simon iversen
and i got one more problem, when i connect to the advertising device its connected and when disconnect it and its stops advertising and when i reset means its again starts advertising. what is the solution
thanku simon iversen
and i got one more problem, when i connect to the advertising device its connected and when disconnect it and its stops advertising and when i reset means its again starts advertising. what is the solution
Taking a closer look at the BLE UART Emulation example will provide an answer to your question. If you take a closer look at the ble_advertising.h file (Advertising module), you can see that it includes an observer
. . . NRF_SDH_BLE_OBSERVER(_name ## _ble_obs, \ BLE_ADV_BLE_OBSERVER_PRIO, \ ble_advertising_on_ble_evt, &_name); . . .
Every time a BLE event happens (for example BLE_GAP_EVT_DISCONNECTED), the function ble_advertising_on_ble_evt(..) is called. Inside that function there is a switch case that will handle a disconnect event, and start advertising again through on_disconnected(..)-->ble_advertising_start(..)