Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

HeartRateSensorSimulator and error “CHANNEL_RADIO_TX_POWER_0x60”

Rank

Total Posts: 7

Joined 2013-01-17

PM

Hello,

I 'm testing with an USB2 and I have an error when I simulate a HR sensor.

The example works correctly when I use the display project (https://www.thisisant.com/resources/ant-an-using-the-simulant-library-for-simulating-ant-devices-in-c/)

I also work well with all kind of emulation sensor from simulant + 1.10

Buy when I try to test the sensor .NET proyect I have this output:

Attempting to connect to an ANT USB device...
Initialization was successful!
RESET Complete, reason: RESET_CMD
M - Print this menu
C - Request Capabilities
V - Request Version
I - Request Channel ID
U - Request USB Descriptor
Q - Quit
Resetting module...
RESET Complete, reason: RESET_CMD
Setting network key...
Network key set
Setting Channel ID...
Channel ID set
Unhandled response NO_EVENT_0x00 to message CHANNEL_RADIO_TX_POWER_0x60


I need some help, I have read the documentation, but I can not understand what is happening.

Thank you.      
Rank

Total Posts: 7

Joined 2013-01-17

PM

Really nobody can help me with this error.

I'm desperate :(

Any help is welcome.

Thank you.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

Have you configured all of the parameters as listed in the Heart Rate Device Profile? This includes the RF Channel, Network Key, Channel Period, and Device ID Parameters (Device Number, Device Type, Transmission Type).      
Rank

Total Posts: 7

Joined 2013-01-17

PM

I think so.

static readonly byte USER_ANT_CHANNEL 0;          // ANT Channel to use
static readonly ushort USER_DEVICENUM 1;         // Device number
static readonly byte USER_DEVICETYPE 120;         // Device type
static readonly byte USER_TRANSTYPE 1;            // Transmission type
static readonly byte USER_RADIOFREQ 57;           // RF Frequency + 2400 MHz
//#error  Insert the 8-byte ANT+ Network Key here!
static readonly byte[] USER_NETWORK_KEY ... };
static 
readonly byte USER_NETWORK_NUM 0;          // The network key is assigned to this network number 


Edited: To remove ANT+ network key      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Assuming your channel period is also 8070, what are you using as a receiver?      
Rank

Total Posts: 7

Joined 2013-01-17

PM

Link to "cs" code in my dropbox: https://www.dropbox.com/s/y02kmiufd0zbb9c/Program.cs?dl=0

It's the same of the above link With The Changes of the previous post.

I use a Garmin Edge 520 and Garmin Fenix 3. SimulANT+1.10. I have 2 usb of Garmin:l USB-m and USB2.

The above sample, the project "HeartRateDisplaySimulator.csproj" work well. It's "HeartRateSensorSimulator.csproj" that I can work.

Thank you.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

The HeartRateSensorSimulator project should work "out of the box", although the channel parameters are slightly different for it:

static readonly byte USER_ANT_CHANNEL 0;          // ANT Channel to use
static readonly ushort USER_DEVICENUM 42;         // Device number
static readonly byte USER_DEVICETYPE 120;         // Device type
static readonly byte USER_TRANSTYPE 1;            // Transmission type

static readonly byte USER_RADIOFREQ 57;           // RF Frequency + 2400 MHz
        
static readonly byte[] USER_NETWORK_KEY ... };
static 
readonly byte USER_NETWORK_NUM 0;          // The network key is assigned to this network number 


Looking at your example, you've kept these parameters, except you must use the ANT+ network key, you cannot use any other.      
Rank

Total Posts: 7

Joined 2013-01-17

PM

Both samples are "out the box" with the value of "USER_NETWORK_KEY".

Display is OK and Simulator is wong

https://www.dropbox.com/s/e96huhg1i2zfvwd/antplus_d.png?dl=0

https://www.dropbox.com/s/6wr7yhcy6hznd20/antplus_s.png?dl=0

     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

That output is correct, the HeartRateSensorSimulator example does not output the broadcast message to the command line, it is simply controlling the master channel.

This section is where it is initialized and enabled:
heartRateSensor = new HeartRateSensor(channel0networkAntPlus);
heartRateSensor.TurnOn(); 


And this section is where the heart rate value is set randomly for every message:
// This event indicates that a message has just been
// sent over the air. We take advantage of this event to set
// up the data for the next message period.
case ANT_ReferenceLibrary.ANTEventID.EVENT_TX_0x03:
{
    heartRateSensor
.HeartRate = (byte)rnd.Next(0256);
    break;
     
Rank

Total Posts: 7

Joined 2013-01-17

PM

Thank you,

I'm gonna try everything on a new machine.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Just to clarify, in the code you posted before, the network key was incorrect as well:

static readonly byte[] USER_NETWORK_KEY { 0xE80xE40x210x3B0x550x7A0x670xC1 }
     
Rank

Total Posts: 7

Joined 2013-01-17

PM

Thank you very much and apologize for the inconvenience.

In the new development machine the code is running ok.

My fault, sorry.