Page 1 of 8 123 ... LastLast
Results 1 to 10 of 71

Thread: Nuvoton infra-red remote and Ubuntu 10.10?

  1. #1
    Join Date
    Jul 2007
    Location
    West Kelowna, BC, Canada
    Beans
    63
    Distro
    Ubuntu 10.04 Lucid Lynx

    Nuvoton infra-red remote and Ubuntu 10.10?

    I have an ASRock ION330HT which comes with a Nuvoton infra-red remote.

    The web site has some questionable out-of-date .deb files and instructions for getting it to work on older versions of Ubuntu. Some of their deb files seem to be specific to certain linux kernels.

    http://www.asrock.com/nettop/downloa...0330HT&o=Linux

    Their published instructions and .deb files aren't working for me. I see lots of talk across multiple forums about how hard it is to get this working correctly.

    Has anyone gotten the Novoton nct6775/w836x7 working with Ubuntu 10.10?

  2. #2
    Join Date
    Oct 2010
    Beans
    26

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Hi Stephan. I just managed to get it working now (Asrock ION 330HT, Ubuntu 10.10 Maverick, standard remote). It requires building a custom kernel with Jarod Wilson's Nuvoton patch.

    I don't have time to write up a howto right now, but will post later today.


    Cheers
    supertedster

  3. #3
    Join Date
    Oct 2010
    Beans
    26

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Here's how I got the Nuvoton driver working in Maverick. I have confirmation from two users that the guide does indeed provide all necessary steps to get the Nuvoton device working with lirc. Consider it a dirty solution, though, as it's been twelve years since I last compiled a linux kernel Oh, and I used the kernel sources for 2.6.35-4, I'm not yet sure whether 2.6.35-22 will work (but chances are good it will).

    This guide assumes you have the rest of your system set up, including lirc (sudo apt-get install lirc).

    Step 1: Getting the kernel source
    Follow the steps for the alternate kernel build method (the Old-Fashioned Debian way) here. Stop before running make oldconfig.

    Step 2: Applying the Nuvoton driver patch
    Download Jarod Wilson's Nuvoton driver patch.

    Apply the patch by entering the kernel source directory and typing:

    Code:
    patch -p1 < ~/Downloads/IR-add-driver-for-Nuvoton-w836x7hg-integrated-CIR.patch
    The driver itself will be patched into the kernel source tree, but for the /drivers/media/IR/Makefile you will receive an error (HUNK 1 failed). This is because a line is missing from the Makefile in the Ubuntu kernel source (obj-$(CONFIG_IR_ENE) += ene_ir.o). Because of this we will apply this part of the patch manually. Open up the drivers/media/IR/Makefile in a text editor. Find the line that says

    Code:
    obj-$(CONFIG_IR_MCEUSB) += mceusb.o
    Directly under this line, add the following:

    Code:
    obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o
    Save the file.

    Step 3: Building the kernel
    In the kernel source directory, type
    Code:
    make menuconfig
    Under Device Drivers > Multimedia support, select Nuvoton w836x7hg Consumer Infrared Transceiver and press space so the line says <M>. This ensures the Nuvoton driver is built as a kernel module.

    Exit and save your configuration, then follow the rest of the Kernel/Compile guide from "Now you can compile the kernel and create the packages" onwards (you are skipping the two steps 'make oldconfig' and 'make localmodconfig', as these would modify the configuration you just made using 'make menuconfig'.). Compiling the kernel will take some time on the Asrock system, for me it took a couple of hours. When finished, install the kernel and headers and reboot.

    When the system boots up, open up a terminal and type
    Code:
    modprobe nuvoton-cir
    If there are no error messages, the Nuvoton driver has been built into the kernel and should be working properly. If not, type
    Code:
    uname -r
    It should say "2.6.35.4-some-string-here" or whatever you replaced for "some-string-here". If it doesn't, you're not running your custom kernel.

    Step 4: Adding config files for the Nuvoton device
    The Asrock driver packages for Ubuntu 10.4 don't work for Maverick out of the box, but by extracting the files from them we can get the remote working.

    Download the driver package from Asrock. Unzip it, and extract the appropriate .deb package (right click, Extract here -- do not install the package).

    Copy the files and folders from the extracted usr directory to /usr. Then open the /usr/share/lirc/lirc.hwdb file in a text editor. Find the section called [IrDA/CIR hardware] and add the following line (note that this line is not identical to the line in the Asrock patch file -- I modified it to reflect the new name of the Nuvoton driver, namely nuvoton-cir):

    Code:
    Nuvoton Transceivers/Remotes;nuvoton-cir;lirc_dev nuvoton-cir;hw_default;lirc_wb677/lircd.conf.wb677;
    Next, run
    Code:
    sudo dpkg-reconfigure lirc
    and choose Nuvoton Transceivers/Remotes for remote control, and None for transmitter.

    I then used
    Code:
    mythbuntu-lirc-generator
    to generate key mappings.

    Be aware of that if you update to a newer kernel (via the Update Manager, for example) whether the Nuvoton receiver works or not will depend on whether the Ubuntu kernel team have included the Nuvoton patch in the kernel. To go back to your custom kernel, you will have to change your grub (bootloader) settings.
    Last edited by supertedster; October 24th, 2010 at 05:31 PM.

  4. #4
    Join Date
    Jan 2010
    Beans
    1

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Hello,

    Thanks for the detailed instructions! Still, `irw` doesn't register any input, although `lsmod` shows that nuvoton-cir has been loaded successfully. Any ideas where I should look next?

  5. #5
    Join Date
    Oct 2010
    Beans
    26

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Glad to see you got the module compiled and running. I suppose the problem must be either 1) lirc not communicating with the nuvoton-cir device or 2) lirc not recognizing the remote.

    Try
    Code:
    ps auxw | grep lirc
    to see if lircd is running. My system is running these lirc processes:
    Code:
    nobody    4827  0.0  0.0   2044   260 ?        Ss   Oct14   0:04 /usr/sbin/inputlircd /dev/input/event0 /dev/input/event1 /dev/input/event2 /dev/input/event3 /dev/input/event4 /dev/input/event5 /dev/input/event6 /dev/input/event7
    root     16369  0.0  0.0   3512   588 ?        Ss   15:36   0:00 /usr/sbin/lircd --output=/var/run/lirc/lircd --device=/dev/lirc0
    If it isn't running, type
    Code:
    sudo /etc/init.d/lirc start
    Does it give any errors? If so, look at the last few lines in /var/log/syslog:
    Code:
    tail /var/log/syslog
    Then check the lirc config files in /etc/lirc. My hardware.conf:
    Code:
    # /etc/lirc/hardware.conf
    #
    #Chosen Remote Control
    REMOTE="Nuvoton Transceivers/Remotes"
    REMOTE_MODULES="lirc_dev nuvoton-cir"
    REMOTE_DRIVER=""
    REMOTE_DEVICE="/dev/lirc0"
    REMOTE_SOCKET=""
    REMOTE_LIRCD_CONF="lirc_wb677/lircd.conf.wb677"
    REMOTE_LIRCD_ARGS=""
    
    #Chosen IR Transmitter
    TRANSMITTER="None"
    TRANSMITTER_MODULES=""
    TRANSMITTER_DRIVER=""
    TRANSMITTER_DEVICE=""
    TRANSMITTER_SOCKET=""
    TRANSMITTER_LIRCD_CONF=""
    TRANSMITTER_LIRCD_ARGS=""
    
    #Enable lircd
    START_LIRCD="true"
    
    #Don't start lircmd even if there seems to be a good config file
    #START_LIRCMD="false"
    
    #Try to load appropriate kernel modules
    LOAD_MODULES="true"
    
    # Default configuration files for your hardware if any
    LIRCMD_CONF=""
    
    #Forcing noninteractive reconfiguration
    #If lirc is to be reconfigured by an external application
    #that doesn't have a debconf frontend available, the noninteractive
    #frontend can be invoked and set to parse REMOTE and TRANSMITTER
    #It will then populate all other variables without any user input
    #If you would like to configure lirc via standard methods, be sure
    #to leave this set to "false"
    FORCE_NONINTERACTIVE_RECONFIGURATION="false"
    START_LIRCMD=""
    
    # Remote settings required by gnome-lirc-properties
    REMOTE_MODEL="Linux\ Input\ Layer\ compatible\ Remote"
    REMOTE_VENDOR="Generic"
    
    # Receiver settings required by gnome-lirc-properties
    RECEIVER_MODEL="Nuvoton\ w836x7hg\ Infrared\ Remote\ Transceiver"
    RECEIVER_VENDOR="Linux\ Input\ Device"
    My lircd.conf contains only one line aside from the comments:
    Code:
    include "/usr/share/lirc/remotes/lirc_wb677/lircd.conf.wb677"
    the lircd.conf.wb677 file is exactly as provided by the Asrock driver package. Might be a good idea to double-check all paths and verify all the files are there.

    If this doesn't help, I would try checking if the irrecord program can get any data from your remote at all.
    Last edited by supertedster; October 16th, 2010 at 12:18 AM.

  6. #6
    Join Date
    Oct 2010
    Beans
    2

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Thank you very much for your step by step guide.

    As a new user it was quite a daunting task but i tried to keep up with each step. i seem to have gotten stuck at the point where I edit the lirc.hwdb file. is this file downloaded from the asrock site or did I miss an earlier step that should bring load this file into /usr/share/lirc somehow. I just can't find the file to edit it.
    When extracting the deb package it seems to give me /share/lirc/remotes/lirc_wb677/lircd.conf.wb677. Could you point me in the right direction?

    Btw the previous step (modprobe nuvoton-cir) gave me no error msg.

    Thank you

  7. #7
    Join Date
    Oct 2010
    Beans
    26

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    You're welcome pieterp. I hope we can get it to work in the end, and complete the guide so it works for everyone.
    Quote Originally Posted by pieterp View Post
    i seem to have gotten stuck at the point where I edit the lirc.hwdb file. is this file downloaded from the asrock site or did I miss an earlier step that should bring load this file into /usr/share/lirc somehow. I just can't find the file to edit it.
    Have you installed lirc?
    Code:
    sudo apt-get install lirc
    The lirc.hwdb file should come with the lirc package.

  8. #8
    Join Date
    Oct 2010
    Beans
    2

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    That's it!
    Just a quick test in xbmc seems to indicate that it does indeed work. So, thanks very much!

  9. #9
    Join Date
    Oct 2010
    Beans
    26

    Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Quote Originally Posted by pieterp View Post
    That's it!
    Just a quick test in xbmc seems to indicate that it does indeed work. So, thanks very much!
    Glad to hear it. That means the guide is more or less complete.

    I wonder what damnstraightrandom did differently -- I suspect it may have to do with the line added to lirc.hwdb. I edited the original post to emphasize that this line is different from the line in the Asrock patch file, in case he took it from the patch file rather than copy and paste from my post.

  10. #10
    Join Date
    Oct 2010
    Beans
    11

    Cool Re: Nuvoton infra-red remote and Ubuntu 10.10?

    Supertedster,

    Nice guide you have created. Understandable even for me who is beginner in Ubuntu. However I still have problems with getting the remote working.

    I have a fresh install of Ubuntu 10.10 64bit on my HT-330. Went through the steps as per you guide. Did the kernel compile and running on that. Finished with all the steps and so far I have not seen any errors. I might have missed something but no idea where the problem reside. I see only one error which is during boot up the system drops a message "IR keymap rc-rc6-mce not found". I would appretiate if you could help me to troubleshoot this stuff.

    One more thing. Since yesterday I am unable to boot up the Asrock with the remote. This was working before do not know why it stopped. I have replaced the batteries also but did not help. Weird...

    Here are some outputs:

    root@HTPC:~# uname -r
    2.6.35.4-some-string-here
    root@HTPC:~#
    root@HTPC:~# ps auxw | grep lirc
    root 1161 0.0 0.0 32124 532 ? Ss 14:00 0:00 /usr/sbin/lircd --output=/var/run/lirc/lircd --device=/dev/lirc0
    root 1857 0.0 0.0 11336 876 pts/0 S+ 14:19 0:00 grep --color=auto lirc
    root@HTPC:~#
    root@HTPC:~# tail /var/log/syslog
    Oct 17 14:00:06 HTPC kernel: [ 24.557395] EXT4-fs (sda5): re-mounted. Opts: commit=0
    Oct 17 14:00:07 HTPC init: plymouth-stop pre-start process (1529) terminated with status 1
    Oct 17 14:00:07 HTPC rtkit-daemon[1435]: Successfully made thread 1549 of process 1429 (n/a) owned by '1000' RT at priority 5.
    Oct 17 14:00:07 HTPC rtkit-daemon[1435]: Supervising 2 threads of 1 processes of 1 users.
    Oct 17 14:00:08 HTPC rtkit-daemon[1435]: Successfully made thread 1554 of process 1554 (n/a) owned by '1000' high priority at nice level -11.
    Oct 17 14:00:08 HTPC rtkit-daemon[1435]: Supervising 3 threads of 2 processes of 1 users.
    Oct 17 14:00:08 HTPC pulseaudio[1554]: pid.c: Daemon already running.
    Oct 17 14:00:11 HTPC kernel: [ 29.340014] eth0: no IPv6 routers present
    Oct 17 14:01:20 HTPC pulseaudio[1429]: ratelimit.c: 3 events suppressed
    Oct 17 14:17:01 HTPC CRON[1806]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

Page 1 of 8 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •