Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Problems with Ant Code on Mac Mini 64 bit OSX10

Rank

Total Posts: 22

Joined 0

PM

Hello,

I have purchased a Mac Mini 64 bit OSX10.9 to develop an Ant application that receives data from a heart rate monitor and a bike power meter. It is a simple application bassed on the example code supplied by Ant, I have spent weeks trying to get it to work. The basic problem is, eveytime I run the program, it does something different. Sometimes it will reset the Ant stick and assign the network key and then do nothing. It may receive some data from the Ant simulator and then stop. It sometimes ignores the reset commands and fails to exit the program after pressing the 'q' key. However, it almost always responds correctly to a 'c' command to report the device capabilities and the 'u' command, to report the USB details.

I have installed Eclipse to try to run it under a different IDE, but Eclipse does not cope with Mac frameworks very well and has a linker error when compiling. I am back with Xcode again now. I have modified the Ant example code to open two channels to receive data, but I have found that the program now stops in random places, but not all the time. I have had it receiving data simultaneously on both channel, but only once... never to be repeated.

I really am at the end of my tether with the Mac. I have tried different Ant sticks, my next move is to buy another Mac (32 bit) this time to see if I can get anything to work. I hate to say it, but it was a lot easier to do exactly the same thing with dot net under Windows.

Has anyone got the Mac example code to work reliably on a 64 bit Mac Mini?      
Rank

Total Posts: 13

Joined 2014-08-02

PM

Hi,
I doubt that your development hardware has something to do with what you observe. Do you use any kind of code control system like git or subversion? If so, check in a release that is working and go back to the last release that you know to work, if it's not working anymore and make a clean rebuild.

Do not make any local copies of the source, use branches instead.

Check _every_ function result, that can indicate an error. Throw an exception, call exit or assert, but do not let any error escape undetected.

If you experience that your application is not working, pull the ANT stick out and in again. To me it looks like, that the ANT "library" isn't initializing the hardware correctly, once the library wasn't correctly finalized.

You can use Eclipse as an IDE, but you have to make sure, that the correct command line arguments are passed to the compiler and linker. Here is a gist with a cmake file that I wrote yesterday to build the ANT_LIB and some test programs using ANT_LIB, there you can see, which compiler / linker switches you might have missed. https://gist.github.com/TorstenRobitzki/0cd48223f8c56cbf3e4c

Cheers,
Torsten

     
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

For future reference, the current SDKs include XCode projects for an easier getting started experience.      

Signature

Dynastream Developer