LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /dev/ttyUSB0 is missing (https://www.linuxquestions.org/questions/linux-newbie-8/dev-ttyusb0-is-missing-760514/)

dalmat 10-08-2009 05:52 AM

/dev/ttyUSB0 is missing
 
I have bought an USB digital thermometer and want to use it in Ubuntu. Then I downloaded Temper-Tools.

I plugged in the device and dmesg gives

Code:

[138910.576074] usb 3-1: new low speed USB device using uhci_hcd and address 3
[138910.761282] usb 3-1: configuration #1 chosen from 1 choice
[138910.788996] input:  PCsensor Temper as /devices/pci0000:0/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input11
[138910.789169] generic-usb 0003:1130:660C.0003: input,hidraw0: USB HID v1.10 Keyboard [ PCsensor Temper] on usb-0000:00:1d.1-1/input0
[138910.814744] input:  PCsensor Temper as /devices/pci0000:0/0000:00:1d.1/usb3/3-1/3-1:1.1/input/input12
[138910.814918] generic-usb 0003:1130:660C.0004: input,hidraw1: USB HID v1.10 Device [ PCsensor Temper] on usb-0000:00:1d.1-1/input1

Then I compiled and executed temper-tools according to instructions.

Code:

temper-read-temp /dev/ttyUSB0
But there isn't any ttyUSB0. What should I do?

lutusp 10-08-2009 06:09 AM

Quote:

Originally Posted by dalmat (Post 3712098)
I have bought an USB digital thermometer and want to use it in Ubuntu. Then I downloaded Temper-Tools.

I plugged in the device and dmesg gives

Code:

[138910.576074] usb 3-1: new low speed USB device using uhci_hcd and address 3
[138910.761282] usb 3-1: configuration #1 chosen from 1 choice
[138910.788996] input:  PCsensor Temper as /devices/pci0000:0/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input11
[138910.789169] generic-usb 0003:1130:660C.0003: input,hidraw0: USB HID v1.10 Keyboard [ PCsensor Temper] on usb-0000:00:1d.1-1/input0
[138910.814744] input:  PCsensor Temper as /devices/pci0000:0/0000:00:1d.1/usb3/3-1/3-1:1.1/input/input12
[138910.814918] generic-usb 0003:1130:660C.0004: input,hidraw1: USB HID v1.10 Device [ PCsensor Temper] on usb-0000:00:1d.1-1/input1

Then I compiled and executed temper-tools according to instructions.

Code:

temper-read-temp /dev/ttyUSB0
But there isn't any ttyUSB0. What should I do?

First, why do you think the device should appear as /dev/ttyUSB0? Is this in the documentation for the thermometer? Check this:

1. Make sure that the device is a stand-in for a USB to serial adaptor.

2. Make sure that the device is a generic USB to serial adaptor, otherwise it may have a Windows-only driver.

3. Run this command:

Code:

# tail -f /var/log/messages
4. Now unplug and plug the device. Make sure the device connection leads to the creation of /dev/ttyUSB0 -- and your provided text shows that it doesn't.

I suspect that this is a Windows-only device and that it doesn't emulate a generic USB serial adaptor.

dalmat 10-08-2009 07:30 AM

Thank you for your response. The documentation states that it should be /dev/ttyUSB0. I've looked further into it, and it appears that it has a WinChipHead CH341 USB-to-serial converter. Although Linux has a kernel driver for the CH341, it doesn't yet implement the DTR/RTS/CTS signals used to emulate an I2C bus. Luckily someone wrote a patch.

Is there an easy way to apply this patch to the current kernel?

edit: ok, I have figured it out.

Code:

cat ch341.c | patch
Unfortunately I get these errors.

Code:

Hunk #1 FAILED at 1.
Hunk #2 FAILED at 23.
Hunk #3 FAILED at 66.
Hunk #4 FAILED at 107.
Hunk #5 FAILED at 136.
Hunk #6 FAILED at 159.
Hunk #7 FAILED at 210.
Hunk #8 FAILED at 222.
Hunk #9 FAILED at 246.
Hunk #10 FAILED at 262.
Hunk #11 FAILED at 302.
Hunk #12 FAILED at 316.
Hunk #13 FAILED at 339.
Hunk #14 FAILED at 542.

I guess the patch doesn't work at my kernel version.

lutusp 10-08-2009 02:58 PM

Quote:

Originally Posted by dalmat (Post 3712171)
Thank you for your response. The documentation states that it should be /dev/ttyUSB0. I've looked further into it, and it appears that it has a WinChipHead CH341 USB-to-serial converter. Although Linux has a kernel driver for the CH341, it doesn't yet implement the DTR/RTS/CTS signals used to emulate an I2C bus. Luckily someone wrote a patch.

Is there an easy way to apply this patch to the current kernel?

edit: ok, I have figured it out.

Code:

cat ch341.c | patch
Unfortunately I get these errors.

Code:

Hunk #1 FAILED at 1.
Hunk #2 FAILED at 23.
Hunk #3 FAILED at 66.
Hunk #4 FAILED at 107.
Hunk #5 FAILED at 136.
Hunk #6 FAILED at 159.
Hunk #7 FAILED at 210.
Hunk #8 FAILED at 222.
Hunk #9 FAILED at 246.
Hunk #10 FAILED at 262.
Hunk #11 FAILED at 302.
Hunk #12 FAILED at 316.
Hunk #13 FAILED at 339.
Hunk #14 FAILED at 542.

I guess the patch doesn't work at my kernel version.

How desperately do you want this to work? You can have any kernel you want, you know -- you don't have to follow the nattering mob into an uncertain future.

Find out which kernel the patch was meant for, and install it. You know, you can have more than one kernel installed at a time, and you can choose which kernel you want to use when you boot your system.

jeixav 12-03-2009 11:29 PM

Quote:

Originally Posted by dalmat (Post 3712098)
...
I plugged in the device and dmesg gives

Code:

[138910.576074] usb 3-1: new low speed USB device using uhci_hcd and address 3
[138910.761282] usb 3-1: configuration #1 chosen from 1 choice
[138910.788996] input:  PCsensor Temper as /devices/pci0000:0/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input11
[138910.789169] generic-usb 0003:1130:660C.0003: input,hidraw0: USB HID v1.10 Keyboard [ PCsensor Temper] on usb-0000:00:1d.1-1/input0
[138910.814744] input:  PCsensor Temper as /devices/pci0000:0/0000:00:1d.1/usb3/3-1/3-1:1.1/input/input12
[138910.814918] generic-usb 0003:1130:660C.0004: input,hidraw1: USB HID v1.10 Device [ PCsensor Temper] on usb-0000:00:1d.1-1/input1


Based on the USB vendor and product ID you've listed (i.e. 1130:660C), you have the HID version of the TEMPer. Software that should work with the HID TEMPer is available from Relavak Labs. Note that the HID TEMPerHUM shows up identically in system logs. Were you to have it, you should take a look what I've put on github.


All times are GMT -5. The time now is 05:27 AM.