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

connect to bonded device using Masteremulator C#

Hi all,

I am using a C# application with the masteremulator dll to connect to a nRF51822 with S110 V8.0.0

I can bond with a new device, and communicate with it in a secure way. But I don't know how to reconnect later with this bonded device.

I did not find useful info in the examples.

How can the c# application know whether or not the bond() function has to be called?

Any information or example is welcome.

I use function RestoreBondInformation and GetBondInformation to save and restore the bonding information.

Parents
  • Hi Kuhn,

    You would need to store the device address and try to reconnect later with that device. If bond information is not cleared the MasterEmulator will try to re-encrypt the link automatically.

    If you for example deleted bond information or close the program and reopen it, you would need to call RestoreBondInformation () with the string you get earlier with GetBondInformation .

    If you want to support multiple bonded devices, you would need to create a table that match the address of the device and the string you get from GetBondInformation () when you are bonding with that device.

Reply
  • Hi Kuhn,

    You would need to store the device address and try to reconnect later with that device. If bond information is not cleared the MasterEmulator will try to re-encrypt the link automatically.

    If you for example deleted bond information or close the program and reopen it, you would need to call RestoreBondInformation () with the string you get earlier with GetBondInformation .

    If you want to support multiple bonded devices, you would need to create a table that match the address of the device and the string you get from GetBondInformation () when you are bonding with that device.

Children
No Data
Related