Hi CK! Unfortunately that guide seems to be for IR receivers attached to GPIO so I don't think its any use to me. I think I'll wait to see what you find from trying it out again on your device.
I'll update the sunxi-ir wiki once we have a complete and current set of instructions for enabling the onboard IR with the mainline kernel. On Sat, Jan 23, 2016 at 6:16 PM, Code Kipper <[email protected]> wrote: > On 23 January 2016 at 17:58, Dan MacDonald <[email protected]> wrote: > > Hi Code Kipper, Hans and sun-xi list > > > > I'm still struggling to get IR apps (irw/irexec and keybinder) to work > under > > 4.4 on my BPi. So far evtest is the only thing thats worked although > thats > > no use on its own. > > > > Code Kipper, you said you had followed this guide to setup IR: > > > > http://linux-sunxi.org/LIRC > > > > Those are actually insructions for the cubieboard2 but I'd imagine the > Bpi > > is similar enough for me to follow them almost exactly? I've tried doing > > that but all I ever get is: > > > > [dan@bandana ~]$ sudo irw /dev/lirc0 > > connect: Connection refused > > [dan@bandana ~]$ sudo irw /dev/input/event1 > > connect: Connection refused > > > > I have tried using both /dev/input/cb2ir and /dev/input/event1 for the > > device name/symlink in both/etc/udev/rules.d/10-cb2ir.rules and > > /etc/lirc/hardware.conf with the same results. > > > > I suspect there could be an error or two for 4.4 kernel users in that > guide > > as it seems to be written with 3.X users in mind. One thing that is > > definitely wrong is that to test it recommends you run: > > > > $ irw /dev/lircd > > > > But no such device exists. I do however have a /dev/lirc0. > > > > I am using the exact lircd.conf file that it links to in that guide but I > > suspect not having customised this could be part of my problem. It says > it > > was generated by devinput.sh but when I run that script it doesn't seem > to > > produce useful output - indeed it claims about a missing file. I have > pasted > > the output of this script below. > > > > If you could tell me where you deviated from that LIRC setup guide or how > > you generated your lircd.conf file codekipper that'd be much appreciated! > > Hi Dan, > I guess the Lirc setup guide has changed quite a bit since I had it > working on 3.4, this would of been back in 2013. > I'm not sure if this guide will help > http://wiki.openelec.tv/index.php?title=Guide_To_lirc_rpi_GPIO_Receiver. > I will try tomorrow to have another go, > good luck, > CK > > > > Thanks > > > > $ sh /usr/share/lirc/contrib/devinput.sh > > # generated by devinput.sh > > begin remote > > name devinput > > bits 16 > > eps 30 > > aeps 100 > > pre_data_bits 16 > > pre_data 0x0001 > > post_data_bits 32 > > post_data 0x00000001 > > gap 132799 > > toggle_bit 0 > > > > begin codes > > /usr/share/lirc/contrib/devinput.sh: line 21: input_map.inc: No such > file or > > directory > > end codes > > end remote > > > > # generated by devinput.sh (obsolete 32 bit version) > > begin remote > > name devinput > > bits 16 > > eps 30 > > aeps 100 > > pre_data_bits 16 > > pre_data 0x8001 > > gap 132799 > > toggle_bit 0 > > > > begin codes > > /usr/share/lirc/contrib/devinput.sh: line 43: input_map.inc: No such > file or > > directory > > end codes > > end remote > > > > > > > > > > > > On Sat, Jan 23, 2016 at 12:06 AM, Dan MacDonald <[email protected]> > wrote: > >> > >> Aha! irexec! I must've missed that somehow. I'll be trying that over the > >> weekend sometime. > >> . > >> > >> Thanks again Code Kipper! (great nick BTW!) > >> > >> On Fri, Jan 22, 2016 at 2:46 PM, Code Kipper <[email protected]> > wrote: > >>> > >>> On 22 January 2016 at 11:48, Dan MacDonald <[email protected]> wrote: > >>> > Hi Code kipper > >>> > > >>> > Are you saying I should be able configure lirc to trigger shell > >>> > commands > >>> > without any need for using the keybinding app? > >>> I'm pretty sure you can. I was looking here > >>> http://www.lirc.org/html/configuration-guide.html at > >>> http://www.lirc.org/html/irexec.html. When I had Lirc working before > >>> it was following the instructions here http://linux-sunxi.org/LIRC and > >>> from that I was able to navigate my XBMC build. Yesterday I was trying > >>> to get the power button on the remote to fire off an echo but I ran > >>> out of time. > >>> > > >>> > Could you give an example please? I've just had a look at the lirc > docs > >>> > but > >>> > I can't see how I might do what keybinding does with lircd / > >>> > lirc_options.conf alone. > >>> I'll have a search...there should be examples out there. > >>> CK > >>> > > >>> > On Fri, Jan 22, 2016 at 10:33 AM, Code Kipper <[email protected]> > >>> > wrote: > >>> >> > >>> >> On 21 January 2016 at 23:30, Dan MacDonald <[email protected]> > wrote: > >>> >> > Thanks for explaining that Code Kipper! > >>> >> > > >>> >> > With your help I have been able to get IR (mostly) working under > >>> >> > 4.4.0 > >>> >> > so I > >>> >> > have updated my 'Remote controlled BananaPi music alarm clock' > guide > >>> >> > here > >>> >> > with the details on how I bring up IR at boot under Arch: > >>> >> > > >>> >> > > >>> >> > > >>> >> > > http://forum.lemaker.org/forum.php?mod=viewthread&tid=14867&extra=page%3D1 > >>> >> > > >>> >> > The only IR issue for me now is keybinder doesn't work under 4.4.0 > >>> >> > for > >>> >> > me > >>> >> > and that program is central to the remote control music alarm > clock > >>> >> > function > >>> >> > of my BPi. Have you any idea why that might be? > >>> >> > > >>> >> > You say you edited /etc/librc/hardware.conf but I have no such > file > >>> >> > on > >>> >> > my > >>> >> > system and my remote is working with evtest without it so is that > >>> >> > step > >>> >> > really needed? > >>> >> I guess you need to mod lirc_options.conf, I'm using an old version > of > >>> >> debian for my sunxi rootfs(although arch for everything else), I did > >>> >> have a try at tying a key to an event but ran out of time. Evtest > >>> >> simply proves that your remote and hardware works. > >>> >> CK > >>> >> > > >>> >> > Thanks again for your help! > >>> >> > > >>> >> > On Thu, Jan 21, 2016 at 11:09 AM, Code Kipper < > [email protected]> > >>> >> > wrote: > >>> >> >> > >>> >> >> On 21 January 2016 at 00:43, Dan MacDonald <[email protected]> > >>> >> >> wrote: > >>> >> >> > Hi Hans > >>> >> >> > > >>> >> >> > Thanks for your reply but I've not got much further. > >>> >> >> > > >>> >> >> > I don't have a /sys/class/ir but I do have /sys/class/lirc so > >>> >> >> > maybe > >>> >> >> > thats > >>> >> >> > it? However, nowhere within there can I find a file containing > >>> >> >> > protocol > >>> >> >> > options: > >>> >> >> > > >>> >> >> > [root@bandana lirc]# cd /sys/class/lirc/ > >>> >> >> > [root@bandana lirc]# ls > >>> >> >> > lirc0 > >>> >> >> > [root@bandana lirc]# cd lirc0 > >>> >> >> > [root@bandana lirc0]# ls > >>> >> >> > dev device power subsystem uevent > >>> >> >> > [root@bandana lirc0]# cat dev > >>> >> >> > 241:0 > >>> >> >> > [root@bandana lirc0]# cat device > >>> >> >> > cat: device: Is a directory > >>> >> >> > [root@bandana lirc0]# cat power/ > >>> >> >> > cat: power/: Is a directory > >>> >> >> > [root@bandana lirc0]# cat subsystem > >>> >> >> > cat: subsystem: Is a directory > >>> >> >> > [root@bandana lirc0]# cat uevent > >>> >> >> > MAJOR=241 > >>> >> >> > MINOR=0 > >>> >> >> > DEVNAME=lirc0 > >>> >> >> > > >>> >> >> > What kernel are you running on your BPi? I presume you have > >>> >> >> > access to > >>> >> >> > one? > >>> >> >> > > >>> >> >> > Have you successfully used the IR on the BPi under 4.4? > >>> >> >> Hi Dan, > >>> >> >> like you I had this working on 3.4 and it was on my todo list to > >>> >> >> get > >>> >> >> working again for mainline. The hardware I'm testing with is the > >>> >> >> Itead > >>> >> >> Ibox and the Mele A2000 remote control. > >>> >> >> > >>> >> >> In the directory "/sys/class/lirc/lirc0/device" type "cat > >>> >> >> protocols" > >>> >> >> like Hans mentions and for me to get it working I "echo nec > > >>> >> >> protocols"; you'll then see the follow if you cat it again > >>> >> >> other unknown rc-5 [nec] rc-6 jvc sony rc-5-sz sanyo sharp > mce_kbd > >>> >> >> xmp > >>> >> >> [lirc] > >>> >> >> > >>> >> >> to test the remote I ran "evtest /dev/input/event1" > >>> >> >> and the detected codes correspond to what is shown here > >>> >> >> http://linux-sunxi.org/Lircd.conf > >>> >> >> > >>> >> >> I then edited /etc/librc/hardware.conf and added "devinput" as > the > >>> >> >> driver and device as "/dev/input/event1". My current issue is > that > >>> >> >> the > >>> >> >> protocols don't survive a reboot. I'll add the echo to my > rc.local. > >>> >> >> > >>> >> >> BR, > >>> >> >> CK > >>> >> >> > > >>> >> >> > Thanks for your help! > >>> >> >> > > >>> >> >> > On Wed, Jan 20, 2016 at 9:37 AM, Hans de Goede > >>> >> >> > <[email protected]> > >>> >> >> > wrote: > >>> >> >> >> > >>> >> >> >> Hi, > >>> >> >> >> > >>> >> >> >> On 20-01-16 10:23, Dan MacDonald wrote: > >>> >> >> >>> > >>> >> >> >>> Has anyone had any success using IR on the BPi under 4.4.0 or > >>> >> >> >>> another > >>> >> >> >>> recent kernel? I was trying last night without any luck. > >>> >> >> >>> > >>> >> >> >>> To get the kernel to recognise it, I first had to > >>> >> >> >>> > >>> >> >> >>> modprobe sunxi-cir > >>> >> >> >>> > >>> >> >> >>> After loading that, the kernel seems to create (at least) two > >>> >> >> >>> new > >>> >> >> >>> IR > >>> >> >> >>> input > >>> >> >> >>> devices, /dev/input/event1 and /dev/input/event2 IIRC (I'm > not > >>> >> >> >>> logged > >>> >> >> >>> into > >>> >> >> >>> my BPi right now to checkbut I think that's correct) - one is > >>> >> >> >>> just > >>> >> >> >>> labelled > >>> >> >> >>> sunxi-ir and the other was sunxi-ir mouse and keyboard or > >>> >> >> >>> something. I > >>> >> >> >>> got > >>> >> >> >>> IR working with on the BPi with my remote under the sunxi 3.x > >>> >> >> >>> kernel > >>> >> >> >>> but > >>> >> >> >>> there was only one IR input device then, /dev/input/event0. > >>> >> >> >>> > >>> >> >> >>> I've been testing /dev/input/event1 and /dev/input/event2 > using > >>> >> >> >>> the > >>> >> >> >>> keybinding app but I've yet to get any input. Has anyone had > >>> >> >> >>> more > >>> >> >> >>> luck? > >>> >> >> >>> Is > >>> >> >> >>> there a better way to test it than using keybinding? > >>> >> >> >> > >>> >> >> >> > >>> >> >> >> You need to first set a ir-protocol, from the top of my head > >>> >> >> >> go to /sys/class/ir/ir0 and then do "cat protocols" and then > >>> >> >> >> echo "one-of-them" > protocols. > >>> >> >> >> > >>> >> >> >> If you do not have the right protocol listed make sure to load > >>> >> >> >> the > >>> >> >> >> kernel > >>> >> >> >> module. > >>> >> >> >> > >>> >> >> >> Note as said this is all from the top of my head, so to path / > >>> >> >> >> filenames > >>> >> >> >> may be a bit different then what I'm typing here. > >>> >> >> >> > >>> >> >> >> Once you've set the right proto (typically nec, sometimes rc4) > >>> >> >> >> then > >>> >> >> >> you > >>> >> >> >> can test using e.g. evemu-record on the input node. AFAIK you > >>> >> >> >> should > >>> >> >> >> get only one input node related to the ir btw..., evemu-record > >>> >> >> >> will > >>> >> >> >> print the human friendly names of all nodes which should > explain > >>> >> >> >> which > >>> >> >> >> node is what. > >>> >> >> >> > >>> >> >> >> Regards, > >>> >> >> >> > >>> >> >> >> Hans > >>> >> >> > > >>> >> >> > > >>> >> >> > -- > >>> >> >> > You received this message because you are subscribed to the > >>> >> >> > Google > >>> >> >> > Groups > >>> >> >> > "linux-sunxi" group. > >>> >> >> > To unsubscribe from this group and stop receiving emails from > it, > >>> >> >> > send > >>> >> >> > an > >>> >> >> > email to [email protected]. > >>> >> >> > For more options, visit https://groups.google.com/d/optout. > >>> >> > > >>> >> > > >>> > > >>> > > >> > >> > > > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
