LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-08-2009, 06:52 AM   #1
dalmat
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Rep: Reputation: 0
/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?

Last edited by dalmat; 10-08-2009 at 06:59 AM.
 
Old 10-08-2009, 07:09 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by dalmat View Post
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.
 
Old 10-08-2009, 08:30 AM   #3
dalmat
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Original Poster
Rep: Reputation: 0
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.

Last edited by dalmat; 10-08-2009 at 10:31 AM.
 
Old 10-08-2009, 03:58 PM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by dalmat View Post
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.
 
Old 12-04-2009, 12:29 AM   #5
jeixav
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by dalmat View Post
...
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/ttyUSB0 permissions joegumbo Slackware 6 03-11-2013 06:23 PM
How do I read and write to /dev/ttyUSB0 in C? LinuxTexan Linux - Newbie 12 11-24-2010 04:03 AM
Importing data from /dev/ttyUSB0 RVDowning Mandriva 1 06-29-2006 09:06 PM
/dev/ttyUSB0 and permissions mrsolo Linux - Software 1 11-14-2004 04:24 PM
/dev/ttyUSB0 js72 Linux - Networking 1 01-05-2003 07:02 AM


All times are GMT -5. The time now is 04:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration