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

Master Emulator example differences

I am looking at the Master Emulator examples ProximityDemo and HealthThermoDemo. I can use both to connect to one device that I have (Device A). I try to use ProximityDemo to connect to a different device (Device B) but it won't have anything of it. HealthThermoDemo can connect to Device B just fine. I am looking through the code for both and it looks like they do the same things. What is different between the two examples as for how they try to connect?

Note: When ProximityDemo fails, it gets to "masterEmulator.Connect" but then silently fails.

Parents
  • backgroundConnectWorker is simply to start scanning and reconnecting to the device when it's disconnected. It shouldn't affect the way HealthThermoDemo connect at the first place. I guess the difference is at something else. You can upload your sniffer trace, and I can have a look, maybe I can find something interesting in the advertising packet.

    You can try to simplify the HealthThermoDemo and get to the point that it can't connect to the device (or until it get to the same as the Proximity example), then you can figure out what does the trick.

Reply
  • backgroundConnectWorker is simply to start scanning and reconnecting to the device when it's disconnected. It shouldn't affect the way HealthThermoDemo connect at the first place. I guess the difference is at something else. You can upload your sniffer trace, and I can have a look, maybe I can find something interesting in the advertising packet.

    You can try to simplify the HealthThermoDemo and get to the point that it can't connect to the device (or until it get to the same as the Proximity example), then you can figure out what does the trick.

Children
No Data
Related