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

Master Emulator not connecting

I am using the Master Emulator C# examples to build my own application. None of the examples are able to properly connect to a remote device. When I open up the Master Control panel I can connect to a remote device and read the services. I am having the same issue when I use the masterEmulator.Connect(BtDeviceAddress) method. Any advice? Or is the source code for the master control panel available so I can review how that is getting the job done? Thanks.

Parents
  • Posting to possibly help others who hit this same problem.

    Device discovery in master emulator can be performed by:

    StartDeviceDiscovery(); //returns asynchronously, then reports devices when found
    

    or

    DiscoverDevices(); //runs for default 1 sec, then returns a collection
    

    If you go the "StartDeviceDiscovery" route, I think it's necessary to

    StopDeviceDiscovery();
    

    before attempting a device connection. The isn't consistent with their documentation (this is likely a bug in Nordic emulator code) but whatever. This passed the strenuous works-on-my-machine test.

Reply
  • Posting to possibly help others who hit this same problem.

    Device discovery in master emulator can be performed by:

    StartDeviceDiscovery(); //returns asynchronously, then reports devices when found
    

    or

    DiscoverDevices(); //runs for default 1 sec, then returns a collection
    

    If you go the "StartDeviceDiscovery" route, I think it's necessary to

    StopDeviceDiscovery();
    

    before attempting a device connection. The isn't consistent with their documentation (this is likely a bug in Nordic emulator code) but whatever. This passed the strenuous works-on-my-machine test.

Children
No Data
Related