Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT Linux SDK Beta Release

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Ok, one more update, we found that for some reason the sscanf() call to decode the deviceNumber can sometimes fail on the Pi. To avoid this you can:'

1. Change the demo code, swap sscanf() calls with atoi().

2. Pass the parameters on the command line, e.g. "sudo ./demo 0 0"

     

Signature

Dynastream Developer

RankRank

Total Posts: 43

Joined 2013-06-11

PM

ShaneG - 03 June 2016 01:46 PM
Ok, one more update, we found that for some reason the sscanf() call to decode the deviceNumber can sometimes fail on the Pi. To avoid this you can:'

1. Change the demo code, swap sscanf() calls with atoi().

2. Pass the parameters on the command line, e.g. "sudo ./demo 0 0"



Now it work! Thank you very very much ShaneG.      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Good to hear! Thanks for reporting your problems and good luck with your development!      

Signature

Dynastream Developer

RankRank

Total Posts: 43

Joined 2013-06-11

PM

ShaneG - 03 June 2016 02:27 PM
Good to hear! Thanks for reporting your problems and good luck with your development!


At least I can get realtime HR from HRM. This should be work well. Let me know if there something I can do to help. Thank you again.      

Image Attachments

WIN_20160604_03_58_46_Pro.jpg

Click thumbnail to see full-size image

Rank

Total Posts: 1

Joined 2015-07-28

PM

Hi. I am new to developing with Ant, so please excuse any stupid questions, such as this one.

Looking through, am I correct in saying the SDK currently supports FS, but not AntPlus?



### Context
I am looking to use the ANTUSB-m (product 0x1009) to communicate directly with a Premium Heartrate monitor, so believe I need implement the ANT+ protocol.      
RankRank

Total Posts: 43

Joined 2013-06-11

PM

marcky.sharky - 04 June 2016 05:21 AM
Hi. I am new to developing with Ant, so please excuse any stupid questions, such as this one.

Looking through, am I correct in saying the SDK currently supports FS, but not AntPlus?



### Context
I am looking to use the ANTUSB-m (product 0x1009) to communicate directly with a Premium Heartrate monitor, so believe I need implement the ANT+ protocol.


ANT+ profile was running on ANT protocol. I only have to modify the demo that come with SDK a little to connect to HRM and display a heart rate as in my previous comment. it can work perfectly with 0x1008 both Garmin and no name brand. it also work fine with 0x1009 from Garmin.      
Rank

Total Posts: 4

Joined 2014-02-06

PM

Started a couple of days ago with my first tests of the new Linux library (DEMO_LIB), nice work!

I also went into the 'segmentation fault' issue, also had to start the demo as "su".
Because I didn't find any known bugs for sscanf I tracked the problem more in detail and it seems that the expected variable size in the sscanf call was too small:
in sscanf(st, "%u", &ucDeviceNumber;_); ucDeviceNumber has the size short integer (1 byte) but
"%u" formats to an unsigned integer (2 bytes).

So sscanf(st, "%1hhu", &ucDeviceNumber;_); should solve this issue. At least it worked for me...      
Rank

Total Posts: 11

Joined 2014-07-05

PM

ShaneG - 02 June 2016 02:51 PM
Here are some instructions for how we got it working on a Raspberry Pi 2 running Raspbian, we will include them in the next release:

Step 1: Packages and commands to install for ANT_LIB...


Could you combine all the instructions and fixes in this thread to new release of SDK?      
Rank

Total Posts: 1

Joined 2017-02-11

PM

hello,
I also would really appreciate that a new release of the beta sdk for linux includes all lessons learned from this thread.
on my raspbian rpi3 + garmin 1009 usb stick + garmin hr sensor, all my tentatives to get live HR by using python or nodejs have miserably failed,
I was very reluctant to use low level langage like C but it seems that I do not really have the choice.
thanks in advance.      
Rank

Total Posts: 1

Joined 2017-02-25

PM

thanks for the SDK just starting to test it.

In case it helps someone else, I wanted to mention that on Lubuntu 16.04

Description: Ubuntu 16.04.2 LTS
Codename: xenial
83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I also had to use the instructions for the Raspberry Pi to build (only adjusting library paths):
https://www.thisisant.com/forum/viewthread/6490/#7280

without those it was failing on the udev build, something to do with gperf and "No keywords in input file!", which was looking difficult to fix. I'd rather use the system packages anyway.

Another note contrary to the docs I think the debug build gets created by default.

