Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT USB-Stick as COM-Port?

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hello,

I would like to use the ANT USB-Stick as a COM-Port to read the data in in Matlab. With the default drivers the USB-Stick is not a COM-Port. Is there a way I can define it as a COM-Port to read the data in Matlab and not use the ANTware II software?

Thanks!      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

The ANT-USB Stick is build with SILICON LAB'S CP210x product,which interface to a host using the USBExpress direct access driver.

If you would like to interface to hose using COM-port, you could choose CP210x USB to UART Virtual COM Port (VCP) driver.
We do not support the VCP driver, you may need to contact SiLab directly. The SiLab contact information : http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx      
Rank

Total Posts: 1

Joined 0

PM

I'm submitting this here since it is the only topic that pops up when I search for "MATLAB", so, if anyone is interested, I just used this device with MATLAB for a senior design project. I used the Nordic USB ANT Stick from sparkfun, with the FTDI COM port drivers which I found through a link on the sparkfun website, and used a serial object in MATLAB to connect with it.

Here is a link with the .m files I used. I made a separate function for each applicable ANT command. Hopefully this helps someone out.

I was communicating with the "Transceiver nRF24AP1 with Trace Antenna" also from SparkFun connected to an MSP430 experimenter board using asynchronous UART communication and it worked quite nicely.

The MATLAB code is linked below.
https://docs.google.com/open?id=0B_ftilQUm9aTS3poNDVUUjRNOVk

For the record, I am not in any way shape or form associated with ANT, Dynastream Innovations Inc.,FTDI, Sparkfun, or anyone else, this is just some code I wrote for a school project, and you should use at your own risk (although it's literally just a bunch of functions that use the fwrite command to send properly formatted ANT messages)

If you have any questions of comments go ahead and ask.      
Avatar
Rank

Total Posts: 21

Joined 0

PM

Monzterr,

I am interested in the work you have done with matlab and Ant. Could I get more detail on your work. I have downloaded the files you have shared, thank you! I will be attempting to make use of them.

Appreciative of your efforts,

Cy Drollinger      
Rank

Total Posts: 1

Joined 0

PM

H, anyone can help me to use ANT stick as Virtual COM Port?
I have tanita BC-1500 who works under my software with I choose BC-1000 scale ( ant+ capable too).
The problem is Bc-1000 does not provide segmental body composition so the software does not threat all data who comes from scale, they ignores segmental data. As the software believe is interact with BC-1000.
I had a genius IDEA, I can buy pro version of software in Europe ( better reports and risk analysis) and as they offer BC-418 support I can make software work with my scale over BC-418 setup.
Good idea no? Was to be, but in Europe they dont have WA-232 RS-232 adapter to BC-418 like use, so they don't implement it on the software. In US Tanita offer WA-232 RS-232 adapter to connect RS-232 scale, but only for US. Same company but different software , they offer almost all same scale, except one BC-1500, the exact model I ordered without know that particular problem.

If anyone can help to find how to simulate COM port or if anyone can help to convert Tanita widget for mac into standard application, I can manage to export the widget measurements to CSV and import then into the software. I developed software to read widget plist saved Mac, but I don't get ANT+ API compiled on mac. I tried to import Tanita free widget into dashcode, edit and recompile but it isn't.

Thanks for time.
Best regards.      
Rank

Total Posts: 4

Joined 2014-03-25

PM

Hello,

I was also hoping to interface with my HRM from Matlab. I have the ANT USB Stick 2, does it also use the SiLab CP210x? I tried installing both the SiLab and FTDI VCP drivers as mentioned in posts above, and neither show up under device manager or in the registry, though they are there under "uninstall programs". If it does use the CP210x, does the "normal" ANT+ driver need to be uninstalled for the VCP driver to work? I tried removing it but it always automatically come back... Not sure what to try next.

Thanks!
Marc      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

USB2 is not based on the CP210x, it is based on the nRF24AP-USB.
Drivers are libusb.
     
Rank

Total Posts: 4

Joined 2014-03-25

PM

Thanks alejandra,

I assumed it wasn't since the drivers wouldn't work. However, I don't see VCP drivers from nordic... In another post above (from over 2 years ago) someone said he used FTDI drivers. I'm confused as to how that would work since it's not an FTDI chip, but maybe I'll give it a try. Otherwise I don't have a serial port for Matlab to interface with with the "normal" ANT USB Stick 2 drivers.

The only other way (granted probably better) I can think of is to use C code and make mex files to interface with the "normal" drivers. Sounds like a lot more work though.

Any other tips appreciated.
Cheers      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The FTDI drivers won't work with the USB2 either.
The earlier post that mentions working with FTDI drivers describes using a "Nordic USB ANT Stick from sparkfun, with the FTDI COM port drivers". This is not the same as an USB2/nRF24AP2USB, it is different hardware.

USB1 and the USB Interface Board (to be used together with an ANT module) are the parts that are based on the CP210x.
     
Rank

Total Posts: 4

Joined 2014-03-25

PM

The Nordic USB ANT Stick from Sparkfun uses the Nordic nRF24AP1 chip. Is there such a big difference between the version 1 and version 2 chips from Nordic? Are you saying that this nRF24AP1 chip is "based on the CP210x", which works with FTDI drivers, but not nRF24AP2? Very confused about all this since Nordic, SiLab and FTDI are different manufacturers...

But what I really wanted to know is whether or not there is a way to interface with the nRF24AP2 as a COM port from Matlab, or if using the C API (with mex files) is the only option.

Thanks again!      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

On the different hardware platforms:
The nRF24AP1 chip does not include a USB interface so that is why it is used in combination with another chip (eg. FTDI, Silabs) when part of a USB stick. I don't know the details about the Sparfun stick, but based on the description, it seems like a nRF24AP1 + FTDI chip. USB1 is based on nRF24AP1 + Silabs CP210x.

Note there is a difference between nRF24AP2 (standard UART interface, would need to be used in combination with another chip providing USB), and nRF24AP2-USB (built-in USB support thorugh libusb)

Now, regarding your specific question:
USB2 and other ANT USB sticks based on nRF24AP2-USB require writing code to interface with them.      
Rank

Total Posts: 4

Joined 2014-03-25

PM

Ah. Thanks now I understand. smile

Thanks for your help, I guess I'll start looking at the API and code examples then. Hopefully it's not too complicated and worth the effort for my small DIY project. If I get it to work, I'll probably post the code on the Matlab exchange.