this e-mail refers to the e-mail "LSystems, MonCaso 312 version 2,
FTDI, mplay, linux" from CJ Oster <cjo@ct...> (2010-11-29
Here is what I have figured out:
Now I need some hints how to proceed. How can the knob be integrated
into the mplay2 driver?
- The remote device is accessed by USB.
- The module ftdio_sio maps the USB access to a serial interface
(here e.g. /dev/ttyUSB0).
- ftdio_sio gets data by a bulk read. There, it discards the
first two bytes and passes the remaining data to the serial
- The first two bytes contain status information.
- This status contains two status bits, which tell the direction
of rotation (see e-mail from CJO).
- My guess: Either the device uses a special mode of the FT232R
chip (CBUS, using two extra pins, pin states transported in the
two bytes status [more precisely, in the modem status byte]), or
it maps existing serial control lines (CTS, DSR) to the two pins
telling how the knob is turned. Anyone here who can tell me what
is reported in this two byte status?
My feeling is that just a few lines of code are missing for the
complete knob support. Any help here is highly appreciated.
- The mplay2 driver uses as the mplay driver the serial
interface /dev/ttyUSB0. But lircd listens only for data from the
serial port (there is a select in a listener loop), but not for
changes in the status of the control lines.
- Is there a possibility to make lircd listen for control line
changes, such that they can be evaluated in order to report
remote events like "clock wise" or "counter clock wise"?
- Alternatively, the whole driver could be rewritten using
libftdi, or even using libusb.
- There is also the possibility to introduce a second remote
control device handling only the knob rotation. This approach
leaves mplay and mplay2 as they are. But how do I add new
drivers to lirc? I am not familar with the lirc integration
framework. So, I do not know which interface functions to
implement, and which lirc framework functions are available for
Hm, let's summarise my three most important questions:
- How can I listen for CTS/DSR changes in the mplay2 driver?
- How can the mplay2 driver generate lirc events usable by lirc
- How do I integrate new remote control drivers?