Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Intermittent problems

Several different copies of the dev kit, and a couple of different hosts. I often get "Failed to secure connection. Disconnecting.". I can find where it's generated in the code, but despite days of tracing back thru the call stack, I can't figure out what actually causes the error. I am running the CGMS example app. I have noticed that it no longer does the passkey handshake - never displays a passkey on the UART, nor asks for it on the BLE host.

I am also at a loss for the configuration utility that generates a consistent sdk_config.h and/or app_config.h, and how to configure the GATT stack to specify the BLE variables that are presented to the host. I have used BLE on other platforms and it wasn't this hard. I've been all over the documentation, but I'm lost in the forest. Could someone please point me toward the right tree?

Parents
  • I often get "Failed to secure connection. Disconnecting.". I can find where it's generated in the code, but despite days of tracing back thru the call stack, I can't figure out what actually causes the error.

    The log message comes when one of the devices in your connection doesn't respond to a security request. To better understand what caused the issue with your device you will have to run a BLE sniffer when it happens. You may use the nRF Sniffer 2.0 beta which can run on an nRF5 DK or a separately dedicated sniffer. Feel free to share your sniffer log with me and I will help you figure out why this is happening.

    I am running the CGMS example app. I have noticed that it no longer does the passkey handshake - never displays a passkey on the UART, nor asks for it on the BLE host.

    As far as I can tell we have never used passkey handshake in the CGMS example. Have you been running the GLS example earlier? Continous glucose monitoring is a different BLE service from glucose, and only the example implementing GLS in the SDK uses passkey.

    I am also at a loss for the configuration utility that generates a consistent sdk_config.h and/or app_config.h, and how to configure the GATT stack to specify the BLE variables that are presented to the host.

    Generally GATT configuration is so unique per application that we do not put the configuration of GATT in the config files. The configuration parameters for GATT per service is found in the init function of the service implementation, so if you are looking for CGMS configuration you need to look in components\ble\ble_services\experimental_nrf_ble_cgms\nrf_ble_cgms.c and have a look at the init function. 

    Also note that many of the GAP "connection parameters" for the BLE connection, like min/max connection interval, slave latency, supervisor timeout, etc., are configured though sd_ble_gap function calls. In our examples, you find this in the file main.c and this is also where you find the parameters as defines in the top of the file.

    I have used BLE on other platforms and it wasn't this hard. I've been all over the documentation, but I'm lost in the forest.

    Thank you for the feedback, it's valuable to us. It has been forwarded to the SDK team to let them know that they should consider looking into the way configuration options are covered in the documentation.

    Best regards,
    Rune Holmgren

Reply
  • I often get "Failed to secure connection. Disconnecting.". I can find where it's generated in the code, but despite days of tracing back thru the call stack, I can't figure out what actually causes the error.

    The log message comes when one of the devices in your connection doesn't respond to a security request. To better understand what caused the issue with your device you will have to run a BLE sniffer when it happens. You may use the nRF Sniffer 2.0 beta which can run on an nRF5 DK or a separately dedicated sniffer. Feel free to share your sniffer log with me and I will help you figure out why this is happening.

    I am running the CGMS example app. I have noticed that it no longer does the passkey handshake - never displays a passkey on the UART, nor asks for it on the BLE host.

    As far as I can tell we have never used passkey handshake in the CGMS example. Have you been running the GLS example earlier? Continous glucose monitoring is a different BLE service from glucose, and only the example implementing GLS in the SDK uses passkey.

    I am also at a loss for the configuration utility that generates a consistent sdk_config.h and/or app_config.h, and how to configure the GATT stack to specify the BLE variables that are presented to the host.

    Generally GATT configuration is so unique per application that we do not put the configuration of GATT in the config files. The configuration parameters for GATT per service is found in the init function of the service implementation, so if you are looking for CGMS configuration you need to look in components\ble\ble_services\experimental_nrf_ble_cgms\nrf_ble_cgms.c and have a look at the init function. 

    Also note that many of the GAP "connection parameters" for the BLE connection, like min/max connection interval, slave latency, supervisor timeout, etc., are configured though sd_ble_gap function calls. In our examples, you find this in the file main.c and this is also where you find the parameters as defines in the top of the file.

    I have used BLE on other platforms and it wasn't this hard. I've been all over the documentation, but I'm lost in the forest.

    Thank you for the feedback, it's valuable to us. It has been forwarded to the SDK team to let them know that they should consider looking into the way configuration options are covered in the documentation.

    Best regards,
    Rune Holmgren

Children
No Data
Related