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

nrf52840 pdk multirole

Hi,

I am trying to set an nrf52840 pdk (with SDK14 and s140_nrf52840_5.0.0-2.alpha) as peripheral and central at the same time and another nrf52840 pdk just as a peripheral . First the multirole pdk start advertising and smart phones can communicate with it via pairing by using static passkey with MITM . Then i send a command from the phone to tell the pdk start scanning for another nrf52840  pdk wich acts just as a peripheral and its characteristics are protected by static passkey with MITM as well. Everything  works fine utill i start dicovery for nrf52840  pdk(just peripheral) services from the multirole nrf52840 pdk (wich now act as central), I get  Collector did not use MITM from the peripheral side and disconnecting, and on the multirole side i get Disconnected with error 13 which means Operation timed out. So my question is :

Is its possible to pair two nrf52840 pdk with static passkey? note that i use sd_ble_gap_auth_key_reply() to answer the passkey from the central to the peripheral, which i am not sure if it's the right way! My idea is based on ble_app_multirole_lesc example.

Parents
  • Hi Nahro,

    Please try to test with a single connection first. Just to make sure the problem was not because you have multiple roles and for some reasons the peer manager messed up. 

    Secondly, doing service discovery shouldn't cause any issue with encryption level. You only receive rejection from the peer when you try to do a read/write that require the connection to be encrypted by MITM. 

    Also the peer shouldn't disconnect because the link was not encrypted at correct level. Unless it's how the application designed. 

    Using sd_ble_gap_auth_key_reply() to tell the softdevice what the passkey is (when the peer device display it) is the correct way. 

    I would suggest you to get a sniffer trace to see what exactly happens over the air. 

  • Hi Hung,

    Thank you for your reply. After service dicovery i try to read characteristics  from the peripheral  thats why i receive rejection. I will test your a single connection and i will use sniffer trace but not today maybe next week.I will get back withe test results a soon as i have a time.

Reply Children
No Data
Related