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

Automatically connected without putting the static passkey at the time of pairing with out bonding.

Hello, 

I am trying connect with the nRF52840 dongle from my android phone using nRF Connect App. The nRF52840 dongle as peripheral and I am using nRF SDK 15.20 and s140_nRF52_6.1.1 device.  My objective is The nRF52840 dongle should connect with nRF Connect App after getting the passkey reply from nRF Connect App otherwise it should not connect.

I am using static passkey at the time of pairing not bonding. I have taken reference from This document.  and I have implemented in ble_app_gls example. But I disn't get what actually I am wanting. After getting the BLE device by scanning whenever I pressed the "connect" in APP it is connected with the nRF Dongle without putting the passkey also the pairing pop-ups is coming but when I click on "pair" on the paring pop-up dongle disconnected. But the dongle should connect with the nRF APP after putting the passkey on the app. This is my full code below

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Copyright (c) 2014 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I didn't understand whats the wrong with the code or I am doing in wrong way.Please help me to archive my goal.

Thank you advanced.