This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Master Emulator random behaviour

I am developing a windows application, using the MasterEmulator api. I am discovering BLE devices with scan parameter Active and Passive. The result is that most of the time data from the advertising packet is returned and sometimes the data from the scan response. Both advertising data contain (different) ManufacturerSpecificData.

I have searched in the forum and found Ole stating that it is not possible to have manufacturer data in both the advertising data and the scan response. (hope I interpreted this right).

However, the softdevice supports this and the Master Control Panel displays it consistently correct.

I expect the MasterEmulator api to return the scan response data when requesting Active scanning, and to return advertising data when requesting Passive scanning.

So testing this with a C# application shows that performing scanning Active and Passive scanning, one after the other in the same method, the results vary. Most of the time the advertising data is returned when Active scanning. And just repeating the Discover Devices with a button click, so without restarting the app, shows varying results.

Can someone explain or classify it as a bug or tell me how to get consistent behaviour?

Thank you.

  • It is by spec perfectly legal to advertise Manufacturer Specific data in both Advertisement and Scan Response, but as you've found out, the Master Emulator API doesn't support it. As you've seen, even when doing active scanning, you will sometimes get the data from the Advertisement packet and sometimes from the Scan Response.

    As I said in the other question here, I've put in a feature request to fix this, but unfortunately it hasn't been done any work on it yet. I'm afraid that it would require possibly quite significant changes to the way advertisement data is handled, so I'm not sure it will be added very soon. Also remember that the Master Emulator API is only meant to be used for development and testing, and not any production quality applications.

    May I ask what your use case for this is?

  • Ole,

    It is a way to be compatible with one solution and open up a migration path to a new solution, or in other words to be compatible and also add custom extras. So it is important to get both data from advertising and scan response.

    If the master emulator api is not for production, then how to implement a solution for hardware that does not have a ble device natively, but could work with a ble dongle and appropriate software?

  • Currently there isn't any easy way to use any of our devices for making a USB dongle. There is a Central softdevice upcoming, but it isn't quite ready for general consumption yet. When it is, it would be possible to use this to build some kind of dongle for your specific use case. Please contact our regional sales manager for your area for details on this.

    In general you will however be better off by using a ready-made Bluetooth dongle for your purpose. This will for example enable you to use the native APIs of your PC's operating system, if there are any. Such dongles may also expose some other kind of API to use BLE devices, but this is something you'd have to discuss with the dongle vendor.

    One of the reasons the Master Emulator is not recommended for production solutions is that we haven't done any work on getting it Bluetooth qualified.

  • What would you recommend then if I want to communicate with one of the ble peripherals from a windows 7 system?

  • Unfortunately, I don't really have a lot of good options on Windows 7. Windows 8 provides native BLE APIs that could be used, but those are not available on Windows 7.

    You may be able to get something working with Broadcom's API, since they are the manufacturer of most chips used in USB dongles, but this is unfortunately not anything we really have any experience with: http://www.broadcom.com/support/bluetooth/sdk.php

    I'm sorry for not being able to give better suggestions, but the ecosystem around BLE is primarily targeted towards new devices and platforms.

Related