Hi Dialog support team,
I have already implemented Keyboard Ref design on my Dev kit and it worked very nice! But i am wondering that where is passcode generate from?
I noticed in this function:
uint32_t app_sec_gen_tk(void)
{
// Generate a PIN Code (Between PIN_CODE_MIN and PIN_CODE_MAX)
return (PIN_CODE_MIN + (rand()%(PIN_CODE_MAX - PIN_CODE_MIN + 1)));
}
and two definitions:
#define PIN_CODE_MIN (100000)
#define PIN_CODE_MAX (999999)
So i have a question hope you guys could help me! Could i change the size of passcode by new #define and made it becomes a default value which defines by mysefl like 1111 or 4444 ?
Thanks in advance,
Chung Tran

有人能帮助我吗?: D
Hello Chungtran, does your other quetsion on the forum indicate you have solved this problem already ? BR JE_Dialog
Hi JE,
No, they do not! Actually , i just stuck with this issue . I have already tried to modify all of parameters as possible but it does not work! So i really need some helps from you all.
Best regards,
Chung Tran
I really need to help with this problem, Please!
Could i try to type passcode from android device?
Hi Chung Tran,
I'm afarid that passcode modification is not that straightforward. This passcode is set to The Temporary Key when "Passkey Entry" algorithm is used . And Short Term Key is generated by using three pieces of infomration : TheTemporary Key,Srand and Mrand. Then there are LTK and CSRK following by STK. Once you change passcode generation , bascially the paring procedure - Authentication has violated the BLE specification.
BR, Morris
Hi MH_Dialog,
Thanks for help! So which kind of key DA14580 use to exchange with the mobile phone ? So i have a scenario like that:
when my android device paring with DA14580 then DA14580 will send a passkey entry requirement to android device and the android device have to enter this passcode to connect with DA. So is it possible? and How can i do it? I will greatly approciate your help!
Thank in advance,
Chung Tran