Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT USB2 in linux

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hi to everybody.

Thanks for last answer.

I have a new problem.

I have a USB2 to make working in Linux (ubuntu 10.04 32 bits).
With USBANTDevBoard (CP2102 USB-serial driver) I have all working.

But with USB2 ANT is more funny that the other one.

I have read all the documentation that I found about make working USB2 ANT in Linux.
My application is written in C and used the /dev/ttyUSBX to communicate with ANT device.
My application is running with CP2102 device 100 %.

With ANT USB2 I create a /dev/ttyUSBX using this commands:
sudo modprobe usbserial vendor=0x0fcf product=0x1008

I Can communicate with USB2 with this answers :
[O] Output Message ->

Sy ln ID D1 Ck

A4 01 4A 00 EF

[O] Output Message ->

Sy ln ID D1 D2 Ck

A4 02 68 00 01 CF

Input Message ->

Sy ln ID D1 Ck

A4 01 AE 03 08

[O] Output Message ->

Sy ln ID D1 D2 D3 D4 D5 D6 D7 D8 D9 Ck

A4 09 46 00 B9 A5 21 FB BD 72 C3 45 64

Input Message ->

Sy ln ID D1 D2 D3 D4 Ck

A4 04 AE 00 01 4A 00 45

Input Message ->

Sy ln ID D1 Ck

A4 01 AE 03 08


The device answer with ID 0xAE !!!
[#define MESG_SERIAL_ERROR_ID ((UCHAR)0xAE)]

I try to found documentation about this error but I can't.
I need to set some different with USB2 ANT ?
I'm trying to fine where is the error.

Can somebody help me.

Thanks
Miquel Soler Mir      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The MESG_SERIAL_ERROR_ID is a response to a poorly formed serial message (no sync byte/invalid size/checksum mismatch) on an USB2 device (nRF24AP2-USB or ANTUSB2). The messages you are sending seem formatted correctly, so it would seem that serial communication is not working correctly.

The data portion of this message can be used to debug what was wrong with the USB packet, and could be useful while you are developing your Linux drivers.

The first byte of the data payload is the error number
0 - the first byte of the USB data packet was not the ANT serial message Tx synce byte (0xA4)
2 - the checksum of the ANT message was incorrect
3 - the size of the ANT message was too big

Unfortunately, we are not very familiar with Linux development and are unable to support this development. However, some of our users have been successful working with ANT on Linux. The following posts from our forum might be helpful:

http://www.thisisant.com/component/option,com_fireboard/Itemid,146/func,view/catid,25/id,799/      
Rank

Total Posts: 3

Joined 2013-09-23

PM

HI Johnny Ringo,
I want to communicate with USB2 (ubuntu12.04),and I create a /dev/ttyUSBX using this commands:
sudo modprobe usbserial vendor=0x0fcf product=0x1008

I opened ttyUSBX, set the speed, set the pairty, and then read the data by while-loop.But no data could be read.

Maybe I could do something to search the ANT+ devices and pair them, but what should I get that aim,please?With libusb?Or something esle?

I saw that you coud read data, please give me one help.
Thanks lot for your help~