Need to help with Passcode issues!

7 posts / 0 new
Last post
chungtran
Offline
Last seen:5 years 3 weeks ago
加入:2015-01-21 05:57
Need to help with Passcode issues!

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

chungtran
Offline
Last seen:5 years 3 weeks ago
加入:2015-01-21 05:57
有人能帮助我吗?: D

有人能帮助我吗?: D

JE_Dialog
Offline
Last seen:13 hours 25 min ago
工作人员
加入:2013-12-05 14:02
Hello Chungtran, does your

Hello Chungtran, does your other quetsion on the forum indicate you have solved this problem already ? BR JE_Dialog

chungtran
Offline
Last seen:5 years 3 weeks ago
加入:2015-01-21 05:57
Hi JE,

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

chungtran
Offline
Last seen:5 years 3 weeks ago
加入:2015-01-21 05:57
I really need to help with

I really need to help with this problem, Please!
Could i try to type passcode from android device?

MH_Dialog (not verified)
Hi Chung Tran,

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

chungtran
Offline
Last seen:5 years 3 weeks ago
加入:2015-01-21 05:57
Hi MH_Dialog,

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