I'm trying to understand example "ble_app_hts" how after advertising make a connection. I didn't see in code any call of function "sd_ble_gap_connect" ? how is made connection ?
I'm trying to understand example "ble_app_hts" how after advertising make a connection. I didn't see in code any call of function "sd_ble_gap_connect" ? how is made connection ?
The SoftDevice API uses SuperVisor Calls( SVCs) to exposes the functionality of the SoftDevice , this is stated here in the S130 SoftDevice Specification.
The SoftDevice is delivered as a precompiled binary and the SVCs are used to expose the SoftDevice functions without having any link-time dependencies between the application and the BLE protocol stack.
The SoftDevice API uses SuperVisor Calls( SVCs) to exposes the functionality of the SoftDevice , this is stated here in the S130 SoftDevice Specification.
The SoftDevice is delivered as a precompiled binary and the SVCs are used to expose the SoftDevice functions without having any link-time dependencies between the application and the BLE protocol stack.
We communicate with application through IRQ ? Aftere receiving the "connection_req" my application jump to appropriate interrupt vector , hidden in softdevice library ?
Yes, the SoftDevice is 100% event-driven.
Thank you for help . Could you give me "point" or any piece of code in this example where can I found channel number used for connection?
You can use the sd_ble_opt_get function with the BLE_GAP_OPT_CH_MAP option to retreive the channel map used during the connection. However, you will not be able to get any information on which channel within the channel map that is used at the current time. This is masked by the SoftDevice.
ok, now I will know. but the other hands: if we use IRQ (don't call function) how to obtain the error code after data event? if connection failed ?