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

nrf52840 sdk15.2 ble_app_hrs_freertos example transplant bonding and MITM function using the example of ble_app_gls ,but when I connect nordic device using phone ,there is error just as below

Hi all

nrf52840 Development board,sdk is nRF5_SDK_15.2.0_9412b96,PC is windows 10

I want to add the function about bonding and passkey to the example of "ble_app_hrs_freertos",so I use the example of "ble_app_gls",

but after I transplant the function bonding and passkey,testing the function,there is something wrong,as follow:

I hope you can give me some advice.Thank you!

Parents
  • Certainly.But I don't know how to post my project in this forum.

    I don't chang the peer-manager_init function.So far,LESC can be used,but there is also something wrong with my code.When I disconnect the device,hard fault willl appear.also error will appear when switch with in everal mobile phones to test the code.

    The log as follows:

     0> <info> app: HRS FreeRTOS example started.
     0> <info> app: Fast advertising.
     0> <info> app: Connected
     0> <info> app: Passkey: 415201
     0> <info> app: BLE_GAP_EVT_LESC_DHKEY_REQUEST
     0> <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
     0> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
     0> <info> app: conn_sec_status.mitm_protected = 1
     0> <info> app: Link secured. Role: 1. conn_handle: 0, Procedure: 1
     0> <info> app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 1 kdist_own:0x3 kdist_peer:0x2
     0> <error> hardfault: HARD FAULT at 0x00000000
     0> <<info> app: HRS FreeRTOS example started.
     0> <info> app: Fast advertising.
     0> <info> app: Connected
     0> <info> app: Passkey: 265692
     0> <info> app: BLE_GAP_EVT_LESC_DHKEY_REQUEST
     0> <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
     0> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
     0> <info> app: conn_sec_status.mitm_protected = 1
     0> <info> app: Link secured. Role: 1. conn_handle: 0, Procedure: 1
     0> <info> app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 1 kdist_own:0x3 kdist_peer:0x2
     0> <info> app: Fast advertising.
     0> <info> app: Disconnected
     0> <error> hardfault: HARD FAULT at 0x41000000
     0> <e<info> app: HRS FreeRTOS example started.
     0> <info> app: Fast advertising.
     0> <error> app: ERROR 8198 [Unknown error code] at :0
     0> PC at: 0x00000000
     0> <error> app: End of error report

Reply
  • Certainly.But I don't know how to post my project in this forum.

    I don't chang the peer-manager_init function.So far,LESC can be used,but there is also something wrong with my code.When I disconnect the device,hard fault willl appear.also error will appear when switch with in everal mobile phones to test the code.

    The log as follows:

     0> <info> app: HRS FreeRTOS example started.
     0> <info> app: Fast advertising.
     0> <info> app: Connected
     0> <info> app: Passkey: 415201
     0> <info> app: BLE_GAP_EVT_LESC_DHKEY_REQUEST
     0> <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
     0> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
     0> <info> app: conn_sec_status.mitm_protected = 1
     0> <info> app: Link secured. Role: 1. conn_handle: 0, Procedure: 1
     0> <info> app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 1 kdist_own:0x3 kdist_peer:0x2
     0> <error> hardfault: HARD FAULT at 0x00000000
     0> <<info> app: HRS FreeRTOS example started.
     0> <info> app: Fast advertising.
     0> <info> app: Connected
     0> <info> app: Passkey: 265692
     0> <info> app: BLE_GAP_EVT_LESC_DHKEY_REQUEST
     0> <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
     0> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
     0> <info> app: conn_sec_status.mitm_protected = 1
     0> <info> app: Link secured. Role: 1. conn_handle: 0, Procedure: 1
     0> <info> app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 1 kdist_own:0x3 kdist_peer:0x2
     0> <info> app: Fast advertising.
     0> <info> app: Disconnected
     0> <error> hardfault: HARD FAULT at 0x41000000
     0> <e<info> app: HRS FreeRTOS example started.
     0> <info> app: Fast advertising.
     0> <error> app: ERROR 8198 [Unknown error code] at :0
     0> PC at: 0x00000000
     0> <error> app: End of error report

Children
No Data
Related