USB TC-08 how to open multiple devices on Debian

Post your Linux discussions here
Post Reply
css
Newbie
Posts: 0
Joined: Wed Nov 05, 2014 1:03 pm

USB TC-08 how to open multiple devices on Debian

Post by css »

HI

I started from the example and manual for API using USB TC-08
and I cannot get 2 units to work together, only 1 of them works

I tried the example of using document API functions usbtc08pg.en r4
on page 12, "using multiple units" with function usb_tc08_open_unit()
but it doesn't enumerate 2 units, I get only 1

I tried opening an unit asynchronously using usb_tc08_open_unit_async()
LED on both units turns RED, so something (maybe firmware) comes on both of them

but I cannot find a way how to obtain multiple handles from tc08_open_unit_progress()
function. I get one handle, status is PROGRESS_COMPLETE

Can someone help me with example code on linux that enumerates handles
for multiple units?

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: USB TC-08 how to open multiple devices on Debian

Post by Martyn »

Are you calling OpenUnit, getting a handle, and then calling OpenUnit again, to get a second handle ?

Can you post your code so we can take a look.
Martyn
Technical Support Manager

feliks
Newbie
Posts: 0
Joined: Tue Feb 21, 2017 2:45 pm

Re: USB TC-08 how to open multiple devices on Debian

Post by feliks »

Hi,
I have the same issue. Here´s my code:

Code: Select all

   for  (i =0; (new_handle = usb_tc08_open_unit())>0;i++)
    {
        handle_array[i] = new_handle;
        usb_tc08_get_unit_info(new_handle, &unitInfo);
        printf("\nDriver: %s \nSerial: %s \nCal date: %s \n\n", unitInfo.DriverVersion, unitInfo.szSerial, unitInfo.szCalDate);
    }
With two devices connected, I get the same serial for each handle. One box gives a long green LED (some seconds) and the other one turns on green just for a very short moment (< 1 second).
Having just one device connected, I get the right serials.
My code is running on an Raspberry Pi 2.

Edit: It seems, that this issue concerns just the "usb_tc08_get_unit_info()" function. The temperature values delivered by the two devices are looking correct. Anyway, for operation with multiple devices this function is needed. Without knowing their serials, mapping is not possible.

Thank you for help!

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: USB TC-08 how to open multiple devices on Debian

Post by Martyn »

What is the status code returned by usb_tc08_get_unit_info() ?
Martyn
Technical Support Manager

Post Reply