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

What is the passkey for gls example, where is it set

What is the passkey for gls example, and where is it set

I am using SDK13, 10040 nrf52832 s132

Any help appreciated

Parents
  • Hi,

    From the Glucose Application documentation:

    A passkey must be entered at the central to complete the bonding and ensure MITM protection. The Glucose Application will present the passkey during bonding. It is sent on the UART. It is therefore important that UART is set up correctly on the receiving side.

    The passkey is generated randomly by the softdevice and sent over UART. You will have to check the terminal for the passkey on each bonding procedure. In the example, the passkey is sent over UART on receiption of a BLE_GAP_EVT_PASSKEY_DISPLAY event in on_ble_evt() handler. The passkey is available in p_ble_evt->evt.gap_evt.params.passkey_display.passkey.

    Best regards,

    Jørgen

  • I have the exact same problem, and I've been thru the documentation a dozen times or more. i am attempting to connect to the examples GLS app running on the 10040 dev kit, using nRF Connect via a second 10040 dev kit. I am monitoring the serial ports on both, set as the documentation calls out at 115.2 KBPS, 8,n,1, and nothing ever comes out of either serial port, although nRF Connect requests the passkey. Apparently from looking at the code it is to be 6 characters long, but the daisy-chain to actually see how it's selected is horrendously long and convoluted. I must be missing something simple - how can I get that passkey, or alternatively, disable the need for it?

  • I don't know about SDK13, but I tried the GLS in SDK12 just a few weeks ago with the PCA10040 and it worked right out of the box. How did you "monitor" the serial port? I use the good old putty and could see the 6 digit passkey (and other debug messages too) fine. I use Win 7 as my development environment. As for the code where the passkey is sent to the serial port, try to look for BLE_GAP_EVT_PASSKEY_DISPLAY in the main.c. And if you want to disable the passkey then try

    #define SEC_PARAM_MITM 0 //<-- I guess this may work but I never try it myself...

    in the main.c also.

  • I tested this on SDK v13.0.0 as well, and it works as described. Are you able to see output on UART from other examples? Have you tried with a freshly extracted SDK, to make sure you have not changed anything?

Reply Children
No Data
Related