ANT+ channel for PowerMeter CANNOT work with internal PowerMeter the same time?

Former Member
Former Member
Dear guys,

I have created a DataFields for Edge device (edge 1000 with v8.3 firmware).

Recently I have use Activity.info.currentPower to get instance power.

Also, I have create an Ant+ GenericChannel derived class to communicate with PowerMeter directly to get TorqueEfficiency/Balance/PedalSmoothness value.


I tried my DataFields on Simulator all fine. No problem, no issue, everything perfect.


But when I publish my application then download my DataFields from CIQ store, configure my power meter sensor ID, problem occurred:
1. If on Edge Device, disabled Power Meter, my data fields can connect to PowerMeter directly correctly also can get all values correctly (But of cause, the value will NOT be recorded into FIT file becuase NO power meter associated in System level);

2. But if enable PowerMeter on edge device (means in sensor list on edge system level, goto power meter, then enable it), restart edge device, System internal PowerMeter value can works fine, but my GenericChannel can NEVER works;

3. If based on status 1, then enable System Level power meter, system Level power meter can NEVER find and paired with my actual power meter. Only if restart Edge device to make System level power meter channel connect first (But in this situation, my GenericChannel will NOT work as status 2).


So I assume the Edge device does NOT support create 2 different ANT+ channel to connect to the same power meter? Any body can confirm that?




I guess the problem because, if publish my datafield to edge device, both of internal power meter connection and my customized GenericChannel connection will have the same client identification. So my physical power meter (garmin vector) will ignore the "second" connection. So only one connection can work at a time. But simulator with another client identification so no problem there.

If so, is there any way to identify my customized GenericChannel connection with customized client identification?




Additionally, I have attached part of my key codes:
function open()
{
// Get the channel
_channel = new Ant.ChannelAssignment(
Ant.CHANNEL_TYPE_RX_NOT_TX,
Ant.NETWORK_PLUS);

GenericChannel.initialize(method(:onMessage), _channel);

// Set the configuration
_device = new Ant.DeviceConfig( {
:deviceNumber => _device_number,
:deviceType => 0x0B,
:transmissionType => 0,
:messagePeriod => 8192,
:radioFrequency => 57, //Ant+ Frequency
:searchTimeoutLowPriority => 1, //Timeout in 2.5s * 3
:searchThreshold => 0} ); //Pair to all transmitting sensors
GenericChannel.setDeviceConfig(_device);
// Open the channel
GenericChannel.open();
}


Also, I have a function will check connection status every 3 seconds. If no value got in 3 seconds, I will close channel then reopen it again:
function close()
{
GenericChannel.close();
GenericChannel.release();
}

var reopening = false;
function reopen() {
if (!reopening) {
close();
open();
reopening = true;
}
}



Thanks,
Cheer
  • Former Member
    Former Member over 8 years ago
    Seems the hardware limitation.

    After communicate with my friend who also develop ANT+ hardwares, he announced that one device can only create one channel to the target meter.

    Which means, if internal pairing working, my customized channel CANNOT be created; Or my customized channel created, the internal pairing CANNOT works.



    So, the final solution is, Garmin CIQ team please bring in official support on Torque Effectiveness / Pedal Smoothness / Balance and Power Phase.

    I can provide my own source code for this area.
  • I will follow up on this to see whether there is a possibility of allowing two ANT+ channels to a single accessory.
  • Former Member
    Former Member over 8 years ago
    I will follow up on this to see whether there is a possibility of allowing two ANT+ channels to a single accessory.


    I think CANNOT. I believe that will be hardware and ANT+ protocol limitation.

    The way that can leverage the behavior we want is,

    Using Ant.GenericChannel, if input frequency / NetworkKey / DeviceType / DeviceNumber is the same with recent system level ANT device, in SDK, SDK directly using delegate to trigger onMessage(payload) to let Ant.GenericChannel get the data.

    For example, I want to create my own behavior to handle PowerMeter payloads.
    I create channel using Frequency: 57, DeviceType: 0x0B, DeviceNumber: myOwnPMID and set NetworkKey: 0 to auto detect.
    After searching DeviceType, will get the defined NetworkKey: B9 A5 21 FB BD 72 C3 45

    So, in SDK, if call "Toybox.Ant.DeviceConfig", SDK to check :deviceType and :deviceNumber.

    Then SDK talk with device internal ANT+ devices list, if contains same deviceType and deviceNumber, then SDK will NOT actually create connection, but only register "onMessage" delegate callback into device internal "onMessage" handler.

    So the actual behavior is, if input deviceType and deviceNumber existed in recent device internal ANT+ device list, will NOT create actual ANT+ channel. But when device can get payloads from the power meter, Toybox.Ant.GenericChannel callback "onMessage()" also will be invoked.

    Using this way can "simulatly" create 2 channel to the same power meter (Actual one channel between device and power meter, but 2 components [1 - device internal component, 2 - Toybox.Ant.GenericChannel]) will be handled.
  • Hi QQSTARS,

    I used your Graphic Cycling Dashboard (GCD) with PM on my weekend rides. I have an Edge 1000, a Vector2 and cycling dynamics enabled.

    First, I really like GCD very much and will probably constantly use it as first page on my default profile on E1K.
    All important values are on one page and the color coding makes it easy to identify values even when not directly looking at the Edge. Very well done!

    I noticed one strange effect - probably this is what you are talking about in this thread?: Using your GCD on page 1, some
    of my power related fields on other pages (I have all data pages enabled) are empty. Also, cycling dynamic page correctly displayed seated and standing time,
    but all other fields on this page were empty. However, some power related fields (like Normalized Power or Balance left/right)
    seem to be working correctly. When going into the sensor menü mid-ride, it displayed Vector cannot be connected - although it clearly is. I write mid-ride because
    everything seemed to work fine at the beginning. Also, after trying to connect Vector several times, in the end I had the cycling dynamics display on GCD, which was
    not there when I started the ride...

    The analysis of my rides in Garmin connect do not display any drop-outs in power or other pecularities - everything is fine so apparently all values were correctly written in the fit file.
  • Former Member
    Former Member over 8 years ago
    Hi QQSTARS,

    I used your Graphic Cycling Dashboard (GCD) with PM on my weekend rides. I have an Edge 1000, a Vector2 and cycling dynamics enabled.

    First, I really like GCD very much and will probably constantly use it as first page on my default profile on E1K.
    All important values are on one page and the color coding makes it easy to identify values even when not directly looking at the Edge. Very well done!

    I noticed one strange effect - probably this is what you are talking about in this thread?: Using your GCD on page 1, some
    of my power related fields on other pages (I have all data pages enabled) are empty. Also, cycling dynamic page correctly displayed seated and standing time,
    but all other fields on this page were empty. However, some power related fields (like Normalized Power or Balance left/right)
    seem to be working correctly. When going into the sensor menü mid-ride, it displayed Vector cannot be connected - although it clearly is. I write mid-ride because
    everything seemed to work fine at the beginning. Also, after trying to connect Vector several times, in the end I had the cycling dynamics display on GCD, which was
    not there when I started the ride...

    The analysis of my rides in Garmin connect do not display any drop-outs in power or other pecularities - everything is fine so apparently all values were correctly written in the fit file.


    Thanks for your feedback. As I described in description, Device internal PM pairing CANNOT works the same time with my own DataFields. So I always disable Device internal PM pairing when using my own DataFields.

    The topic here is why the limitation occurred. After my data fields created the channel to PM, device internal pairing will be teminated due to the ANT+ protocol. Like Seat/Standing or NP were calculated by device so you can see some "fake" value.