Sharing an ANT channel with multiple datafields.

Former Member
Former Member
I have a specialized cycling logger and sensor array that is capable of producing a custom ANT (not ANT+) data stream with more than one channel in.

I have a working connect IQ based datafield project that when side loaded onto a VivoActive HR use's the ANT data stream to populate a single value of the data field.

I have read the API and it isn't clear how many ANT connection the hardware supports or if the ANT connection can be shared.
I would like to know if it is possible to reuse the ANT channel (maybe as a listen only) in a second data field to extract another piece of data?

If you can use only one ANT channel once in a data field is it possible to write sensor values anywhere that the data field can get to (something like a global data structure)....

Thank you in advance for any help.

Regards

Jamie Lowrie
  • Former Member
    Former Member over 9 years ago
    Results of Retest

    Thanks for the links , I have updated to V2.65 and retested.

    The behavior is the same , the second Data-Field to request the same ANT channel doesn't get the messages.

    Only work around I can see is restricting the data to one channel per ANT channel.

    Does kind of restrict the ability to support new ANT+ (or specialist ANT) by using this dev kit.

    Thankyou for you help .

    Jamie Lowrie
  • Former Member
    Former Member over 9 years ago
    Retested with 2.65 system software

    Hi , thanks for all you help.

    I have updated the system software and retested, the results are the same only the first data-field to request the channel gets the data.

    Regards

    Jamie Lowrie
  • Former Member
    Former Member over 9 years ago
    FWIW I ran a simple test. I could receive the same data in 2 separate datafields from the same source. I was transmitting from CIQ simulator, and receiving on FR630. There did appear to be about a 14 second delay that I haven't tried to understand atm.
    EDIT: Couldn't help myself, had to solve :) I think the delay was being caused by println call to log file. Removed the log file and delay gone.
  • Former Member
    Former Member over 9 years ago
    Now I am confused. (all too easy now i am getting older)

    Hi ,

    Thanks for testing that you can get it working, just a bit stumped why it doesn't work on my setup.

    Are you transmitting ANT to the Watch data-field from Garmin IQ simulator?

    Are the data-fields 2 seperate PRG files?

    If you were and it worked for you, and you are motivated enough by the eternal thanks of a stranger here the code I am using.



    Can you spot the obvious mistake?
  • Former Member
    Former Member over 9 years ago
    Hi ,

    Thanks for testing that you can get it working, just a bit stumped why it doesn't work on my setup.

    Are you transmitting ANT to the Watch data-field from Garmin IQ simulator?

    Are the data-fields 2 seperate PRG files?

    If you were and it worked for you, and you are motivated enough by the eternal thanks of a stranger here the code I am using.



    Can you spot the obvious mistake?
    How about we call it even. How so? Well I wasn't using 2 different DF, just the same one twice. Opps. But I did find a small error in your code.
    In onStart exception there is a call to Sys. Your must create a using clause like the to use System this way. "using Toybox.System as Sys;"
  • Former Member
    Former Member over 9 years ago
    Thanks for spotting the error

    Thanks for spotting the error (I really must learn to be more careful when using copy and paste )

    There really doesn't seem to be an obvious way to achieve this functionality.

    In Biker release the fit bit field stuff means that you probably will have to draw the text for all the channels in one dataview (same as the moxy sample) and create fitbit channels for all of them.

    This is a bit of a shame as many ANT sensors have many more than one value of data in the message and busy displays arnt popular with riders , as data fields cant get the ui.delegate events (swipe tap etc) i cant see a way to toggle through the data.

    Not sure where this leaves integrating new ANT sensors into CIQ without Garmin native support.

    Thank you for taking the time to help, I have learnt alot.

    Think I am going to make some generic display fields that receive label unit and Dp from the Ant stream and drive the switching from within the logger box as a first solution.

    Regards

    Jamie Lowrie
  • Thanks for the report. We'll take a look and fix the problem or document it as a limitation of the system.
  • Hello, I am reopening this old thread to ask, if something didn't change regarding this problem. I too are loading multiple values from one sensor via Ant.GenericChannel and want them to render via separate datafields. Is this still impossible? :confused: According to my test, only one datafield gets data from same channel ID, others remain without connectivity. Thanks
  • Would love to know if there has been an update to this.  I don't see anything about limitations in the documentation here
    https://developer.garmin.com/connect-iq/core-topics/ant-and-ant-plus/
    or
    https://developer.garmin.com/connect-iq/api-docs/Toybox/Ant/GenericChannel.html
    or anywhere else that I've looked.

    If I have two completely different data fields on a device targetting 3.1.x of the sdk or higher and each has a section of the code that looks like:

    var channelAssignment = new Ant.ChannelAssignment(
    Ant.CHANNEL_TYPE_RX_NOT_TX,
    Ant.NETWORK_PLUS);

    GenericChannel.initialize(self.method(:onMessage), channelAssignment);

    var deviceConfig = new Ant.DeviceConfig({
    // config info here
    });

    GenericChannel.setDeviceConfig(deviceConfig);

    Can they both pair to the same sensor or does only the first data field that pairs work?

    Thanks

  • Nothing has changed.  Only one connection at a time.  And if it's connected by the FW as a standard sensor, you can't connect at all from a data field.