masterxilef
Posts: 1
Joined: Wed Jul 20, 2016 3:20 pm

Re: LIRC GPIO driver for homebrew adapter

Wed Jul 20, 2016 3:25 pm

Nexet wrote:i have compiled this lirc , you could test it and let me know if everything is ok? thanks
Hi, would you mind compiling this for the Raspberry Pi 1, ARMv6?

I tried your version but doesn't work for me, I'm guessing because of the arch difference.

Thanks.

Akriss
Posts: 11
Joined: Wed Jul 23, 2014 8:33 am

Re: LIRC GPIO driver for homebrew adapter

Wed Jul 20, 2016 9:14 pm

mattmiller wrote:Can't help with you issue but normal LIRC works absolutely fine for 1 pair of IR Rx and Tx - not need for new version
Was multi transmitter option was recently added to the in tree Lirc GPIO driver? And I missed noticing it =/

If not are your loading and unloading the Lirc driver with new GPIO pins to achieve addressable multi transmitters?

Kris.

mattmiller
Posts: 2079
Joined: Thu Feb 05, 2015 11:25 pm

Re: LIRC GPIO driver for homebrew adapter

Thu Jul 21, 2016 6:57 am

Sorry - I was saying that people don't need recent for single pair of rx/tx - just if you need mutiple ones

Barf
Posts: 8
Joined: Tue Dec 06, 2016 11:42 am

Re: LIRC GPIO driver for homebrew adapter

Tue Dec 06, 2016 11:53 am

Hi,

I have finally registered in this forum. 8-)

I have just updated "my" lirc_rpi (multi sender support etc) to the current setup with devicetree support etc. It is found in source form on Github.

Greetz,

Bengt

Akriss
Posts: 11
Joined: Wed Jul 23, 2014 8:33 am

Re: LIRC GPIO driver for homebrew adapter

Tue Dec 06, 2016 9:58 pm

Wow a early holiday gift! Thanks!

Bengt. I've been using your earlier improved Rpi/Lirc driver for over a year, changing channels in my MythTV setup. With great success. many thanks.

Truly a early gift.
Thanks again and Happy holidays.
Kris.

Barf
Posts: 8
Joined: Tue Dec 06, 2016 11:42 am

Re: LIRC GPIO driver for homebrew adapter

Wed Jul 05, 2017 7:13 pm

In the light of this thread I have made some work.
  • The current version of "my" driver compiles and works with the current Raspian (with kernel 4.9.28-v7+).
  • In branch media of that repository, there is a version that is compativle with the media files, as described here.
    (I have not tested it myself; however, @justme123 has.)
lirc_rpi is probably a dead end, but that is another story.

Akriss
Posts: 11
Joined: Wed Jul 23, 2014 8:33 am

Re: LIRC GPIO driver for homebrew adapter

Wed Jul 05, 2017 8:32 pm

Still using your first version released in Dec. on Github. Just had to recompile a few days ago. I'm still using 4.9 kernel branch so all went well.
lirc_rpi is probably a dead end, but that is another story.
My heart skipped a beat reading that =/

As always, Many thanks the multi transmitter driver has worked very well for my AV setup.
Kris.

justme123
Posts: 25
Joined: Tue May 02, 2017 8:13 pm

Re: LIRC GPIO driver for homebrew adapter

Wed Jul 05, 2017 9:17 pm

@Akriss

That's because 4.9 still uses old media_tree code. I'm afraid that'll change in the upcoming kernel releases.
Check this out:
viewtopic.php?f=107&t=187222&sid=64509c ... bb7e078546
Quote:
"media_build is the absolute latest and greatest V4L2 and DVB development tree. That is what will be going in to kernel 4.12.
RPi is currently using 4.9 as that is the current latest that has been blessed with Long Term Support (LTS) status so should be maintained for several (2 IIRC) years. 4.14 is due to be the next to get that status.
media_build is therefore ahead of the Pi tree, and whilst they fix up all drivers that are in the mainline kernel whenever they make an API change, they can't do that for these random "out-of-tree" drivers that people have written. "

More info on media_tree:
https://www.linuxtv.org/
https://git.linuxtv.org//media_tree.git
unregistered user

last topic got vandalized & I got banned by an infantile mod

sorry, I have standards

Barf
Posts: 8
Joined: Tue Dec 06, 2016 11:42 am

Re: LIRC GPIO driver for homebrew adapter

Fri Jul 07, 2017 8:46 am

lirc_rpi has always been frowned upon by the "real" Linuxers, so this is not new.

gpio_ir_recv appears to be a viable alternative for receiving, but it lacks transmitting. But, it stills generates interrupts every few hundred micro seconds, which is not a really "clean" thing for a multitasking operating system...

I am not a kernel/driver person, but I think/hope that it should be possible to extend gpio_ir_recv for sending. As a second step, supporting hardware PWM would be nice,

juzkuz
Posts: 2
Joined: Sat Nov 11, 2017 10:48 pm

Re: LIRC GPIO driver for homebrew adapter

Tue Nov 21, 2017 5:12 pm

Any chance of someone using bengtmartensson's latest version and has a compiled version for 4.9.x? OR could point me towards step-by-step instructions on compiling it... I have his source from GitHub but he just states that it's the same as compiling any other LIRC module - and since most people who were doing this did it years ago, I can't find a definitive source for how to proceed. SO... either a compiled version for 4.9.x or instructions would be GREAT!

