cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1401
Views
0
Helpful
2
Replies

TEMPer USB Thermometer and IOX on CGR1120

luknagy
Level 1
Level 1

Hello

I am trying to measure the temperatue with TEMPer USB Thermometer, using 1 USB port on my CGR1120. This port is mapped to the GOS and device is correctly discovered with dmesg. As a next step, I have found that it can be used in Linux, using libusb 0.1 library and I also found a C code, ready for getting the temperature ( code from Relavak labs: http://www.relavak.com/downloads/temper-1.0.tgz ). So I have compiled the code with static linking, so I can bring the libusb within binary and moved the binary to GOS. However, I only recieve error messages after running the binary:

root@CGR1000-GOS-1:/software/temper-sw# ./temper

Found device: 1130:660c

Found deviceNum 0

Trying to detach kernel driver

Device already detached

Device already detached

TemperCreate: Broken pipe

I tried the same binary on another Linux machine, with same architecture i686 and it worked flawlessly. So I assumed it must be something platform specific, maybe something in Yocto or kernel?

I know the information is very vague, but I am completely new to low-level programming and I don't really know where to work on fix.

Thanks for any help or suggestions.

2 Replies 2

Steve Zhang
Cisco Employee
Cisco Employee

Hi Lukas,

As CGR1120 is running Yocto Linux on an X86 processor, generally speaking it should be working for the applications built from a general Linux with kernel of 3.8 or above.

Regarding your case, you'd better do some debug (usb_set_debug(x)), and add some print information in the source code to get the exact point of failure. Hope it helps.

Thanks,

Steve

Hi Steve,

I do some testing around this case. The Thermometer is correctly detected by kernel and I can see the configuration of the usb device. But when I sending something via usb_control_msg() (https://www.kernel.org/doc/htmldocs/usb/API-usb-control-msg.html) I still getting: connection timeout. When the timeout is set to 0 the program never ends. I am not sure if this issue is kernel or hardware or what can I do next.

Thanks for any help or suggestions.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: