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

Question about Master Emulator API

Hi,

I am planning to develop the customer application on window's platform. I am using the customer USB dongle board via COM5. when i call the function

var devices = masterEmulator.EnumerateUsb(UsbDeviceType.AnyMasterEmulator);

the get the error:

Exception in StartMasterEmulator: Device with identifier not found

can i just call the function OpenMasterEmulatorDevice(device) ? my customer dongle board using USB2COM at COM5, i try to pass the parameter COM5 to this function?

Regards Simon

  • Hi,

    Master Emulator supports the following hardware:

    • nRF51 Dongles (pca10000 and pca10031)
    • nRF51 DK (pca10001 and pca10028, with pin 30 connected to ground)
    • nRF8001 DK (nRF2739)

    The hardware is used for connectivity device, and must be programmed with the firmware provided with Master Control Panel. See the Master Emulator help files (standard location "C:\Program Files (x86)\Nordic Semiconductor\Master Emulator\2.1.13.14\Documentation", possibly under another version number) and the Master Control Panel Help files.

    For getting started, and to see that things are working with your hardware and setup, I would suggest having a look at the code examples. (Standard location "C:\Program Files (x86)\Nordic Semiconductor\Master Emulator\2.1.13.14\Example code")

    I also recommend considering using pc-ble-driver instead of Master Emulator. pc-ble-driver uses connectivity firmware based on SDK 12.2 and include patch files so that you can do modifications and compile it for custom boards. There are higher abstractions for Python (pc-ble-driver-py) and for JavaScript (pc-ble-driver-js).

    Regards,

    Terje

  • Hi Terje,

    Thanks for your answer. I am using the example code C:\Program Files (x86)\Nordic Semiconductor\Master Emulator\2.1.13.14\Example code\nRFUart, but it fail at masterEmulator.EnumerateUsb(). and I have programmed the firmware into nRF51822_0.9.0_firmware_115K2.hex into the customer board, and it can run with Master Control Panel 3.10.0. If i am using the customer board, how can i modify the example code to start demo? If it can't support this, then I will try to use pc-ble-driver.

  • When you refer to "customer board", what board are you talking about? Is it one of the official dongles or DKs from Nordic, or is it a custom third party board? If it is the latter then it probably will not work, as it does not use the same schematics as the supported boards.

  • Yes, it's the latter. I track the logs, and found 9;23:36:18.9012 [MainThread] HciH4Driver opened (COM5, 1000000-8-None-1-RequestToSend), the MasterEmulator API are using 1MHz baud-rate, but the my board is 115200, is there a API to change the baud-rate?

  • Master Emulator does not use the connectivity from the SDK, it uses the firmware provided with Master Control Panel. You can program the board from Master Control Panel, via File -> "Flash programming" from the menu bar. There is both a legacy version (115.2k) and the latest version (1M). Note that it is made for our Dongles and DKs, so other boards will most likely not work. If you use custom boards then you should go for pc-ble-driver.

Related