Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| doc:howto:lirc-gpioblaster [2016/03/04 20:00] – [Tags] danitool | docs:guide-user:hardware:lirc-gpioblaster [2018/03/03 20:13] – ↷ Page moved from docs:user-guide:hardware:lirc-gpioblaster to docs:guide-user:hardware:lirc-gpioblaster bobafetthotmail | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== LIRC GPIO blaster ====== | ||
| + | [[http:// | ||
| + | An infrared blaster is a device that emulates an infrared remote control. In this case the task is made using LIRC which will control a GPIO. The output of this GPIO is connected to a circuit with an IR diode. This is only for the transmitter, | ||
| + | |||
| + | {{http:// | ||
| + | |||
| + | You'll need at least 1 free GPIO in your router. Also you need to locate VCC (3.3V) and GND, but this is a piece of cake. | ||
| + | |||
| + | ===== Prepare your hardware ===== | ||
| + | These are two schematics for connecting the IR LED to our GPIO output. Both should work fine. | ||
| + | - Simple circuit. It should work on any device\\ {{: | ||
| + | - Safe circuit. R3 and C1 added. Recommended for devices with power supply weakness:\\ {{: | ||
| + | |||
| + | You can substitute the NPN S9013 (500mA) by a: | ||
| + | *2N3904 : 200mA, less range | ||
| + | *2N2222 : 800mA, more range | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Casing ==== | ||
| + | As an example here you can see how a pendrive casing is used to store the simple circuit. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Prepare your software ===== | ||
| + | You will need to make a custom build. The module lirc_gpioblaster isn't available in the official repositories, | ||
| + | |||
| + | <WRAP center round download 60%> | ||
| + | This is the kernel module lirc_gpioblaster, | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | </ | ||
| + | |||
| + | Extract lirc-gpioblaster.zip, | ||
| + | |||
| + | As usually build your custom firmware but select lirc with the transmitter enabled | ||
| + | < | ||
| + | Location: | ||
| + | -> Utilities | ||
| + | </ | ||
| + | < | ||
| + | ┌─────────────────────────────────── Utilities ───────────────────────────────────┐ | ||
| + | │ ┌─────────────────────────────────────────────────────────────────────────────┐ │ | ||
| + | │ │ Boot Loaders | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ < > alsa-utils............ ALSA (Advanced Linux Sound Architecture) utilitie│ │ | ||
| + | │ │ < > alsa-utils-seq.................................. ALSA sequencer utilitie│ │ | ||
| + | │ │ < > alsa-utils-tests.......... ALSA utilities test data (adds ~1.3M to image│ │ | ||
| + | │ │ < > bzip2.................................... bzip2 is a compression utility│ │ | ||
| + | │ │ < > cal................................................... display a calenda│ │ | ||
| + | │ │ < > comgt............................... Option/ | ||
| + | │ │ < > dmesg............................ print or control the kernel ring buffe│ │ | ||
| + | │ │ < > dropbearconvert.......................... Utility for converting SSH key│ │ | ||
| + | │ │ < > fconfig..................................... RedBoot configuration edito│ │ | ||
| + | │ │ < > flock.................................... manage locks from shell script│ │ | ||
| + | │ │ < > gdb......................................................... GNU Debugge│ │ | ||
| + | │ │ < > gdbserver................................. Remote server for GNU Debugge│ │ | ||
| + | │ │ < > getopt.................................. parse command options (enhanced│ │ | ||
| + | │ │ < > gpioctl................................... Tool for controlling gpio pin│ │ | ||
| + | │ │ < > hwclock.................................. query or set the hardware cloc│ │ | ||
| + | │ │ < > iconv................................... Character set conversion utilit│ │ | ||
| + | │ │ < > iwcap.................................... Simple radiotap capture utilit│ │ | ||
| + | │ │ < > iwinfo.......................... Generalized Wireless Information utilit│ │ | ||
| + | │ │ --- jshn................................................. JSON SHell Notatio│ │ | ||
| + | │ │ < > kexec-tools.......................................... Kernel boots kerne│ │ | ||
| + | │ │ < > ldconfig............................... Shared library path configuratio│ │ | ||
| + | │ │ < > ldd.................................................... LDD trace utilit│ │ | ||
| + | │ │ <*> lirc................................ LIRC - Linux Infrared Remote Contro│ │ | ||
| + | │ │ < > logger......... a shell command interface to the syslog system log modul│ │ | ||
| + | │ │ < > look......................... display lines beginning with a given strin│ │ | ||
| + | │ └─v(+)────────────────────────────────────────────────────────────────────────┘ │ | ||
| + | ├─────────────────────────────────────────────────────────────────────────────────┤ | ||
| + | │ < | ||
| + | └─────────────────────────────────────────────────────────────────────────────────┘ | ||
| + | </ | ||
| + | and kmod-lirc_gpioblaster | ||
| + | < | ||
| + | Location: | ||
| + | -> Kernel modules | ||
| + | -> Other modules | ||
| + | </ | ||
| + | < | ||
| + | |||
| + | ┌─────────────────────────────────── Other modules ───────────────────────────────────┐ | ||
| + | │ ┌─────────────────────────────────────────────────────────────────────────────────┐ │ | ||
| + | │ │ < > kmod-bcma................................................... BCMA support | ||
| + | │ │ < > kmod-bluetooth......................................... Bluetooth support | ||
| + | │ │ <*> kmod-button-hotplug................................ Button Hotplug driver | ||
| + | │ │ < > kmod-eeprom-93cx6................................... EEPROM 93CX6 support | ||
| + | │ │ < > kmod-eeprom-at24..................................... EEPROM AT24 support | ||
| + | │ │ < > kmod-eeprom-at25..................................... EEPROM AT25 support | ||
| + | │ │ < > kmod-gpio-button-hotplug............... Simple GPIO Button Hotplug driver | ||
| + | │ │ < > kmod-gpio-dev........................... Generic GPIO char device support | ||
| + | │ │ < > kmod-gpio-nxp-74hc164.................. NXP 74HC164 GPIO expander support | ||
| + | │ │ < > kmod-hid..................................................... HID Devices | ||
| + | │ │ --- kmod-input-core........................................ Input device core │ │ | ||
| + | │ │ < > kmod-input-evdev...................................... Input event device | ||
| + | │ │ < > kmod-input-gpio-buttons................. Polled GPIO buttons input device | ||
| + | │ │ < > kmod-input-gpio-encoder............................... GPIO rotay encoder | ||
| + | │ │ < > kmod-input-gpio-keys.................................... GPIO key support | ||
| + | │ │ <*> kmod-input-gpio-keys-polled...................... Polled GPIO key support | ||
| + | │ │ < > kmod-input-joydev................................ Joystick device support | ||
| + | │ │ --- kmod-input-polldev........................... Polled Input device support | ||
| + | │ │ <*> kmod-lirc_gpioblaster................... Driver for LIRC GPIO transmitter | ||
| + | │ │ < > kmod-mmc............................................. MMC/SD Card Support | ||
| + | │ │ < > kmod-mmc-over-gpio......................... MMC/SD card over GPIO support | ||
| + | │ │ < > kmod-mtdtests........................................ MTD subsystem tests │ │ | ||
| + | │ │ < > kmod-nand............................................. NAND flash support | ||
| + | │ └─v(+)────────────────────────────────────────────────────────────────────────────┘ │ | ||
| + | ├─────────────────────────────────────────────────────────────────────────────────────┤ | ||
| + | │ < | ||
| + | └─────────────────────────────────────────────────────────────────────────────────────┘ | ||
| + | </ | ||
| + | |||
| + | Build openwrt, and flash your custom firmware. Now you have lirc prepared to work. | ||
| + | |||
| + | | {{: | ||
| + | |||
| + | ===== Make it work ===== | ||
| + | As default there is an init script which autostarts lircd conected to /dev/lirc0 | ||
| + | |||
| + | /dev/lirc0 is created when the module lirc_gpioblaster is loaded. As default the GPIO 0 is used, to use another for example the GPIO 17 you need to parse the option\\ | ||
| + | '' | ||
| + | |||
| + | Also you may need to invert the signal depending if the GPIO is active low or high:\\ | ||
| + | '' | ||
| + | <WRAP center round important 60%> | ||
| + | **Warning**: | ||
| + | </ | ||
| + | |||
| + | Example, insert the module with the above options: | ||
| + | '' | ||
| + | |||
| + | You don't need to use this command every time you want to load the module. The module is autoloaded when the system boots up, just add the options to **/ | ||
| + | < | ||
| + | And restart OpenWrt. | ||
| + | |||
| + | Now is time to probe you IR transmitter: | ||
| + | |||
| + | < | ||
| + | |||
| + | And if all is working OK, then IR signals are sent. Check it with your mobile phone camera, since these cameras usually are able to detect the IR light. | ||
| + | |||
| + | |||
| + | ===== Notes ===== | ||
| + | Succesfully tested in AA, platform bcm63xx. | ||
| + | |||
| + | ===== Tags ===== | ||
| + | {{tag> | ||