Getting the Asrock 330HT ir-receiver & remote to work with Ubuntu 11.04 (+XBMC)
#31
After reinstalling my ASRock with a minimal ubuntu system for XBMC I've encountered some problems dealing with lirc.

It seems that ubuntu defaults now with a lirc configuration where lircd is disabled (START_LIRCD is set to false at hardware.conf) -- at least if I choose to cancel dpkg-configure of lirc when installing. Maybe you should mention to check if lircd is enabled in your guide
Reply
#32
Ubuntu 11.10+12.04 working remote on Asrock ION 330 HT

First setup LIRC with a basic configuration
For a new install sudo apt-get install lircIf LIRC is already installed sudo dpkg-reconfigure lircRemote control configuration:
Windows Media Center Transceivers/Remotes (all)
IR transmitter, if present:
None

Change the default configuration to work with the Nuvoton remote
sudo vi /etc/lirc/hardware.conf

Change the following 3 lines
REMOTE="Windows Media Center Transceivers/Remotes (all)"
REMOTE_MODULES="lirc_dev mceusb"
REMOTE_DRIVER=""

into this

REMOTE="Nuvoton Transceivers/Remotes"
REMOTE_MODULES="lirc_dev nuvoton-cir"
REMOTE_DRIVER="default"

Restart LIRC to apply the changes
sudo service lirc restart

Reply
#33
(2011-05-16, 23:25)Novin Wrote: I have also given this a lot of trying but wasn't able to get it working good without LIRC. Had problem with some buttons not being mapped correctly and also repeat was horrible.

This is how I configured my system.
  • No special driver required, the in-kernel module nuvoton-cir is all you need
  • If installed, remove special ASRock provided files
  • Reboot if you had any ASrock provided files and check for loaded module
  • LIRC 0.8.7 which is provieded with Ubuntu Natty works fine
  • Remove customized XBMC Lircmap.xml, you don't need it
  • Wake on CIR / resume from suspend with remote
  • Editing system files requires sudo/root-access. One way of doing this is to start gedit with sudo-access

Verify that the kernel has loaded support for the IR receiver:

]
Code:
$ dmesg | grep -i nuvoton
[    7.668555] input: Nuvoton w836x7hg Infrared Remote Transceiver as /devices/virtual/rc/rc0/input4
[    7.668805] rc0: Nuvoton w836x7hg Infrared Remote Transceiver as /devices/virtual/rc/rc0
[    7.696340] nuvoton_cir: driver has been successfully loaded
[    7.698640] rc rc0: lirc_dev: driver ir-lirc-codec (nuvoton-cir) registered at minor = 0

Install lirc if you don't have it

Code:
$ sudo apt-get install lirc
Reading package lists... Done
Building dependency tree      
Reading state information... Done
lirc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

If needed, start gedit with sudo-access to edit system files. Press alt-f2 and type 'gksudo gedit'.

Edit /etc/lirc/hardware.conf to have this content for the section REMOTE*. You just need to change this bit, leave the rest of the config as-is.

Code:
#Chosen Remote Control
REMOTE="Nuvoton Transceivers/Remotes"
REMOTE_MODULES="lirc_dev nuvoton-cir"
REMOTE_DRIVER="default"
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="remotes/mceusb"
REMOTE_LIRCD_ARGS=""

Or just download my full hardware.conf which is available here:

http://paste.ubuntu.com/608663/

Edit /etc/lirc/lircd.conf to have this content

Code:
$ cat lircd.conf
include "/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"

Or again, just download my full config here:

http://paste.ubuntu.com/608666/

Restart LIRC

Code:
$ sudo /etc/init.d/lirc restart
* Stopping remote control daemon(s): LIRC                                                                                                                                                       [ OK ]
* Loading LIRC modules                                                                                                                                                                          [ OK ]
* Starting remote control daemon(s) : LIRC                                                                                                                                                      [ OK ]

Verify that the remote buttons work

Code:
$ irw
000000037ff07bdf 00 Left mceusb
000000037ff07bde 01 Right mceusb
000000037ff07be1 00 Up mceusb
000000037ff07bdd 00 OK mceusb
000000037ff07bdd 01 OK mceusb
000000037ff07be6 00 Stop mceusb

(Abort with ctrl-c)

Make sure you don't have any customized Lircmap.xml which disturbs your remote.

Code:
cd ~/.xbmc/userdata
mv Lircmap.xml Lircmap.xml.bak

To be able to resume from suspend by pressing the power button on the remote, add CIR to /proc/acpi/wakeup. Do this by adding the following to /etc/rc.local

Code:
echo CIR > /proc/acpi/wakeup

Then start XBMC and you should be able to use the remote!

RusNeuroMancer Wrote:Just 2cents for this great manual. By default in Ubuntu Natty LIRC package LIRC daemon is disabled. User should don't forget to enable it in /etc/lirc/hardware.conf:
Code:
#Enable lircd
START_LIRCD="true"

Thank you very much!!! Following your instructions and using your configuration files remote started working.

Operating system: Linux Mint Debian Edition 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux
Hardware: ASROCK ION 3D (Intel Atom D525 1,8 GH)


