Wrong PIN number Error - BLE Pairing

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
evilemi
Offline
Last seen:8 months 3 weeks ago
Joined:2020-01-31 12:12
Wrong PIN number Error - BLE Pairing

Hi,

I want to test the BLE secure connection in terms of pairing and bonding.

As my test setup, I'm using the DA14580 pro-development board and run the Codeless source code.

After connecting the board to the PC from UART channel, I send AT+PIN=1234 command to set a pin number. (I get "OK" response in return)

Then when I try to connect to the device from mobile application I get wrong PIN number error even though I enter the correct password ("1234" for this example).

On the other hand, I ran the source code in debug mode and observed thatcodeless_env.pinparameter in user_codeless.c file is correctly set on AT+PIN=1234 command.

However, I couldn't capture the input characters sent from mobile app to the BLE device in debug mode. How come I can debug the code for this case?

What would cause this error? Can you guide me to evaluate it?

Thanks in advance

Device:
PM_Dialog
Offline
Last seen:1 day 9 hours ago
Staff
Joined:2018-02-08 11:03
Hi evilemi,

Hi evilemi,

The passkey entry should be 6 digits. Can you please try to use the 123456 as a passkey? You should send the following AT command: AT+PIN=123456.

If you are starting a new design or project, we recommend starting with our newest Smartbond device named DA14531. The SDK is much improved, we have a lot of code examples and improved documentation, and there is also software roadmap support. There is not any software roadmap support for DA14580 product family and SDK5. Additionally, we are working on a DA14531 reference design that will combine our DSPS (Dialog Serial Port Profile) with Codeless

Please take a look at our new BLE device:

//www.wsdof.com/products/connectivity/bluetooth-low-energy/products/da14531

Thanks, PM_Dialog

evilemi
Offline
Last seen:8 months 3 weeks ago
Joined:2020-01-31 12:12
Hi,

Hi,

Thanks for the reply. I tried with 6 digits PIN number and it worked.

However, we don't want to constraint the PIN number with 6 digits. How can we change it to 4, 5, or 6 or so on?

Thanks

PM_Dialog
Offline
Last seen:1 day 9 hours ago
Staff
Joined:2018-02-08 11:03
Hi evilemi,

Hi evilemi,

According to Bluetooth LE specs, a valid passkey ranges from 000000~999999 (6-digits). If you would like to set it to “1234” by sending AT+PIN=1234 command, a possible workaround would be to send from the Mobile application the value “001234”.

Thanks, PM_Dialog