Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT+ library that works? Java/Python/NodeJS/C++?

Rank

Total Posts: 6

Joined 2016-03-01

PM

Hi,

I created a topic a few days ago about Java/Python.

Those python libraries are written for Python 2.7, I'm only familiar with 3.x.
I wasn't able to run 2.7 on my system.

The java code is missing a lot of dependancies or throws a lot of errors.

The last couple of days I've tried using some NodeJS libraries. (these detected the usb but I didn't see any data)

I've tried the C++ mac library but xcode tells me that this library is written for OS X 10.4 and that it will no longer run on OS X 10.11 (because the application has to be 64 bit).

I'm a bit stuck, I've tried all sorts of things with some other programmers but no one is able to make i work.

I've tried using a virtual box with Debian 8 as well.      
Avatar
RankRankRankRank

Total Posts: 744

Joined 2012-09-14

PM

The Mac library is expected to get updated with the next several weeks, but you can modify the code slightly to have it work:

https://www.thisisant.com/forum/viewthread/6328/
https://www.thisisant.com/forum/viewthread/6387/

     
Rank

Total Posts: 6

Joined 2016-03-01

PM

Thank you, I was able to modify my program after I created my topic.

I was able to run the demo, the demo tels me to enter a device number.

So I enter 1.
Then it asks me for slave/master.

I chose 0 for master.

Then messages come trough but the message is always something like tx(1) 00 00 00 00 00

For some reason I wont see any data.
I've tried it with my own network key.

What do I do wrong?      
Rank

Total Posts: 1

Joined 2016-03-03

PM

Hi,

I run into the same problem as LightPhoenix, with the same C++ library for Mac OS X.

The ANT+ USB stick is detected by the operating system (Mac OS X 10.11.3) and the C++ application in XCode.
The C++ application can be compiled and run without an error message. Everything seems ok, but the application don't show any sensor values. Only zeros.

Device number?
0
Initialization was successful
!

- Print this menu
Send Acknowledged message
Send Burst message
Reset
Request Capabilites
Request Version
Request Channel ID
Request Status
Request USB Descriptor
Toggle Display
Quit

Channel Type
? (Master 0Slave 1)
0
Resetting module
...
RESET CompletereasonRESET_POR
Setting network key
...
Network key set.
Assigning channel...
Channel assigned
Setting Channel ID
...
Channel ID set
Setting Radio Frequency
...
Radio Frequency set
Opening channel
...
Chanel opened
Enabling extended messages
...
Extended messages enabled
Tx
:(0):: [00],[00],[00],[00],[00],[00],[00],[00]
Tx
:(0):: [01],[00],[00],[00],[00],[00],[00],[00]
Tx
:(0):: [02],[00],[00],[00],[00],[00],[00],[00] 

Etc.

The U option give this values

USB Device Description
  VID
0xFCF
  PID
0x1009
  Product Description
ANT USB-m Stick
  Serial String
056 


I don't know what to do. Can someone help me?      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

You are opening the device as a master channel, so you are the transmitter in this case. In order to receive data you need to run a second instance on a slave channel to connect and receive data from the first.      

Signature

Dynastream Developer

Rank

Total Posts: 6

Joined 2016-03-01

PM

ShaneG - 14 March 2016 10:30 AM
You are opening the device as a master channel, so you are the transmitter in this case. In order to receive data you need to run a second instance on a slave channel to connect and receive data from the first.


Hi Shane,

I didn't know that, can you provide me with some sample code?

Thank you in advance      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

You have the sample code, that is the code you are running. Just run it twice and set one to master and one to slave. Refer to the ANT Message Protocol documentation to learn how ANT works: https://www.thisisant.com/resources/ant-message-protocol-and-usage/      

Signature

Dynastream Developer