Testing ANT through the simulator

Former Member
Former Member
Hi there,

I am working on an ANT+ implementation and am wondering if there is a way to test the application using a USB ANT+ module instead of running it on the watch? this would make diagnosis of runtime issues much easier.

Otherwise is there a way to side load the application and run it while it is hooked up the the computer? Or have it send back logs/console data via BT or other?

Difficult question I know but I hope if anyone else who has worked with the Generic ANT library might be able to shed some advice.

Thanks
  • Hi there,

    I am working on an ANT+ implementation and am wondering if there is a way to test the application using a USB ANT+ module instead of running it on the watch? this would make diagnosis of runtime issues much easier.

    Otherwise is there a way to side load the application and run it while it is hooked up the the computer? Or have it send back logs/console data via BT or other?

    Difficult question I know but I hope if anyone else who has worked with the Generic ANT library might be able to shed some advice.

    Thanks



    The only way I can see where you can test this is with a real device, and you side load the .prg to that, and use Sys.println() in your code to track things you want to see. There is no remote debugging on a real device, and I've never seen any Ant+ access in the simulator.
  • Former Member
    Former Member over 10 years ago
    Thanks Jim.

    So with side loading, are you implying that there is a way to log messages to the PC console using System.println while the app is side loaded? I'll have to look into that

    Thanks
  • Suggestion 1) Start with a simple app and learn the environment here. a "complex app" is not the way to begin, IMHO.

    When you sideload an app, and use println() it writes to a log file in the \garmin\apps\logs on the device called "<appname>.txt" (which you must have pre-created).

    That's all you got for debugging today. the watch can't even be connected to the PC while you are testing.. (well it actually can, but only if it's being charged and not set for "mass Storage"!)

    BTW, when you're talking about testing Ant+ stuff with the simulator, did you mean testing with standard stuff in sensors like a HRM? For that, you need to just run with something like "simulate FIT data" in the simulate pulldown in the simulator....
  • I am working on an ANT+ implementation and am wondering if there is a way to test the application using a USB ANT+ module instead of running it on the watch?

    I've done some work using ANT+ and a sensor on the simulator. Connect the ANT+ stick via USB, fire up the simulator and run your code.

    Travis
  • Former Member
    Former Member over 10 years ago
    Suggestion 1) Start with a simple app and learn the environment here. a "complex app" is not the way to begin, IMHO.

    When you sideload an app, and use println() it writes to a log file in the \garmin\apps\logs on the device called "<appname>.txt" (which you must have pre-created).

    That's all you got for debugging today. the watch can't even be connected to the PC while you are testing.. (well it actually can, but only if it's being charged and not set for "mass Storage"!)

    BTW, when you're talking about testing Ant+ stuff with the simulator, did you mean testing with standard stuff in sensors like a HRM? For that, you need to just run with something like "simulate FIT data" in the simulate pulldown in the simulator....


    Apologies for the delay... I'm not doing this as part of my day job. More of a hobby

    I am working on two apps. The larger app is almost "finished"... Well, ready to publish anyway.

    I have a vivoactive watch, it's great but Garmin did not implement the ANT+ bicycle power meter profile. So I am creating a module that uses the ANT.GenericChannel class to send/receive messages from a power meter. Sure, it will not be able to record anything but it will be nice if I can create an application that can show the power readings, even in creative ways (matches burning, colorised zones, etc) but just a number at first. The power meter I have also implements the left/right and smoothness profiles so I'd like to see how I could visualise them as well.

    I have basically everything I need in my custom class but have had trouble debugging it. Your advice helps; I still cannot get it to write any log messages though.
  • Former Member
    Former Member over 10 years ago
    I've done some work using ANT+ and a sensor on the simulator. Connect the ANT+ stick via USB, fire up the simulator and run your code.

    Travis


    Thanks Travis. I tried that but couldn't get it going. Are you using windows or mac? I am using mac, will see if I can get the dev environment running on a windows machine
  • Former Member
    Former Member over 10 years ago
    I still cannot get it to write any log messages though.


    When you side load your app if your .prg file is:
    /GARMIN/APPS/MyApp.prg

    Then create a log file like:
    /GARMIN/APPS/LOGS/MyApp.txt

    Any Toybox.System.println statments will be printed to that log file.
  • Former Member
    Former Member over 4 years ago in reply to jim_m_58

    Hi there

    I am trying to use MO2Display App on the simulator and i am wondering if i can use
    the NRF52840 Dongle for ANT+ instaed of the USB ANT Stick ?
    Why the option "manage ANT+ sensors" displays an empty window ?
    Best Regards

  • Not sure if there's ANT FW for the Nordic dongle - I've only used it for BLE.  And while I've not done much with ANT in the sim, I've used the regular Garmin ANT Stick