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

BLE masteremulator.dll - Problem with masteremulator. bond() method

Hi,

I have been experimenting with the master emulator .dll - I started with the HidDemo project which is written in C#. This seems to work perfectly well.

I have rewritten ( translated ?) the demo code into VB.NET ( Visual Studio Express 2010). Everything seems to be ok until I try to call masteremulator.bond(securityparameters). In my version this fails. As far as I can see the security parameters I am sending to the method are the same as those sent by the HidDemo bond function.

I have attached a word document with both sets of code and the securityparameters exposed. I have also attached attached the log that the masteremulator dll has churned out (sorry it is in verbose mode).

I fully expect to find that I am missing something glaringly obvious, but for the moment I can see the wood for the trees! :)

Thanks in advance to anyone who can spot the problem.

Regards

Godric

master_emulator_log.txt

Parents
  • I'm sorry for the delay in answering this, but I just realized that there is a difference between Invoke and BeginInvoke, at least in C#.

    Invoke will wait for the invoked code to complete, while BeginInvoke just starts the code and then returns. Since the problem you see most likely comes from the callback function blocking, you should make sure that you use BeginInvoke and not Invoke, or whatever VB's equivalent is.

Reply
  • I'm sorry for the delay in answering this, but I just realized that there is a difference between Invoke and BeginInvoke, at least in C#.

    Invoke will wait for the invoked code to complete, while BeginInvoke just starts the code and then returns. Since the problem you see most likely comes from the callback function blocking, you should make sure that you use BeginInvoke and not Invoke, or whatever VB's equivalent is.

Children
No Data
Related