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.

  • @Topher: What exactly the error/issue you have when you try to connect ? Have you managed to scan for devices ?

    The MasterEmulator library is no longer maintaining and developing, we suggest to use the pc_ble_driver instead.

    There are some examples in the python binding here.

  • No error. The method returns True/False and for me will always return false. This is true for all the examples as well as my code. My end goal is to use the discoverservices() method but for that I first need to connect properly. Once I get that that is all I need. But I will look into the pc_ble_drivers. Thanks.

  • I'm sorry for the late response.

    It's strange the the example didn't work well for you.

    Could you state a little bit more on your environment, which OS are you using ? Which hardware ? Do you have any troble with pc_ble_driver ?

  • 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.

  • I'm trying to use the Master emulator API to write a script in IronPython to automate the connection steps without Master Control Panel but I have the same problem here. I was able to create a MasterEmulator instance, EnumerateUsb(), open(), run() and connect to mynrf51 dongle. However, I tried both ways using DiscoverDevices() or StartDeviceDiscovery() then StopDeviceDiscovery(), it still always return False when I attempt to connect(BTDeviceAddress).

    What am I missing here? My main goal is just connect the nrf dongle to my BLE device. Do I need to discover the pipes too? What are the pipes for? Thanks!!

Related