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

Master emulator pairing, passkey and bonding issue

Hi  Sir/ Miss:

I use master emulator to develop software testing device that dll version is 2.1.13.14.

It's developed on using C#.

And, I use nrf51 dongle (PCA10031) to develop software.

I have two questions about pairing, entering passkey and bonding with peripheral device.

Q1.

When I connect that device don't require to enter passkey, I can get the data on device information service and battery service.

But, I can't get any data on requiring passkey device. The API display " ATT error insufficient authentication " message.

I check the master emulator document of pairing, passkey and bonding in security sections.

It has some topic about these sections.

I can't find how to enter passkey and send to device?

It only mentions that "public int Passkey { set;}". That, I can set value for passkey.

But, I don't understand how to send it to device? Is there having API function for user in MasterEmulator.dll?

Or, should I use "SendData" function to send passkey?

Q2.

I don't understand the SOP of pairing, passkey and bonding.

In my current thoughts, the SOP might be connect -> pairing (STK) -> send passkey -> bonding (LTK).

If it's wrong, please correct me.

Thank you.

Parents Reply
  • I try to create below function.

            void OnSecurityRequest(object sender, SecurityRequestEventArgs arguments)
            {
                SecurityRequestEventArgs securityRequestEventArgs = new SecurityRequestEventArgs(true, true);
                securityParameters.IoCapabilities = IoCapabilitiesEnum.DisplayOnly;
                securityParameters.MaximumEncryptionKeySize = 16;
                securityParameters.OobAvailability = OobAvailibilityEnum.OobNotAvailable;
    
            }
    
            void OnPasskeyRequest(object sender, PasskeyRequestEventArgs eventArgs)
            {
                
                passkeyRequestEventArgs.Passkey = 123456;
            }

    And, these functions add in RegisterEventHandlers()

    But, I can't check whether the setup is working?
    Or, are these setting wrong?

    Thank you.

Children
No Data
Related