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

SDK 14.0.2 multirole lesc segger embedded studio project

Hi,

I am using the sparkfun nrf52832 breakout board with segger jlink and softdevice 5.1.0, I am not using the DK board.

I modified the BLE peripheral uart ses project and added the necessary includes and files to make the multirole lesc ses project.

The example runs and when I try to bond using the nrf connect app it fails. Following are the logs on RTT

<info> app: Initializing nrf_crypto.
<info> app: Initialized nrf_crypto.
<info> app: Generating key-pair
<info> app: Converting to raw type
<info> app: Erase bonds!
<info> app: Scanning
<info> app: Advertising
<info> app: LE Secure Connections example started.
<info> app: PERIPHERAL: Connected, handle 1.
<info> app: CENTRAL: BLE_GAP_EVT_SEC_PARAMS_REQUEST
<info> app: CENTRAL: BLE_GAP_EVT_LESC_DHKEY_REQUEST
<info> app: CENTRAL: BLE_GAP_EVT_PASSKEY_DISPLAY: passkey=173696 match_req=1
<info> app: Press Button 1 to confirm, Button 2 to reject
<info> app: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 1
<info> app: Numeric Match. Conn handle: 1
<info> app: PERIPHERAL: Disconnected, handle 1, reason 0x8.

and the app says "Couldn't pair with NordicLESCApp because of an incorrect PIN or passkey"

I am attaching the project file ble_app_multirole_lesc_pca10040_s132.emProject I created, can you check if the configuration is correct. If not, can you provide me with a correct project file?

Thanks, Raghav

  • If you test and compile the gcc project do you have any problem ?

    Have you press button 1 on the board to confirm pairing? Do you see the same passkey on the phone ?

    Which phone did you test with ?

    Have you tried to test with 2 boards running the same multi role lesc firmware ?

  • Hi,

    I got the LESC working with the uart example.

    Now I want to add additional RX2 and TX2 characteristics to the NUS service, which are protected by LESC_WITH_MITM. adding 3rd characteristic works, but when I add the 4th, then I get a NO_MEM error from sd_ble_gatts_characteristic_add.

    I tried increasing the STACK_SIZE in segger because of BLE_GATTS_VLOC_STACK but still it fails.

  • Hi Raghav, 

    It's not the size of the memory in the application but the size of the memory you configured for the stack. 

    When you increase the size of the attribute table and if you use BLE_GATTS_VLOC_STACK, you need to increase the NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE accordingly. You can find the define inside sdk_config.h 

    If you use different 128bit UUID base for RX2, TX2, you need to increase NRF_SDH_BLE_VS_UUID_COUNT as well. 

    After that the RAM configuration for softdevice need to be increased, please check the log when you call nrf_sdh_ble_enable().

Related