System 8 sensor pairing for ANT

I started to get reports from users who participate in beta program and have already upgraded their device to system8 that my datafield stopped working. My datafield uses ANT with GenericChannel (see code below).

I wonder if anyone managed to do whatever changes we need to do in our apps? If yes, can you share the insights?

The only information I found regarding this is from the announcement: https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/system-8-beta-now-available :

Sensor Pairing

If your device application or data field communicates wirelessly with a sensor or peripheral using ANT, ANT plus, or Bluetooth Low Energy (BLE), then you will need to implement a pairing process. Connect IQ allows you to implement a Sensors.SensorDelegate that allows you to have your device pair as part of the device’s sensor paring UI flow. See the SensorDelegate 

In my datafield I specifically ask the users not to pair or at least disconnect their ANT HR band from the device's Sensors menu, and I connect to it from the datafield using Ant.GenericChannel:

Ant.GenericChannel.initialize(method(:onMessage), new Ant.ChannelAssignment(
    Ant.CHANNEL_TYPE_RX_NOT_TX, // Bidirectional Receive (Slave)
    Ant.NETWORK_PLUS)
);

var devCfg = new Ant.DeviceConfig( {
    :deviceNumber => 0,                    // Set to 0 to use wildcard search
    :deviceType => 0x78,                   // Heart Rate Sensors: 0x78 = 120
    :transmissionType => 0,                // Set to 0 to use wildcard search
    :messagePeriod => 32280,               // 4Hz: 8070, 2Hz: 16140, 1Hz: 32280
    :radioFrequency => 57,                 // ANT+ Frequency 2.457GHz
    :searchTimeoutLowPriority => 10,       // Timeout in 25s
    :searchThreshold => 0} );              // Pair to all transmitting sensors
GenericChannel.setDeviceConfig(devCfg);

GenericChannel.open();
  • Was your app written 5 years ago using SensorDelegate, that is available "since" API Level 5.1.0? Or is your real device still running system 7 (or earlier), for which this thread is irrelevant?

  • You can also throw together a simple test app to look into a problem.  I do that all the time, as if there is a bug, I can give Garmin the simple app when reporting a bug.

  • I have apps I wrote 10 years ago and others I wrote a few months back.  I rarely use ANT, but I use Ble daily!

    The app I was was talking about with the Preview Device uses Ble which changed in System 8.

  • It's not only about the app. I asked about system8 and sensor pairing, and hoped to get help. In the meantime I only got intentionally secretive, vague responses (not answers) from you, and I'm not even sure if you're doing it on purpose or you're just in the usual write-only more again. I'm wasting my time on "investigating" you, when all you had to do is either say: sorry, my answers don't apply to your question, because I don't own a system8 (beta) device (or would've been even better if you didn't write confusingly seemingly related, but unrelated things from the beginning) or to tell me if you had to add some code with Sensor.SensorDelegate (even if you won't disclose the secret code)

  • So when you have a system8 device and you try to run your DF (compiled with SDK 7, without usage of the new Sensor.SensorDelegate), then what do you see? Does the DF run? Does it work as intended? Does it crash? Does it not crash, but fail to do what it supposed to?

  • I was looking into setConfigurationStratigey for BLE, so not the same but very similar.  And with the sideload I changed a color for something so I could be sure it was being called.  Easier than a log file....

    Where is a simple example of what fails in your code?  All you've really said is "it doesn't work"

  • So when you have a system8 device and you try to run your DF (compiled with SDK 7, without usage of the new Sensor.SensorDelegate), then what do you see?

    If my Edge 1050 with CIQ version 5.1.0 is considered a System 8 device, my data field works with SDK 7 compiled and connected via Ant.GenericChannel - without additional code. Just tested on my ebike.

  • Write only mode... It would save me (and you) 3 hours of spamming the forum if you'd just read that this thread is totally about ANT and not Bluetooth (I almost included bluetooth in the tags, but then I thought, it would just confuse people...)

    Had you read the 1st sentence of my original post, you would also know that: "I started to get reports from users who participate in beta program and have already upgraded their device to system8 that my datafield stopped working". This means that I didn't get any errors in ERA that look "suspicious", so I assume there's no crash, but can't be 100% sure. Getting these reports (via Contact Developer) made me think I could be able to fix it by implementing the sensor pairing (whatever it means, especially in case of a datafield, that specifically needs the ANT device not to be connected to the device from the Sensors & Accessories menu). I'm still trying to get my hands on a device with system8. And I hoped that other developers already managed to understand something other than the cryptic paragraph in the system8 announcement.

  • Stuff like this has always been the case.  Things in the store should break because of a new System level or just an SDK update.

  • Hmmmm, probably yes, but not sure...

    It looks like edge1050 has the latest public release version of 11.24, and I think that is the same CIQ version as the one in the simulator (5.0.0), so the only way you can see 5.1.0 is that you installed the beta, am I correct? (anything higher than 11.24, so any 12.x I guess, though unfortunatelly it's not in the changelog, so who knows... In other devices beta changelogs there are some HINTS, like: "Adds connection type information for paired sensors." or "Supports the latest Connect IQ apps". But I don't find any "official" post where system8 and CIQ 5.1.0 are mentioned together... )