Using my numbers as Passkey

⚠️
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.
2 posts / 0 new
Last post
nigelyang
Offline
Last seen:2 months 3 days ago
加入:2018-03-20 08:24
Using my numbers as Passkey

Hi Dialog,

I am developing my bonding function based on BMS project code. In normal case, the peripheral (my device) will generate a passkey, and then the passkey should be keyed in in mobile phone APP to complete the bonding process. If my device does not have screen to display the passkey, I would like to set specific numbers,eg, 000000 or 123456, as the passkey. How to implement this by calling the API of SDK? Is it possible? thanks

Device:
PM_Dialog
Offline
Last seen:2天21小时前
Staff
加入:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

Please check the ble_mgr_gap.c file and you will find that passkey = rand() % 1000000;. You should change the passkey into 000000 or 123456.

Thanks, PM_DIalog