Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Heart Rate Data in Unity

Rank

Total Posts: 1

Joined 2014-09-26

PM

This is probably more of a Unity issue, but I figured some clarification might help me solve it.

I'm trying to access data from a Garmin heart rate monitor in Unity via ANT USB stick. I can successfully receive data from it using a C# console application (a slight modification of the demo application), but I cannot connect to the USB stick when I use the application as a script in Unity. I believe this is a result of Unity not correctly referencing the dlls. I can successfully reference ANT_NET.dll, but the other 3 dlls are proving to be problematic (because they are unmanaged?).

If someone could explain the relationship between the dlls, that may prove useful. My current understanding is that I need to reference ANT_NET.dll, which needs to reference ANT_WrappedLib.dll. I also read that I may need DSI_CP210xManufacturing_3_1.dll and DSI_SiUSBXp_3_1.dll, but I'm not entirely sure what role they play or if they are even needed.

If anyone can offer suggestions for Unity or clarification about the dlls, it would be greatly appreciated. This is my first attempt at using ANT and I have deadlines approaching quickly.

Thanks      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

Yes, your code references ANT_NET.dll, which is a managed DLL (written in C#).
ANT_NET.dll in turn calls into ANT_WrappedLib.dll, and that one calls into the two "driver" DLLs CP210xManufacturing_3_1.dll and DSI_SiUSBXp_3_1.dll for the 2 generations of ANT USB sticks.

I once ran into issues by the way how ANT_NET.dll loads referenced DLLs: it expects them to be located in the directory where the currently executed application resides rather than using the normal Windows DLL search path.

Please see my last post in this thread: http://www.thisisant.com/forum/adopter-zone/viewthread/1584/ .

Maybe this can help you to find a solution.

OMB      
Rank

Total Posts: 4

Joined 2018-10-13

PM

Dear TylerDacus,

I have the same trouble with you.
https://www.thisisant.com/forum/viewthread/7149/

I successfully access my speed seneor in c# code, but when I run it as an Unity scripts, it failed.
Did you solve this problem ? how?