The Irdroid IrDA series of modules and development boards provide IrDA data communication for modern Linux based systems, thanks to the compatibility with the irda-tools for Linux and the availability of the relevant kernel modules / drivers for the chipset (mcp2120) used in the Irdroid IrDA product range. The irda-utils for GNU Linux are available for most of the GNU Linux distributions, thus simplifying the installation and configuration process.
The Irdroid USB IrDA transceiver is based on Microchip MCP2120 IrDA communication IC and the CH341 USB to UART serial converter module. The unit enumerates on the host system as a USB Serial port, usually enumarated as /dev/ttyUSB0.
Below are the steps for configuring the Irdroid USB IrDA transceiver for use with the IrDA protocol stack in Linux:
- Make sure your kernel is below version 4.17 (IrDA support is removed from the Linux kernel versions above 4.17)
- Install irda-utils (apt install irda-utils)
- edit /etc/default/irda-utils as follows -> ENABLE = "true" ; DISCOVERY = "true" ; DEVICE = "/dev/ttyUSB0" ; DONGLE = "mcp2120" ; MAX_BAUD_RATE = "9600"
- Once the above changes are saved insert the Irdroid USB Irda Dongle (It should enumerate as a usb serial device under /dev/ttyUSB0 )
- do a modprobe ircomm-tty
- then /etc/init.d/irda-utils start
- to check the status /etc/init.d/irda-utils status
- At this point the Irdroid USB Irda Module is configured on your system for using the GNU Linux IrDA stack
- By using a IrDA capable device, such as old cell phone, PDA or any other IrDA SIR capable device you can setup a IrDA data link.
- Point the IrDA device toward the Irdroid USB IrDA transceiver module (the distance between the device and the Irdroid USB IrDA module should be less than 1 meter)
- If needed activate file transfer / file receive mode on your device
- then from the console of your computer issue: ircp filename in order to transfer the needed file to the device.
Below is a video demonstration of IrDA data communication between two Irdroid USB IrDA modules
https://www.youtube.com/watch?v=5QJcFloY4F4
The IrDA PiHat features Microchip MCP2120 IrDA SIR communications IC, and a TFDU4100 IrDA transceiver. The MCP2120 Serial port is wired to Raspberry Pi console serial port, usually ttyS0 or ttyAMA0.
Steps for configuring the IrDA PiHat:
- make sure you are on a Kernel lower than version 4.17 (if not revert back to version lower than 4.17)
- Release the kernel console from the ttyS0/ttyAMA0 (the port must be free for use with the IrDA stack)
- Install irda-utils (apt install irda-utils)
- edit /etc/default/irda-utils as follows -> ENABLE = "true" ; DISCOVERY = "true" ; DEVICE = "/dev/ttyS0" or "ttyAMA0" ; DONGLE = "mcp2120" ; MAX_BAUD_RATE = "9600"
- do a modprobe ircomm-tty
- then /etc/init.d/irda-utils start
- to check the status /etc/init.d/irda-utils status
- At this point the IrDA PiHat is configured on your system for using the GNU Linux IrDA stack