Author Topic: [SOLVED] USB UIRT not sending commands  (Read 8875 times)

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
[SOLVED] USB UIRT not sending commands
« on: June 10, 2008, 02:57:10 pm »
Hi folks,

after reinstalling the whole system with the 0710 DVD for i386 I noticed, that my UIRT was receiving and learning the codes perfectly, but none of the codes were sent to the AV devices. This worked in 0704 perfectly.

When investigating the problem I noticed, that some other people had the same problem with the UIRT and the installed kernel 2.6.22. To make it short, the problem it within the ftdi_sio.c module, which is the (serial usb) driver for the UIRT. The problem didn't appear in 2.6.20 and is solved in 2.6.24, when comparing these two files and reading some more mailing lists and forums, I found a solution which works for LMCE 0710.

1.) Get the sources for your kernel

2.1) Edit /usr/src/[YOUR VERSION]/drivers/usb/serial/ftdi_sio.c

2.2) Find the function "ftdi_tiocmget". It should look like "ftdi_tiocmget(struct usb_serial_port *port, struct file *file)"

2.3) Within this function is a case-block, just after "case FT2232C:" add "case FT232RL:"

2.3) Save the file

3.) Rebuild the module by typing

Code: [Select]
cd /usr/src/[YOUR VERSION]/
sudo make drivers/usb/serial/ftdio_sio.ko

4.) Backup your existing ftdi_sio.ko module

Code: [Select]
cd /lib/modules/[YOUR VERSION]/kernel/drivers/usb/serial/
sudo cp ftdi_sio.ko ftdi_sio.ko.backup
sudo cp /usr/src/[YOUR VERSION]/drivers/usb/serial/ftdio_sio.ko ./

5.) Reboot your system

That's it, someone forgot a case statement and this caused all the headaches. Btw. simply changing the modules to an older version may work. However in my setup it didn't work, so I had to go the way described here.

Links:
https://bugs.launchpad.net/ubuntu/+source/linux-meta/+bug/177166
https://help.ubuntu.com/community/Lirc_USB-UIRT

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #1 on: June 10, 2008, 03:16:40 pm »
Great job!

Thanks for the helpful info and welcome.

-PeteK

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #2 on: June 10, 2008, 03:30:36 pm »
 :)
So to understand, this fixes the issue of the USB-UIRT not being able to transmit w/out IR Dongles? I know 64 bit will transmit with just the USB-UIRT itself, but since 704, you needed IR Dongles to transmit using the 32bit LMCE.

So is this the fix? If so, excellent!!!

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #3 on: June 10, 2008, 05:10:16 pm »
yes, this definetely works on my system (0710 386 dvd install)

The error occurs between the kernel versions greater then 2.6.20 and less then 2.6.24. LMCE is 2.6.22, the old kernel for 0704 didn't had the bug.

If you measure the output of the ir-sensor, you will notice, that it blinks, but it simply doesn't send any data. The IR-Learning was working,  because the UIRT registers two devices. The one mentioned above (FT232RL) is the transmitter and this one was lost in the LMCE kernel version.
« Last Edit: June 10, 2008, 05:14:24 pm by eNoodle »

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #4 on: June 12, 2008, 02:07:32 am »
Howdy eNoodle,

Most Excellent find!

I just searched mantis and didn't find a ticket for this issue.  Would you like the honor of filing a ticket?

Thank you,
Roy

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #5 on: June 12, 2008, 04:18:40 pm »
thank you all. ;)

@Roy

there is at least one ticket in mantis allready, which describes the symptoms.

ticket #4228
http://mantis.linuxmce.org/view.php?id=4228

ticket #4075
http://mantis.linuxmce.org/view.php?id=4075

I can't edit these tickets, so maybe one of the developer can change the status or close the tickets. I allready added this information to the uirt wiki page.


eNoodle

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #6 on: June 12, 2008, 07:15:31 pm »
I added a note to both of those tickets referencing this thread.

Thank you,
Roy

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #7 on: June 14, 2008, 03:07:40 pm »
Where do I get the kernel sources?
As you can see below, trying through apt didn't get me very far, and searching through apt-cache doesn't list that there are any kernel sources available.