A suggestion for future releases if you could let us know what flavors & versions of linux it for sure should build on that'd be helpful, even if it's only one. At least that way if it's a project to get it working on ones favorite linux one can fire up a VM or something and work with it right away and figure out the other issues later.

cheers      
Rank

Total Posts: 5

Joined 2017-03-27

PM

Hi,

I am trying to build the ANT_LIB library and it is giving me the following error. Using Ubuntu LTS 16.04 and gperf version 3.0.4. I tried using an older gperf as well but it was unhappy with the --ignore-case option during compilation. I believe the hash generator has a parsing issue while reading the .gperf file.

End goal is to compile this on my linux machine to write a simple C/C++ application.

Thanks,
Vipin

** just saw the previous commentor's comment. Will use that link to see if I can get it to work. Thanks.      

Image Attachments

gperferror.png

Click thumbnail to see full-size image

Rank

Total Posts: 13

Joined 2015-03-24

PM

Hi, This is a question more to the dev's but I have an app I'm porting from windows desktop and am trying to get working on the raspberry pi. I'd gone down the Win/Iot path but pretty much hit a dead end as there really doesn't seem to be a way to get unmanaged to managed interop working on that platform at the moment and my app is straight c++. Anyway, I've built the libraries from ANT-SDK_Linux_3.8.200 on the pi and run the demo. Now I want to add in the functionality to the app I'm porting. Since my original app used the windows dll and it's api (via LoadLibrary/GetProcAddress calls) I'm just wondering what the correct approach would be for linux since the demo seems to use a static linked library and the api in "dsi_framer_ant.hpp". So two questions -

1) Is that the right approach, i.e. use the static library to create a DSIFramerANT object and use it's interface (like the demo)?

2) Or, for someone not too familiar with linux, how hard would it be to create a dynamic ".so" library from the code in the "ANT_DLL" library directory (or would that even work or make sense)?

Lastly, and as an aside I guess (just a general question to anyone out there), has anyone got the managed win/iot dll to work from an unmanaged c++ app on the pi running win/iot?

Thanks for any info...      
Rank

Total Posts: 1

Joined 2017-03-30

PM

I know this thread is super old but has there been any progress in releasing an updated version of the SDK based on whats now known about the Linux process, with Raspbian in particular (since thats where all the interest is IMO)? Or even, have you considered putting the current one on Github to allow for merge requests with updates/fixes?

I am doing a personal project for integrating ANT+ heart rate monitors and would like to be able to use this as a robust platform since it covers many features and so far the other work that's been published has all been very niche.      
Rank

Total Posts: 13

Joined 2015-03-24

PM

ctbaker - 29 March 2017 10:42 PM
Hi, This is a question more to the dev's but I have an app I'm porting from windows desktop and am trying to get working on the raspberry pi. I'd gone down the Win/Iot path but pretty much hit a dead end as there really doesn't seem to be a way to get unmanaged to managed interop working on that platform at the moment and my app is straight c++. Anyway, I've built the libraries from ANT-SDK_Linux_3.8.200 on the pi and run the demo. Now I want to add in the functionality to the app I'm porting. Since my original app used the windows dll and it's api (via LoadLibrary/GetProcAddress calls) I'm just wondering what the correct approach would be for linux since the demo seems to use a static linked library and the api in "dsi_framer_ant.hpp". So two questions -

1) Is that the right approach, i.e. use the static library to create a DSIFramerANT object and use it's interface (like the demo)?

2) Or, for someone not too familiar with linux, how hard would it be to create a dynamic ".so" library from the code in the "ANT_DLL" library directory (or would that even work or make sense)?

Lastly, and as an aside I guess (just a general question to anyone out there), has anyone got the managed win/iot dll to work from an unmanaged c++ app on the pi running win/iot?

Thanks for any info...


Figured I'd follow up on my own post for anyone else facing the same dilemma. Long story short it looks like it's possible to create the linux version of a dll without too much trouble. It seems to be working okay with the caveat that I'm using a relatively small subset of the lib's functionality (scan for device, create connection, receive broadcast packets). At any rate, in a nutshell I built the normal ANT_LIB.a but added -fPIC to the compiler options. Then using that lib used the code in ANT_DLL to build an ANT_DLL.so which can be dynamically loaded at runtime the same as on windows. For me that meant my fairly solid code from my windows app could be reused with very little changes (just the routines to load the lib and get the function pointers). I'm a definite linux neophyte though so if anyone sees an issue with this approach please let me know...      
Rank

Total Posts: 1

Joined 2018-04-11

PM

Is there any update on the Linux SDK Release?