Hi,
I recently upgraded my ubuntu htpc, which is responsible of handling all my telldus businness.
For some reason it does not recognize my tellstick duo anymore.
'lsusb' lists it as it should.
I've tried both with: modprobe usbserial ; modprobe ftdi_sio and without.
No change, I never get a line in dmesg saying it assigned it to /dev/ttyUSB0 or something like that.
uname -a gives me
Linux HTPC 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:20:02 UTC 2013 i686 i686 i386 GNU/Linux
Also, if the telldusd daemon is started it keeps hogging the cpu at 150% and builds up more and more ram , aprox 1% per second...
root@HTPC:/var/log# telldusd --version
telldusd 2.1.1
I'm not sure where to start debugging this bad boy, any clues?
Kind regards
Tommy
Tellstick DUO not found after ubuntu upgrade
Moderator: Telldus
Re: Tellstick DUO not found after ubuntu upgrade
After a modprobe ftdi_sio and usbserial and unplug+plug in of the device I get the following in dmesg.
[ 355.411748] usbcore: registered new interface driver usbserial
[ 355.411815] USB Serial support registered for generic
[ 355.411915] usbcore: registered new interface driver usbserial_generic
[ 355.411923] usbserial: USB Serial Driver core
[ 355.422711] USB Serial support registered for FTDI USB Serial Device
[ 355.423053] usbcore: registered new interface driver ftdi_sio
[ 355.423062] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[ 383.081414] usb 2-6: USB disconnect, device number 22
[ 389.320098] usb 2-6: new full-speed USB device number 23 using ohci_hcd
Everyone else seems to be getting a line mentioning ttyUSB0, what could I be missing?
[ 355.411748] usbcore: registered new interface driver usbserial
[ 355.411815] USB Serial support registered for generic
[ 355.411915] usbcore: registered new interface driver usbserial_generic
[ 355.411923] usbserial: USB Serial Driver core
[ 355.422711] USB Serial support registered for FTDI USB Serial Device
[ 355.423053] usbcore: registered new interface driver ftdi_sio
[ 355.423062] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[ 383.081414] usb 2-6: USB disconnect, device number 22
[ 389.320098] usb 2-6: new full-speed USB device number 23 using ohci_hcd
Everyone else seems to be getting a line mentioning ttyUSB0, what could I be missing?
Re: Tellstick DUO not found after ubuntu upgrade
I did a
# strace telldusd --nodaemon
That explains why the cpu is hogging anyway..
# strace telldusd --nodaemon
Code: Select all
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f51058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
clone(child_stack=0xaa9ff424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xaa9ffba8, {entry_number:6, base_addr:0xaa9ffb40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xaa9ffba8) = 12422
close(-1) = -1 EBADF (Bad file descriptor)
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f51058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
clone(child_stack=0x73df7424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x73df7ba8, {entry_number:6, base_addr:0x73df7b40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x73df7ba8) = 12423
close(-1) = -1 EBADF (Bad file descriptor)
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f51058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
clone(child_stack=0x6bbfa424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x6bbfaba8, {entry_number:6, base_addr:0x6bbfab40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x6bbfaba8) = 12424
close(-1) = -1 EBADF (Bad file descriptor)
futex(0xb4b00010, FUTEX_WAIT_PRIVATE, 2, NULL) = 0
futex(0xb4b00010, FUTEX_WAIT_PRIVATE, 2, NULL) = 0
futex(0xb4b00010, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f51058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
clone(child_stack=0x5effe424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x5effeba8, {entry_number:6, base_addr:0x5effeb40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x5effeba8) = 12425
close(-1) = -1 EBADF (Bad file descriptor)
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f51058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
clone(child_stack=0x609fa424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x609faba8, {entry_number:6, base_addr:0x609fab40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x609faba8) = 12426
close(-1) = -1 EBADF (Bad file descriptor)
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f51058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8f511d8, FUTEX_WAKE_PRIVATE, 1) = 1
Re: Tellstick DUO not found after ubuntu upgrade
# lsusb show me
As you can see /dev/bus/usb/002/025 is the Tellstick DUO
And when I examine the strace it looks like telldusd is going through all the available usb-devices and finds it.
The only apparent error I see is:
ioctl(3, USBDEVFS_IOCTL or USBDEVFS_IOCTL32, 0xbfeb72f0) = -1 ENOTTY (Inappropriate ioctl for device)
I'm not sure if I'm missing something in the kernel or what the heck is going on here...
Code: Select all
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bc2:3000 Seagate RSS LLC
Bus 001 Device 003: ID 1058:1021 Western Digital Technologies, Inc. Elements 2TB
Bus 001 Device 004: ID 04e8:6014 Samsung Electronics Co., Ltd
Bus 001 Device 005: ID 1058:1021 Western Digital Technologies, Inc. Elements 2TB
Bus 002 Device 025: ID 1781:0c31 Multiple Vendors
And when I examine the strace it looks like telldusd is going through all the available usb-devices and finds it.
The only apparent error I see is:
ioctl(3, USBDEVFS_IOCTL or USBDEVFS_IOCTL32, 0xbfeb72f0) = -1 ENOTTY (Inappropriate ioctl for device)
I'm not sure if I'm missing something in the kernel or what the heck is going on here...
Code: Select all
openat(AT_FDCWD, "/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 4 entries */, 32768) = 64
close(3) = 0
openat(AT_FDCWD, "/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 4 entries */, 32768) = 64
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
openat(AT_FDCWD, "/dev/bus/usb/002", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 4 entries */, 32768) = 64
open("/dev/bus/usb/002/025", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\0\2\0\0\0\10\201\0271\f\0\6\1\2\3\1", 18) = 18
read(4, "\t\2 \0\1\1\0\200", 8) = 8
read(4, "-\t\4\0\0\2\377\377\377\2\7\5\201\2@\0\0\7\5\2\2@\0\0", 24) = 24
close(4) = 0
open("/dev/bus/usb/002/001", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\20\1\t\0\0@k\35\1\0\2\3\3\2\1\1", 18) = 18
read(4, "\t\2\31\0\1\1\0\340", 8) = 8
read(4, "\0\t\4\0\0\1\t\0\0\0\7\5\201\3\2\0\377", 17) = 17
close(4) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
open("/dev/bus/usb/002/025", O_RDWR) = 3
ioctl(3, USBDEVFS_IOCTL or USBDEVFS_IOCTL32, 0xbfeb72f0) = -1 ENOTTY (Inappropriate ioctl for device)
close(3) = 0
open("/dev/bus/usb/002/001", O_RDWR) = 3
ioctl(3, USBDEVFS_IOCTL or USBDEVFS_IOCTL32, 0xbfeb72f0) = 13
close(3) = 0
openat(AT_FDCWD, "/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 7 entries */, 32768) = 112
open("/dev/bus/usb/001/005", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\0\2\0\0\0@X\20!\20! \1\2\3\1", 18) = 18
read(4, "\t\2 \0\1\1\0\300", 8) = 8
read(4, "\1\t\4\0\0\2\10\6P\0\7\5\201\2\0\2\0\7\5\2\2\0\2\0", 24) = 24
close(4) = 0
open("/dev/bus/usb/001/004", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\0\2\0\0\0@\350\4\24`\0\0\1\v\3\1", 18) = 18
read(4, "\t\2 \0\1\1\4\300", 8) = 8
read(4, "\1\t\4\0\0\2\10\6P\6\7\5\201\2\0\2\0\7\5\2\2\0\2\0", 24) = 24
close(4) = 0
open("/dev/bus/usb/001/003", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\0\2\0\0\0@X\20!\20! \1\2\3\1", 18) = 18
read(4, "\t\2 \0\1\1\0\300", 8) = 8
read(4, "\1\t\4\0\0\2\10\6P\0\7\5\201\2\0\2\0\7\5\2\2\0\2\0", 24) = 24
close(4) = 0
open("/dev/bus/usb/001/002", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\0\2\0\0\0@\302\v\0000\0\0\1\2\3\1", 18) = 18
read(4, "\t\2 \0\1\1\5\300", 8) = 8
read(4, "\0\t\4\0\0\2\10\6P\4\7\5\1\2\0\2\0\7\5\201\2\0\2\0", 24) = 24
close(4) = 0
open("/dev/bus/usb/001/001", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbfeb5358) = 0
read(4, "\22\1\0\2\t\0\0@k\35\2\0\2\3\3\2\1\1", 18) = 18
read(4, "\t\2\31\0\1\1\0\340", 8) = 8
read(4, "\0\t\4\0\0\1\t\0\0\0\7\5\201\3\4\0\f", 17) = 17
close(4) = 0
getdents(3, /* 0 entries */, 32768) = 0
Re: Tellstick DUO not found after ubuntu upgrade
Ok, after digging around for awhile in the source code I found out that the CPU-hogging problem seems to be totally unrelated to the usb-device.
If the socket-file /tmp/TelldusClient was already created before starting telldusd all hell broke lose.
Which is quite strange, considering there is a unlink(name.sun_path); inside of ConnectionListener_unix.cpp
I added a simple check around it:
which gave me the output
It seems perhaps the original telldusd was running with another user/group set and after the upgrade something changed / broke.
Simply removing the file fixed the cpu usage, however, perhaps a check should be added in here to atleast stop the entire application in case of such a fatal error. Instead of bringing the computer down
And I still haven't gotten the device recognized yet
If the socket-file /tmp/TelldusClient was already created before starting telldusd all hell broke lose.
Which is quite strange, considering there is a unlink(name.sun_path); inside of ConnectionListener_unix.cpp
I added a simple check around it:
Code: Select all
if (unlink(name.sun_path) == -1)
printf("Could not unlink %s: %s\n", name.sun_path, strerror(errno));
Code: Select all
Could not unlink /tmp/TelldusClient: Operation not permitted
Simply removing the file fixed the cpu usage, however, perhaps a check should be added in here to atleast stop the entire application in case of such a fatal error. Instead of bringing the computer down
And I still haven't gotten the device recognized yet
Re: Tellstick DUO not found after ubuntu upgrade
Ok, scratch that!
It seems to be working now for some reason, let's just hope it still works after my yearly reboot
It seems to be working now for some reason, let's just hope it still works after my yearly reboot