Re: LIRC using with directly wiring the RPI3-1 (GPIO18) and (GPIO17) on RPI3-2.
Rajendra Panchal via LIRC-list <[email protected]> Tue, 31 Oct 2017 13:14:18 +0000 (UTC)
| Newsgroups | gmane.comp.hardware.lirc |
|---|---|
| Message-ID | <[email protected]> |
I made sure that I am using the latest lirc_rpi which is from media branch.
Switched the lirc_rpi.ko to the one built using
https://github.com/bengtmartensson/lirc_rpi/tree/media
I call it lirc_rpi.ko.noir.
cd /lib/modules/4.9.35-v7+/kernel/drivers/staging/media/lirc/
sudo service lirc stop
sudo modprobe -r lirc_rpi
sudo rm lirc_rpi.ko
sudo ln -s lirc_rpi.ko.noir lirc_rpi.ko
sudo service lirc start
pi@S-SquareCam:/lib/modules/4.9.35-v7+/kernel/drivers/staging/me
dia/lirc $ ls -ltra
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 16 Oct 31 06:00 lirc_rpi.ko -> lirc_rpi.ko.noir
drwxr-xr-x 2 root root 4096 Oct 31 06:00 .
Added "frequency 0" /etc/lirc/lircd.conf
name DOCKTALK
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9123 4487
one 620 1655
zero 620 517
ptrail 616
repeat 9122 2217
pre_data_bits 16
pre_data 0xFF
gap 108499
toggle_bit_mask 0x0
frequency 0
Restarted both RPIs:
sudo service lirc stop
sudo modprobe --verbose lirc_rpi gpio_out_pin=18 gpio_in_pin=17
sudo service lirc start
pi@S-SquareBase:~ $ dmesg | grep lir
[ 3.013380] lirc_dev: IR Remote Control driver registered, major 243
[ 3.027374] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.091745] lirc_rpi: auto-detected active high receiver on GPIO pin 18
[ 4.092058] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[ 4.092065] lirc_rpi: driver registered!
[ 5.402315] input: lircd as /devices/virtual/input/input1
[ 124.066311] input: lircd as /devices/virtual/input/input2
[ 141.773024] lirc_rpi: cleaned up module
[ 141.822748] lirc_dev: module unloaded
[ 290.565139] lirc_dev: IR Remote Control driver registered, major 243
[ 290.565353] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[ 291.623941] lirc_rpi: auto-detected active high receiver on GPIO pin 18
[ 291.624234] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[ 291.624241] lirc_rpi: driver registered!
[ 291.644062] input: lircd as /devices/virtual/input/input3
[ 401.087900] input: lircd as /devices/virtual/input/input4
pi@S-SquareBase:~ $
When I do an irsend of RPI3-1 I don't receive the command while running a python script irreceive.py on RPI3-2. With the IR HW connected to both the RPI3s, I used to receive using irreceive.py.
Do I need to invert or change the pin high/low?
Thank you all for your help.
raj
On Tuesday, October 31, 2017, 3:41:30 AM CDT, Bengt Martensson <[email protected]> wrote:
On 10/30/17 20:40, Rajendra Panchal wrote:
> 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
> <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjEh72E7pjXAhVp64MKHXmuAPMQFgg7MAA&url=http%3A%2F%2Flostindetails.com%2Fblog%2Fpost%2FCompiling-a-kernel-module-for-the-raspberry-pi-2&usg=AOvVaw0t4O4Sdr7HJxNL-sMytnmK>
>
> I successfully rebuilt the kernel with both the LIRC modules:
>
> https://github.com/bengtmartensson/lirc_rpi
>
> https://github.com/Al-/lirc_rpi_hardpwm
You need no modulation, not hardware PWM modulation. That driver solves
a problem that is not relevant for you. It appears not to "frequency 0"
capable. If you want to us that one, you have to ask its author for
support.
Setting softcarrier=0 MIGHT work as alternative to FREQUENCY 0 in
lircd.conf. Look in the system log for messages.
You are using the latest (upstream) Lirc?
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