Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Phantom Device Number

Rank

Total Posts: 19

Joined 0

PM

Our firmware running on a Nordic NRF51 uses sd_ant_channel_id_get to get channel IDs and is intermittently receiving phantom device numbers. The application is connection to Heart Rate Straps and other data (i.e. the heart rate) that these channels are receiving appears to be valid (i.e. it is consistent with the physical activity of monitored athletes).

The phantom device numbers are definitely not from real heart rate devices as this problem has been seen in multiple locations with the same phantom numbers. The phantom numbers appear to be somehow related to actual device numbers. For example, when a HRM device with the number 7960 is transmitting, a phantom device with the number 19021 is seen. When transmitting with device numbers in the range 7960 to 7967 phantom device numbers in the 190xx are seen.

Any thoughts on what could be causing this?      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

What type of channel/mode are you using to receive messages? Continuous scan, background scan, slave channels?      
Rank

Total Posts: 19

Joined 0

PM

We are using Slave Channels.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

I've been unable to reproduce this error, could you also list which SoftDevice you are using? Are you opening multiple slave channels and finding they are pairing to these non existent device numbers and then timing out afterwards?      
Rank

Total Posts: 19

Joined 0

PM

We're using the S310 device (s310_nrf51422_3.0.0_softdevice.bin) with the V9.0.0 SDK and the NRF41422QFAC device. In our ANT+ event handler (SWI2_IRQHandler) we call "sd_ant_event_get" to get the message. Provided the message ID is one of interest (MESG_BROADCAST_DATA_ID or MESG_ACKNOWLEDGED_DATA_ID or MESG_BURST_DATA_ID) we then immediately call "sd_ant_channel_id_get" to get the device ID.

Is calling "sd_ant_channel_id_get" the correct way of getting the associated channel ID of an ANT+ message?

Note that we have also tried enabling the Device ID in the extended flag settings when calling "sd_ant_channel_assign". However, if we configure the extended flag to ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID the function returns 0x4033 (an invalid parameter).

Any suggestions?      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

I would advise upgrading to the final SDK release for the S310 SoftDevice, V10, if you are able to.

You should use the "sd_ant_lib_config_set" function, such as:

uint32_t err_code sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_RSSI ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID); 


The "ant_background_scanning" example project provides a good reference on how to parse extended messages:

if(p_ant_message->ANT_MESSAGE_stExtMesgBF.bANTDeviceID)
            
{
                m_last_device_id 
= (uint16_t)(p_ant_message->ANT_MESSAGE_aucExtData[0]
                                 
| ((uint16_t)p_ant_message->ANT_MESSAGE_aucExtData[1] << 8));
            
}

            
if(p_ant_message->ANT_MESSAGE_stExtMesgBF.bANTRssi)
            
{
                m_last_rssi 
p_ant_message->ANT_MESSAGE_aucExtData[5];
            
     
Rank

Total Posts: 19

Joined 0

PM

Hi,

Thanks for your help.

We've managed to solve the problem of phantom HR devices by getting the device IDs by enabling them through the "sd_ant_lib_config_set" function.

Any idea why our previous attempt of getting the device ID via the API call "sd_ant_channel_id_get" after receiving an ANT+ event resulted in said phantom HR devices?
     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

No problem, glad to help.

The application should check if the event is "EVENT_RX" before reading the message ID from the buffer. The buffer contents could be undefined in the case of other events.