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.

Parents
  • 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?

Reply
  • 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?

Children
No Data
Related