How to connect antplus sensor to the simulator?

Subject says it all.

I am working on a Datafield that makes use of Varia radar properties.

However I am struggling because I need to have the Varia connected to the simulator and I just can't find out how to do that. I have found messages on this forum which seem to say you can connect a sensor to the simulator with the use of an ANTplus dongle, but I can't get that to work.

Working on a Mac with macOS Catalina which supports BLE; ECLIPSE IDE 2203; ConnectIQ SDK 4.1.5

I have an ANT+ dongle and it is recognised and activated on the Mac. I also have a Varia. I tried to connect the Varia as well as a HRM strap but no matter what I do the 'Manage ANT+' window in the simulator shows nothing. Obviously I am missing something.

I'd appreciate pointers on:

- How to connect a Varia (or HRM or any) ANT+device to the ConnectIQ simulator.

- How to access the device in a ConnectIQ app (source code snippets are appreciated).

- Documentation on the Simulator. Is there any?

Any help is appreciated.

Thank you very much.

Bram

  • Ok, then it might be a Mac thing…  
    (I‘m out, because I have no Mac)

  • I have updated to SDK 8.1.1 (coming from 7.4.3) and can confirm:

    It‘s not possible anymore to connect an ANT+ sensor to the simulator.
    (works fine when reverting to 7.4.3)

    Has anybody opened a 8.1.1 bug report? (Cannot find any…)

  • I don't know about ANT+ (only have ANT HRM)

    ANT is the wireless network, ANT+ includes the set of standard device profiles for communicating over the network. The 2 terms are sometimes used interchangeably, which is why you may think that your HRM is ANT and not ANT+.

    However, if you open the Sensors menu on any recently updated watch and look at the new-ish Connection Type field, I think you will see that it's always either ANT+ or BLE, never ANT.

    Garmin also implies the same:

    https://support.garmin.com/en-US/?faq=WCgOxE5FqrATubtlzWCuJA&productID=770963&tab=topics

    Garmin® devices that can be used with wireless sensors will connect via ANT+‍® technology or BLE (Bluetooth® Low Energy). 

    To be clear, I'm saying that your HRM actually uses ANT+. ANT+ isn't a more advanced form of the ANT protocol as you may have assumed, it's just a standardized interop layer on top of the ANT protocol.

    (ofc it's not wrong to say your HRM uses ANT, but it would be more accurate to say your HRM uses ANT+)

    Here's some technical details about the differences:

    https://help.legendebikes.com/article/833-what-is-the-difference-between-ant-and-ant

    but I'm not sure what does pairing mode mean.

    You could just search up "Varia pair" and get your answer right away (that the Varia needs to be explicitly put into pairing mode to connect with an Edge device via ANT+).

    I only know devices in pairing mode when they are connecting via Bluetooth, not with ANT

    My educated guess is that most ANT+ sensors will go into pairing mode automatically, when they are activated (turned on or worn) and they're not already connected [*] to a device, for convenience (i.e. the manufacturer does not have to add a pairing button, and the user doesn't have to learn how to use it). This is why people are always complaining of accidentally pairing with someone else's HRM.

    [*] note I said "connected", not "paired". I am aware that Garmin HRMs and other sensors will happily pair with a 2nd device if an already paired device is not within range

    Indeed as Garmin says:

    https://www8.garmin.com/manuals-apac/webhelp/venusq/EN-SG/GUID-A9CECD49-E61B-4B3D-86D8-CBF0C266B5D7-600.html

    TIP: Some ANT+ sensors pair with your device automatically when you start an activity with the sensor turned on and near the device.

    The use of the word "some" here implies that not all ANT+ sensors automatically pair.

    I'm guessing that Varia incorporates an explicit pairing step because of its safety-critical nature.

  • And to address how CIQ apps are able to use the Ant class to communicate with ANT/ANT+ sensors without an explicit pairing step:

    But ofc when you use the native Sensors menu, if you have auto-discover turned off (it's apparently no longer available on newer watches), you have to explicitly pair/connect to sensors after discovering them.

  • I meant that in my code I only use Toybox.Ant and notToybox.AntPlus. 

  • This thread is about 
    How to connect antplus sensor to the simulator?

    …and this seems not possible with SDK 8 anymore.

  • Again, I'm not 100% sure what do you mean by that, but I just tested my DF on MacOS 15.4 with SDK 8.1.1 in the simulator on fenix6pro and I broadcasted my HR from my fr965 and it does work in the simulator. As I wrote above I use Ant.GenericChannel and not the AntPlus classes, not sure if that can be the difference.

  • I meant that in my code I only use Toybox.Ant and notToybox.AntPlus. 

    But that's not what you said. You literally said:

    > I don't know about ANT+ (only have ANT HRM)

    The clear implication is you thought your HRM is not ANT+, which goes far beyond a statement about how you talk to the HRM using Connect IQ. If that's not what you meant, it sure was an interesting way of saying it.

    EDIT: obviously you know that your HRM is ANT+, especially since you literally have an app called "ANT+ HRM Heart Rate Monitor", but again, that's not at all what was conveyed by your statement

    Anyway, for anyone else who's curious (although everyone in this thread already knows this):

    - Toybox.Ant is the lower-level way of directly connecting to ANT/ANT+ sensors (which are not connected via the device's built-in sensors menu)

    - Toybox.AntPlus is the high level way of communicating with ANT+ sensors that are managed by the built-in sensors menu on the device

  • I don't think there's a heartrate profile in AntPlus. At least I don't see such class in the CIQ docs (even though the overview of the AntPlus module confusingly talks about heart rate), that's why the only way to communicate with a HRM is via the Ant module. If I had any other ANT sensor then maybe I would be able to test if AntPlus functions in the simulator with SDK 8.1.1

  • Again, I'm not 100% sure what do you mean by that,

    I simply mean to connect an ANT+ sensor to the simulator using an ANT+ dongle - same as if you connect an ANT+ sensor to the real device. Sorry for beeing unprecise in my former posting!

    This has nothing to do with any code. It's simply a connection which allows you to evaluate the sensor data by using i.e. BikeRadarListener or simply bikeRadar = new AntPlus.BikeRadar(null);

    But for the connection of an ANT+ sensor to the simulator you need no code at all! It just should connect like a real device.
    And this works flawlessly with SDK 7.4.3 - see picture below:

    See also the entire procedure:  mcinner.at/.../ANTplusRadar.MOV

    But with SDK 8 they have changed the simulator's menu item from "Manage ANT+ Sensors" to "Manage Sensors" - which seems to include ANT+ and BLE sensors. But it does not work. One can get no connection from the sensor to the simulator!