0

I have a USB thermometer that I used in Windows XP with the bundled drivers. It just reads the air temperature and the PC reads that value.

Now I want to use it under Linux, for example in a Raspberry Pi. I plugged it in and the only thing I have been able to figure out is to get the device information from syslog:

Jan 25 10:31:01 pi kernel: [  202.825771] usb 1-1.1.2: new full-speed USB device number 7 using dwc_otg
Jan 25 10:31:01 pi kernel: [  202.916413] usb 1-1.1.2: New USB device found, idVendor=413d, idProduct=2107
Jan 25 10:31:01 pi kernel: [  202.916443] usb 1-1.1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan 25 10:31:01 pi kernel: [  202.922898] input: HID 413d:2107 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:413D:2107.0004/input/input2
Jan 25 10:31:01 pi mtp-probe: checking bus 1, device 7: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2"
Jan 25 10:31:01 pi mtp-probe: bus: 1, device: 7 was not an MTP device
Jan 25 10:31:01 pi kernel: [  202.976409] hid-generic 0003:413D:2107.0004: input,hidraw1: USB HID v1.11 Keyboard [HID 413d:2107] on usb-3f980000.usb-1.1.2/input0
Jan 25 10:31:01 pi kernel: [  202.981627] hid-generic 0003:413D:2107.0005: hiddev96,hidraw2: USB HID v1.10 Device [HID 413d:2107] on usb-3f980000.usb-1.1.2/input1
Jan 25 10:31:01 pi mtp-probe: checking bus 1, device 7: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2"
Jan 25 10:31:01 pi mtp-probe: bus: 1, device: 7 was not an MTP device

As I don't have the skills to code a driver, I thought that using the files in that log I could read the data, like I usually do with files in /proc or /dev, but I don't understand those files and directories.

Is this possible? Does it help that Linux identifies the device as a HID device?

3
  • A driver and appropriate software is what is lacking. Commented Jan 25, 2023 at 11:03
  • 1
    Oh, github.com/shakemid/pcsensor-temper has something to start with btw. Commented Jan 25, 2023 at 11:06
  • Thanks, unfortunately it doesn't recognize the device Commented Jan 25, 2023 at 13:22

1 Answer 1

2

Have a look at the temperx/temperx.go project which supports your USB device 413d:2107.

temperx is a Munin plugin written in PHP using the hid-query binary provided by TEMPered.

temperx.go is a standalone tool written in Go that reports current temperature and humidity.

I'd probably try the Go tool first which seems to be easier to install.

  1. Install Go

  2. Instructions taken from the project site:

    $ go get github.com/mreymann/temperx
    $ go install github.com/mreymann/temperx
    

    Should produce the temperx binary in $GOPATH/bin/

    Example:

    $ /root/go/bin/temperx
    Temperature: 23.33, Humidity: 40.6
    
1
  • 1
    Thanks, I got the Go tool working now. pip install temper-py also worked fine Commented Jan 25, 2023 at 13:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.