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
  • I don't think order could cause a problem. I don't think there is a "more correct" way. It's pretty straight forward, you scan for device, you choose the device you want to connect, you connect. After you connect you do service discovery.

    I would suggest you to create your own application based on one of the example and continue from there.

    You can try to capture a sniffer trace, it will be more clear what happens.

    Are you saying that with the proximity example, you can connect to many different devices, but there is only one device you can't connect ?

Reply
  • I don't think order could cause a problem. I don't think there is a "more correct" way. It's pretty straight forward, you scan for device, you choose the device you want to connect, you connect. After you connect you do service discovery.

    I would suggest you to create your own application based on one of the example and continue from there.

    You can try to capture a sniffer trace, it will be more clear what happens.

    Are you saying that with the proximity example, you can connect to many different devices, but there is only one device you can't connect ?

Children
No Data
Related