Code: [Select]
linuxmce@dcerouter:/usr/src$ sudo apt-get install kernel-source 2.6.22
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package kernel-source is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package kernel-source has no installation candidate
linuxmce@dcerouter:/usr/src$
linuxmce@dcerouter:/usr/src$ apt-cache search kernel-source
wacom-tools - utilities for wacom tablets and other hid devices
xserver-xorg-input-wacom - X.Org X server -- wacom input driver
cpad-common - common files to support the Synaptics cPad driver kernel modules
cpad-kernel-source - source for the Synaptics cPad driver
oprofile - system-wide profiler for Linux systems
wacom-kernel-source - source for the wacom binary modules
nvidia-new-kernel-source - NVIDIA binary 'new' kernel module source
avm-fritz-kernel-source - AVM Fritz! binary kernel module source
fglrx-kernel-source - ATI binary kernel module source
nvidia-kernel-source - NVIDIA binary kernel module source
nvidia-legacy-kernel-source - NVIDIA binary 'legacy' kernel module source
linuxmce@dcerouter:/usr/src$


royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #8 on: June 14, 2008, 07:35:11 pm »
Where do I get the kernel sources?

I think these are the instructions you need:

  https://help.ubuntu.com/community/Kernel/Compile

I haven't tried it.  Looks way more complicated than compiling my gentoo kernel :)


HTH,
Roy

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #9 on: June 15, 2008, 12:27:02 am »
Ok i will check it out. For now I will hold off, I'm sure eNoodle probably has more detailed instructions and experience with this

linuxmjb

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #10 on: July 12, 2008, 04:02:41 pm »
I've been trying to get this fixed for a couple of weeks now.  it will learn, but it won't transmit.  I'm not a complete newbie, but no matter how i try to compile i always get an errors.  I end up running a make and it compile all the drivers, but still i get driver errors on startup and Linuxmce complains of a device issue.  At this point UIRT doesn't work at all.  Any suggestions?

Here is what I've done:

Code: [Select]
apt-get install linux-kernel-devel fakeroot build-essential
Code: [Select]
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-gutsy.git ubuntu-gutsy
Code: [Select]
cp -vi /boot/config-`uname -r` .config
Code: [Select]
apt-get install libncurses5 libncurses5-dev
Code: [Select]
make drivers/usb/serial/ftdio_sio.ko
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
make[1]: *** No rule to make target `drivers/usb/serial/ftdio_sio.o'.  Stop.
make: *** [drivers/usb/serial/ftdio_sio.ko] Error 2
Code: [Select]
make menuconfig
make
This is what I end up with:
Code: [Select]
-rw-r--r-- 1 root root  56188 2008-07-12 09:55 ftdi_sio.backup
-rw-r--r-- 1 root root 224606 2008-07-12 09:54 ftdi_sio.ko
« Last Edit: July 12, 2008, 04:06:09 pm by linuxmjb »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #11 on: July 13, 2008, 02:18:54 am »
I'm having similar problems. My USB IRT doesn't work... I have gotten the kernel sources using git, edited the file, but can't build the module for replacement. Variety of errors like:

linuxmce@dcerouter:/usr/src/ubuntu-gutsy$ sudo make drivers/usb/serial/ftdi_sio.ko
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/i386/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
/bin/sh: .tmp_versions/ftdi_sio.mod: No such file or directory
  MODPOST 0 modules

and others.... I have no idea what I'm doing, so can't really troubleshoot it! I had to follow a previous error's recommendation on make oldconfig as there apparently was no kernel .config file. I note from linuxmjb's comments that they seem to be copying a .config file from the system. Either way doesn't seem to have worked for me... really keen to get my IR working again.... can anybody help out please?? Perhaps we can just get the compiled version ... I'm running i386 ...

linuxmjb

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #12 on: July 13, 2008, 03:16:51 am »
I'm happy to report that this last run WORKED!!!!  Learning codes and testing works great.

I had to make the whole kernel, but copied to /lib and restarted and it works.  Good luck

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: [SOLVED] USB UIRT not sending commands
« Reply #13 on: July 21, 2008, 02:41:37 pm »
 :)

I have added this fix to the wiki @ http://wiki.linuxmce.org/index.php/USB-UIRT_x86_Fix

Thanks to you all for putting together all the pieces.

Regards,

Seth
« Last Edit: July 21, 2008, 04:06:07 pm by seth »
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth