Acknowledged
CIQQA-3377

impossible to keep ANT+ sensors paired to the simulator

I'm running Connect IQ Device Simulator 8.2.2 the most recent version on my Mac, and I have a Garmin ANT+ stick.

I'm able to pair ANT+ sensors; but I have no idea how to keep them paired.

Currently the flow goes like this:

- Start datafield simulator

- Open Settings -> Manage Sensors menu

- Search and pair ANT+ sensors (this process kills the running app, but does allow me to pair the sensors).

- But now we have to somehow restart our app because the app is not running; so I kill the simulator and restart it

- Now my app is running but my ANT+ sensors are all in the "Disconnected" state. There is no obvious way to get them to search mode or reconnect without going through the same flow as before which will kill my app; clicking Unpair or RemoveAll will kill the app. Then I can repair the sensors but I will have to reboot the simulator to get my app running again and then it will not be disconnected.

Sometimes, with shear luck, when I restart the simulator my app will be successfully paired with the ANT+ sensor(s). No idea why this sometimes works, it's about 1 in 20. Makes it very cumbersome to test and develop locally. Am i doing something wrong? What is the recommended approach to get your app restarted after the pairing menu kills the app?

  • After you pair sensors and your app closes, do *not* manually close ("reboot") the simulator, but run the app from VS Code (or the command line) as you normally would.

    Running the app a 2nd time does not "reboot" the simulator, it simply tells the existing simulator process to run your app. Notice that the simulator has a "kill app" command which does not also kill the sim. If the sim required a restart in order to run another app, you'd think that killing the app would also close the sim.

    If the problem you're having is that the app refuses to run a 2nd time unless you close the simulator, this is just an annoying CIQ bug, it doesn't mean that you necessarily have to kill the sim in order to run your app again. What you can do is try to re-run the app a couple of times until it finally "takes". For me it often helps to select Run / CTRL-F5 (and not Run and Debug / F5).

    Funnily enough, I've found that when the app gets stuck like this, the *2nd-last* attempt at running the app usually works - the final attempt is seemingly what causes the 2nd-last attempt to finally go through, as at this point, VS Code will tell me that the app is already running and it asks me if I want to start another instance. Or maybe I'm just not waiting long enough, idk.

  • how? I just see a watch face with the blue triangle on it.

  • Why do you kill the simulator in #4? Just Run the app in the running simulator