Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

About simulations

Rank

Total Posts: 5

Joined 2020-04-14

PM

Hi,
I have used SimulAnt+ without problems to test some conditions: launching the sensor script to receive data in a real display (Garmin Forerunner), wearing a real Heart Rate Monitor to receive data in SimulaAnt, and use 2 sticks to simulate both (sensor and display) in SimulaAnt.
Now I'm creating an app (taking as base the project 'AntSimulatorExample') and want to simulate sensor data to receive it in my app. I don't know how to launch a simulation to capture data in my program. I have tried to launch separately HeartRateSensorSimulator.exe and HeartRateDisplaySimulator and nothing happens.
How can I test my program with simulated data?
Thank you.      
RankRankRankRank

Total Posts: 283

Joined 2012-06-27

PM

The easiest way to simulate a heart rate sensor for testing is to run hr_SensorSweep.py in the "Heart Rate Sensor" SimulANT+ simulator type.

It sounds like you may have run this for the following "launching the sensor script to receive data in a real display (Garmin Forerunner)". If this doesn't work to test your app, please give specific details about what you require.      

Signature

Ian Haigh

Rank

Total Posts: 5

Joined 2020-04-14

PM

Well, I've made an app to receive data from a Heart Rate sensor and from Bike Speed/Cadence sensor. With Heart Rate is easy to test it, you just must wear it, and the program works fine. The problem is to test the Bike data , so I need a way to simulate it ¿how can I do it?
Thanks      
RankRankRankRank

Total Posts: 283

Joined 2012-06-27

PM

SimulANT+ has a bspdcad_SensorSweep script that you can run for Bike Speed/Cadence testing.      

Signature

Ian Haigh

Rank

Total Posts: 5

Joined 2020-04-14

PM

Yes, I know that, but how to proceed?
I insert an USB ANT+ stick, then run that script with SimulAnt+ (it's sending messages OK).
Then, what must I do? I launch my program and it says "ANTLibrary Exception: Failed to connect to any ANT devices". I insert another Stick , try again and the same happens. Which will be the correct procedure?
Thanks.      
RankRankRankRank

Total Posts: 283

Joined 2012-06-27

PM

If you see all the USB sticks you have connected in SimulANT+ on the left hand side as "Dev0", "Dev1", etc you will need to release one of them by right clicking on it and selecting "Release" before launching your application.

SimulANT+ will grab all available USB sticks each time it is launched, or the "Refresh" button at the top of the left hand side is pressed.      

Signature

Ian Haigh

Rank

Total Posts: 5

Joined 2020-04-14

PM

That's it!!!! That was the missing step.
Thank you, very much.      
Rank

Total Posts: 3

Joined 2021-07-07

PM

So, from the above, do I understand correctly that one needs to have 2 ANT usb dongles in order to test an app with "fake" (simulated) sensor data?

The app would then connect to, say, dongle 1. The SimulAnt tool needs to run in the background using the other dongle 2 to generate fake sensor data for the app to read.      
Rank

Total Posts: 3

Joined 2021-07-07

PM

Let me answer my own question with a "yes". I now own two dongles. One I use on a laptop to generate a heart rate sensor signal using the SimulANT+ tool. The other dongle is used on my desktop PC to develop an app that receives said signal. This works very nicely, I no longer need to code wearing my chest belt grin