Thanks in advance!

tichy
Posts: 1
Joined: Mon Jan 15, 2018 4:15 am

Re: LIRC GPIO driver for homebrew adapter

Mon Jan 15, 2018 4:35 am

Apologies for reviving this topic, but I seem to have found a solution.

I've been going through all of the issues listed here, starting with mode2 utility having problems, throughout being unable to transmit etc.

I've blamed lirc_rpi as many people here do, but decided to take matters in my own hands eventually and started going through the code, adding debug logging to figure out what exactly is going on.

Long story short:
1. lirc_rpi is working fine. However, it only supports mode2 transmission type, so certain devices (like Roomba) will not work.
2. if you're seeing errors transmitting code, chances are your configs are just broken.

LIRC itself has some shortcomings and by itself is causing all the grief listed here. All the configs listed in this thread are perfectly fine, but the devil is, sadly, in your *.lircd.conf files.

If you're struggling with lirc, first start the service in diagnostic mode and see what happens.

Code: Select all

sudo service lircd stop
sudo lircd -n -D8 

A healthy log should look like this:

Code: Select all

lircd-0.9.4c[3279]: Trace: lircd:  Opening log, level: Trace
lircd-0.9.4c[3279]: Debug: No systemd fd
lircd-0.9.4c[3279]: Warning: Running as root
lircd-0.9.4c[3279]: Trace: started server socket
lircd-0.9.4c[3279]: Trace: parsing remote
lircd-0.9.4c[3279]: Info: Using remote: SomeRemoteName.
lircd-0.9.4c[3279]: Trace: lengths: 108010 108010 32863 96162
lircd-0.9.4c[3279]: Trace: parsing remote
lircd-0.9.4c[3279]: Info: Using remote: AnotherRemoteName.
lircd-0.9.4c[3279]: Trace: lengths: 108365 108365 36597 96528
lircd-0.9.4c[3279]: Trace: lengths: 108010 108010 32863 96162
lircd-0.9.4c[3279]: Trace: lengths: 108365 108365 36597 96528
lircd-0.9.4c[3279]: Trace: config file read
lircd-0.9.4c[3279]: Notice: lircd(default) ready, using /var/run/lirc/lircd
lircd-0.9.4c[3279]: Info: Cannot configure the rc device for /dev/lirc0
lircd-0.9.4c[3279]: Trace: driver supports both sending and receiving
A typical problems that I have seen were:

1. trace stuck at Info: Using remote: ... -- this means your remote has duplicate items. Unless you remove duplicates, your lirc won't start.

2. most of the errors people here complained about are an effect of:

Code: Select all

lircd-0.9.4c[6023]: Trace: first signal is a space!
lircd-0.9.4c[6023]: Trace: first signal is a space!
lircd-0.9.4c[6023]: Trace: first signal is a space!
lircd-0.9.4c[6023]: Trace: first signal is a space!
lircd-0.9.4c[6023]: Trace: first signal is a space!
lircd-0.9.4c[6023]: Trace: first signal is a space!
lircd-0.9.4c[6023]: Trace: first signal is a space!
I couldn't quite figure this at first, but then I got it: It is simply an inaccurately recorded remote. Myself I resolved this in few steps:

- I stopped using pins 22 and 23, and started using recommended pins 17 and 18 for LIRC
- I re-recorded the remote
- while re-recording, I read through the instructions printed on screen. What I realized at that point was that the instruction says clearly:
It is very important that you press many different buttons randomly
and hold them down for approximately one second. Each button should
generate at least one dot but never more than ten dots of output.

Don't stop pressing buttons until two lines of dots (2x80) have
been generated.
The first time I recorded my remotes, I had calibration done in 3 keypresses: each keypress generated about 20 dots in an instant.

Good luck to all of you!

Barf
Posts: 8
Joined: Tue Dec 06, 2016 11:42 am

Re: LIRC GPIO driver for homebrew adapter

Mon Jan 15, 2018 7:53 pm

1. lirc_rpi is working fine. However, it only supports mode2 transmission type, so certain devices (like Roomba) will not work.
I suspect this is a misunderstanding. A mode2 driver deals with "arbitrary" IR signals. The opposite is "lirccode" drivers.: Such a driver can in principle only transmit one protocol, and the way it does so is buried withing its code, and/or possibly in (in general proprietary) firmware in connected hardware (for example, a TV card). A "lirccode" remote can only work with a particular driver. The sentence "certain devices ... will not work" thus is strange.
LIRC itself has some shortcomings and by itself is causing all the grief listed here.
Lirc was written 20 years ago. IMHO, it is one of the most overrated OS programs... :shock:
1. trace stuck at Info: Using remote: ... -- this means your remote has duplicate items. Unless you remove duplicates, your lirc won't start.
I think this was fixed upstreams here.

Code: Select all

lircd-0.9.4c[6023]: Trace: first signal is a space!
For me, using upstreams Lirc, these messages go away if I delete devinput.lircd.conf --- IMHO it should not be installed at all.
I stopped using pins 22 and 23, and started using recommended pins 17 and 18 for LIRC
If pins 22 and 23 do not work, it is probably a failure of the dts setup.
I re-recorded the remote
- while re-recording, I read through the instructions printed on screen.
Long story short: irrecord sucks. Use IrScrutinizer instead to capture and generate the lircd.conf. (Select /dev/lirc as capturing device.)

Return to “HATs and other add-ons”