I just want to add that prior using your guide I have set Xorg to ignore the remote control to stop handling it as a keyboard. By adding the file / usr/share/X11/xorg.conf.d/11-evdev-quirks.conf with this content: http://pastebin.com/Nwje38mP
Reply
#34
(2011-05-16, 23:25)Novin Wrote: I have also given this a lot of trying but wasn't able to get it working good without LIRC. Had problem with some buttons not being mapped correctly and also repeat was horrible.

This is how I configured my system.

It's is pretty strange.

I followed your guide bit by bit but couldn't get it to work. I tired time after time with same result. Then I put my remote away and borught at micro bluetooth keyboard.

Today I was bored and picked up the remote again.

When I ran "# dmesg | grep -i nuvoton" I got this output:
Code:
[   11.056433] input: Nuvoton w836x7hg Infrared Remote Transceiver as /devices/pnp0/00:04/rc/rc0/input2
[   11.056689] rc0: Nuvoton w836x7hg Infrared Remote Transceiver as /devices/pnp0/00:04/rc/rc0
[   11.056883] nuvoton_cir: driver has been successfully laded
[   12.265278] input: MCE IR Keyboard/Mouse (nuvoton-cir) as /devices/virtual/input/input3
[   13.219824] rc rc0: lirc_dev: driver ir-lirc-codec (nuvoton-cir) registered at minor = 0

Furtheremore the red light at the top of the remote blinked when I pressed on some buttons but no reaction on my media centre. Also "# irw" didn't got me any output at all despirte pressing the buttons and the top red light blinking along.

Then I got this idea of pulling the batteries out and putting them back in again and now the remote fully works. Based on the remotes previous blinking action I don't see why this helped but I really feel like an idiot for not trying this sooner!

P.S. I'm on Mythbuntu 12.04 with Mythtv 0.27. I also apply this tweak: http://pastebin.com/Nwje38mP

UPDATE:

It might not be the batteries that was the problem. When rebooting my HTPC the remote will not work again.
"# irw" gives:
Code:
connect: Connection refused
But after restaring the lirc service "sudo service lirc restart" my remote works again.

This seems strange to me and I need to debug it. It might have something to do with runlevels. Will restart tomorrow.

Tried diffents things like changing the runlevel of lirc from 19 to 51 etc. without help and the thing that worked was to include service lirc restart in /etc/rc.local - I still consider this a hack and are tying to find a better solution.
Reply
#35
As for reference only Follow link on my signature which contains a short and sweet way to get Asrock IR receiver to work with Ubuntu +Lirc.
Reply
#36
(2013-09-28, 13:27)uNiversal Wrote: As for reference only Follow link on my signature which contains a short and sweet way to get Asrock IR receiver to work with Ubuntu +Lirc.

Well. Even if I follow your guide I still have to put "service lirc restart" in /etc/rc.local to make the remote work at startup.

Output of "grep -i lirc /var/log/syslog" before tweaking /etc/rc.local:
Code:
Sep 28 14:04:31 louis-nettop kernel: [   25.758931] lirc_dev: IR Remote Control driver registered, major 250
Sep 28 14:04:31 louis-nettop kernel: [   25.760232] rc rc0: lirc_dev: driver ir-lirc-codec (nuvoton-cir) registered at minor = 0
Sep 28 14:04:31 louis-nettop kernel: [   25.760244] IR LIRC bridge handler initialized
Sep 28 14:04:31 louis-nettop inputlircd: Could not open /devices/pnp0/00:04/rc/rc0/input2: No such file or directory
Sep 28 14:04:31 louis-nettop inputlircd: Started
Sep 28 14:04:31 louis-nettop kernel: [   86.792702] inputlircd[1247] trap stack segment ip:401b55 sp:7fff2821c2f0 error:0

Output of "grep -i lirc /var/log/syslog" after tweaking /etc/rc.local and a reboot:
Code:
Sep 28 14:11:23 louis-nettop kernel: [   25.517016] lirc_dev: IR Remote Control driver registered, major 250
Sep 28 14:11:23 louis-nettop kernel: [   25.523565] rc rc0: lirc_dev: driver ir-lirc-codec (nuvoton-cir) registered at minor = 0
Sep 28 14:11:23 louis-nettop kernel: [   25.523583] IR LIRC bridge handler initialized
Sep 28 14:11:24 louis-nettop inputlircd: Could not open /devices/pnp0/00:04/rc/rc0/input2: No such file or directory
Sep 28 14:11:24 louis-nettop inputlircd: Started
Sep 28 14:11:24 louis-nettop kernel: [   88.063426] inputlircd[1242] trap stack segment ip:401b55 sp:7fff752580e0 error:0
Sep 28 14:11:29 louis-nettop lircd-0.9.0[775]: caught signal
Sep 28 14:11:29 louis-nettop lircd-0.9.0[1909]: lircd(default) ready, using /var/run/lirc/lircd
Sep 28 14:11:35 louis-nettop lircd-0.9.0[1909]: accepted new client on /var/run/lirc/lircd
Reply
#37
I think the point is that it works, so if then works, job done, enjoy.
Reply

Logout Mark Read Team Forum Stats Members Help
Getting the Asrock 330HT ir-receiver & remote to work with Ubuntu 11.04 (+XBMC)1