Linux - IrDA USB Dongle Howto

This article is the synthesis of a personal experience dealing with making my MosChip IrDA USB dongle working with a Debian Linux distribution. The procedure proposed can be generalized to any IrDA USB token, and even to any USB device. So I will describe it in a general way.

When plugging a new device to a computer running a Linux Operating System, such device will sometimes not automatically be recognized. In such case, the first step is to identify on which electronic chip is based the device. Many different devices (sold by different brands) are based on the same chip, and will work with the same driver. For instance, I bought a generic IrDA USB token, which appeared to work with the MosChip IrDA driver. The reason in that the electronic chip used into my token is the MosChip Semiconductor mcs7780 electronic chip.

When the device's chip has been identified, you'll have to find a Linux version containing your chipís driver. If such driver is not available into the last Linux kernel, then you'll have to manually install it. Some drivers are packaged into some Linux distributions and can be installed more easily than from scratch. The Debian distribution even proposes a program named module-assistant, convenient to install drivers that are not integrated into the Linux kernel. Some unlucky people will have to download device drivers directly from some website, and install it following the given instructions. And sometimes, some devices don't even have any Linux driver available (especially recent devices). In such case, you'll have to code the driver yourself, or change your device.

So let's step into the details of operations.

Identifying the IrDA USB Dongle internal chip

In order to identify the internal hardware of an USB token connected on your computer, a command named lsusb can be used. It will display information on every USB devices connected on the computer. In order to extract the information related to the IrDA USB token, we can proceed in two steps:

At first, before plugging our USB token, we can execute the lsusb command to get information on every USB devices connected to the computer without our IrDA token. Such command will display information, where each line will be related to a distinct USB device. The command's result can be redirected into a file.

Then, after having connected the IrDA USB dongle, we can execute the lsusb command once more. This will retrieve information on every USB devices including our IrDA USB dongle. The command's output should be redirected to a second file.

As we said, each USB device will be described on a distinct line in each of the two generated files. Then the information related to our IrDA USB dongle are on the unique line that appears into the second file, but is absent into the first one. A tool named diff does that job.

The commands that have to be executed are summarized there:

Use the "lsusb" command, once without having connected our USB dongle:
# lsusb > /tmp/usb_before
Once after having connected the dongle to our computer:
# lsusb > /tmp/usb_after
Then making a diff between the two outputs should show us which device we have connected:
# diff /tmp/usb_before /tmp/usb_after
5a6
> Bus 001 Device 006: ID 9710:7780 MosChip Semiconductor

As a result, we found that the device is a MosChip Semiconductor device. Moreover the device can be uniquely identified by its ID 9710:7780. Such ID is composed of a vendor ID which is 9710 in that case, and a product ID which is 7780. By doing some Internet research, one can find that this Chip is named MCS7780, which is its commercial name, and that it is produced by the MosChip Semiconductor company.

Getting the MosChip MCS7780 Linux Driver

After some Internet research, we happened to be lucky. The MosChip MCS7780 device is listed as supported by Linux on the TuxMobil website! Unfortunately, this chip was not supported into the Linux kernel 2.6.15, which was the one I used. But looking at the kernel newsgroup archives, I could see that the driver for the MCS7780 chip was available in the Linux kernel since the 2.6.17 version. We can find the messages concerning this driver on the google groups.

After having upgraded my kernel to the 2.6.18 versoin, which is now packaged in the Debian testing distribution, the MosChip Semiconductor IrDA USB dongle was automatically recognized, and the mcs7780 module was loaded as soon as I plugged my IrDA USB token.

I can now communicate with my cell phone using an infrared communication link! ... (see the note about the Mitsubishi M341i and Linux)

Getting more informations

The first information source needed to configure our IrDA USB device is the Linux Infrared HOWTO. The Infrared-HOWTO provides an introduction to Linux and infrared devices and how to use the software provided by the Linux/IrDA project.

Moreover, a list of IrDA devices supported by the Linux/IrDA project can be found on the TuxMobil website.

The MCS7780 datasheet of the dongle is publicly available.

The driver for the MCS7780 IrDA USB dongle has been written here.

There also exist an alternative driver to do IP over the infrared link for this device.

By the way, I found this nice website about TV replay. You can watch emissions from french TV channels through this platform.


Back to the Kynesthesy Wiki Home