Re: LIRC using with directly wiring the RPI3-1 (GPIO18) and (GPIO17) on RPI3-2.

Rajendra Panchal via LIRC-list <[email protected]> Mon, 30 Oct 2017 19:40:17 +0000 (UTC)
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
Hi All:
My goal is to replace the IR transmitter and IR receiver  with a wire between two RPI3.
Thanks to the detailed instructions in: Compiling a kernel module for the raspberry pi 2 - Lost in Details
I successfully rebuilt the kernel with both the LIRC modules:
https://github.com/bengtmartensson/lirc_rpi

https://github.com/Al-/lirc_rpi_hardpwm
Linux S-SquareBase 4.9.35-v7+ #1 SMP Wed Jul 5 13:20:51 UTC 2017 armv7l GNU/Linu
Installed both modules on two RPI3s:
ls -ltra /lib/modules/4.9.35-v7+/kernel/drivers/staging/media/lirc/
total 152
-rw-r--r-- 1 root root 23488 Jul  5 14:09 lirc_serial.ko
-rw-r--r-- 1 root root 20220 Jul  5 14:09 lirc_sasem.ko
-rw-r--r-- 1 root root 20696 Jul  5 14:09 lirc_imon.ko
drwxr-xr-x 3 root root  4096 Jul  5 14:09 ..
-rw-r--r-- 1 root root 22568 Oct 29 17:23 lirc_rpi.koOriginal
-rwxr----- 1 root root 25058 Oct 29 18:49 lirc_rpi.ko.hardpwm
-rwxr----- 1 root root 22593 Oct 29 18:51 lirc_rpi.ko.noir
lrwxrwxrwx 1 root root    19 Oct 30 13:57 lirc_rpi.ko -> lirc_rpi.ko.hardpwm
drwxr-xr-x 2 root root  4096 Oct 30 13:57 .
First, I tested the setup using IR transmitter on RPI3-1 (GPIO18) and IR receiver (GPIO17) on RPI3-2:I can successfully irsend and the receiving RPI3-2 recognizes the command. TV responds to the command as well.

sudo modprobe --verbose lirc_rpi gpio_out_pin=18 gpio_in_pin=17

Then I  bypassed the IR HW by directly wiring the RPI3-1 (GPIO18) --->RPI3-2 (GPIO17).
sudo service lirc stop;sudo modprobe --verbose lirc_rpi gpio_out_pin=18 gpio_in_pin=17 softcarrier=0;sudo service lirc start

the command sent using irsend is not recognized:irsend SEND_ONCE DOCKTALK PIP

I tried adding hardpwm=1 and/or invert=1.
I don't know if I am missing something here.
I greatly appreciate any guidance from the experts.
Regards,Raj

    On Thursday, October 26, 2017, 2:48:39 AM CDT, Bengt Martensson <[email protected]> wrote:  
 
 On 10/25/17 20:56, Rajendra Panchal wrote:
> Hi Bengt:

If posting questions to a mailing list like this, please address 
everyone, not just a single person. That is the nature of mailing lists.

> In order to upgrade the lirc_rpi driver do I need to go through the 
> cross-compiling and rebuilding the whole kernel?
> I started on cross-compiling route following 
> https://elinux.org/Raspberry_Pi_Kernel_Compilation Example 
> Checklist/Roadmap steps.

I am not a expert in this area. But there are guides on how to compile 
kernel drivers for the RPi (and Linux in general) on the internet. See 
https://github.com/bengtmartensson/lirc_rpi/issues/7 ... ;-\ Possibly 
someone can provide a link to something useful? Or even contribute a guide?

 > How do I upgrade it to the latest as yours?

Instructions on how to download and install "upstream" Lirc are found 
for example on http://lirc.org , and links contained therein.

Greetz,

Bengt

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot