Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

FIXED!!! - .NET vs DLL/LIB versions - was “Stuck in Search Mode?”

Rank

Total Posts: 3

Joined 2013-01-15

PM

I've got an embedded device that transmits messages at about 100 Hz, and I can see these messages using ANTware, so I know the hardware (embedded device and Windows 8.1 PC with ANT USB stick) are working correctly. Now I want to log that data on the Windows PC. I started with the ANT SDK 3.5, and decided to try modifying the DEMO_DLL project. I can build it successfully, and it can talk to the ANT stick. However, I am not getting anywhere near all the messages; here is partial output:

CAPABILITIES:
   
Max ANT Channels8
   Max ANT Networks
3
Standard Options
:
Advanced Options:
CAPABILITIES_NETWORK_ENABLED
CAPABILITIES_SERIAL_NUMBER_ENABLED
CAPABILITIES_PER_CHANNEL_TX_POWER_ENABLED
CAPABILITIES_LOW_PRIORITY_SEARCH_ENABLED
CAPABILITIES_SEARCH_LIST_ENABLED
Advanced 2 Options 1
:
CAPABILITIES_EXT_MESSAGE_ENABLED
CAPABILITIES_SCAN_MODE_ENABLED
CAPABILITIES_PROX_SEARCH_ENABLED
CAPABILITIES_EXT_ASSIGN_ENABLED
CAPABILITIES
:
   
Max ANT Channels8
   Max ANT Networks
3
Standard Options
:
Advanced Options:
CAPABILITIES_NETWORK_ENABLED
CAPABILITIES_SERIAL_NUMBER_ENABLED
CAPABILITIES_PER_CHANNEL_TX_POWER_ENABLED
CAPABILITIES_LOW_PRIORITY_SEARCH_ENABLED
CAPABILITIES_SEARCH_LIST_ENABLED
Advanced 2 Options 1
:
CAPABILITIES_EXT_MESSAGE_ENABLED
CAPABILITIES_SCAN_MODE_ENABLED
CAPABILITIES_PROX_SEARCH_ENABLED
CAPABILITIES_EXT_ASSIGN_ENABLED
Rx Fail
Go to Search
.
Rx:(0): [00],[12],[00],[00],[02],[00],[01],[00]
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Go to Search
.
Rx:(0): [00],[eb],[00],[00],[02],[00],[00],[00]
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Go to Search
.
Rx:(0): [00],[c4],[00],[00],[02],[00],[01],[00]
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail
Rx Fail 


Note that the ANT stick is the slave. The demo app is able to receive a valid packet, then it seems to fail on 7 packets, then the "Go to Search" message is sent. My theory is that it is scanning the eight possible channels, but I really only want it to listen on one. Questions:

1. Does that make sense? Is that what is happening?
2. How do I tell it to just listen to one channel? (The code appears to only open one channel!)

I couldn't find anything in the ant.h file that looks appropriate!

Thanks,
Bob
     
Rank

Total Posts: 3

Joined 2013-01-15

PM

I changed the topic for a reason: today I tried the DEMO_LIB version and got the same results as the DEMO_DLL version :(. But then I tried the DEMO_NET version, and it worked!!!

Problem is that I don't know C#/.NET (I'm more of an embedded systems guy), and my project doesn't have the budget for me to learn!

Has anyone else had the same/similar problem (i.e. works in .NET, but not DLL/LIB)? And of course, if so, how did you resolve it?

Thanks!      
Rank

Total Posts: 3

Joined 2013-01-15

PM

Found it! The .NET version set the channel period, while the LIb and DLL versions did not!!! Since I use a "non-standard" period, that was the problem!      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Glad to hear you were able to find the issue!