Home

Awesome

gpio-reflect

LKM for sending and receiving infrared signals (and others).

With this module it is possible to record and send signals by using hardware at the GPIO pins. These signals are interpreted protocol-independent, so any signal can be used.

The module recognizes over 50% of errors when recording signals. This error recognition can be customized with additional options.

Only one key press on a remote control is necessary to record the whole signal.

Once a signal is recorded it works without any errors. PWM can be adjusted in order to support almost all devices. The best signals are created on a Raspberry Pi 3 Model B (or a faster board).

Installation

The easy way:

If there is a release for your Raspbian kernel you are lucky. If the kernel version does not match, you can just try a version that is similar enough.

To try the different releases you can just insmod gpio-reflect.ko.

The manual way:

The Raspbian (Stretch) way:

Check if it's working with: dmesg |grep gpio

For a permanent installation (Raspbian only):

Usage

After insmodding the module a device appears under /dev/gpio-reflect. This device can be used as a regular file.

Only one process at a time can access it, the others have to wait. But any action can be interrupted with ctrl+c.

You need sudo for interacting with the module. The scripts irsend and irsniff make the sudo access easier. Just execute the script with sudo and add the signal as parameter.

You have to use the format of the recorded signal: MILLIS.MICROS|MILLIS.MICROS|...

So a signal with periods of 123.55|456.0|0.200 means: 123ms55us ON -> 456ms OFF -> 200us ON. The last state is always pulled to zero after the period to protect the hardware.

Options

You can configure the module for different use cases. This is accomplished at insmod-time by appending param=value.

Possible parameters:

You can check your inputs and possible recording failures with dmesg -w.

I use the module for receiving and transmitting infrared signals, but it can be used for any tpe of signal. But 433MHZ-RF for instance is not possible because of the heavy noise in the receiver.