How to use a usb/serial converter

How to use a usb/serial converter

I used the converter because I could not use the internal modem and use the net. I thounght the solution was an external modem, but I saw it was not safe with a usb modem so I used what I knew: external RS232 modems.

I bought a sopported converter by linux: an Omnidirectional Control Technology, because the mandrake 9.2 have this modules to use FTDI micro. I socketed it and hardrake detected but... it did not work...

So I began to look for what was going wrong at tail /var/log/messages, it detects me the converter but it did not have a module to drive it ?? Google gave me the answer (of course whithout the not interested work of many people this was not possible). As a result I have to do a little changes in the module source ftdi_sio.c ftdi_sio.h I my case I found they in:

/usr/src/linux-2.4.22-10mdk/drivers/usb/serial.

The changes are in red and with a '+' you only have to edit the file and append they, I advace you looking for the above strings, in green, and after add:

diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c

--- a/drivers/usb/serial/ftdi_sio.c Thu Sep 25 16:03:48 2003

+++ b/drivers/usb/serial/ftdi_sio.c Thu Sep 25 16:03:48 2003

+ * (21/Sep/2003) Ian Abbott

+ * Added VID/PID for Omnidirectional Control Technology US101 USB to

+ * RS-232 adapter (also rebadged as Dick Smith Electronics XH6381).

+ * VID/PID supplied by Donald Gordon.

+ *

* (19/Aug/2003) Ian Abbott

* Omitted some paranoid checks in write bulk callback that don't matter.

*

@@ -325,6 +330,7 @@

{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0, 0x3ff) },

{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0, 0x3ff) },

{ USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0, 0x3ff) },

+{ USB_DEVICE_VER(OCT_VID, OCT_US101_PID, 0, 0x3ff) },

{ } /* Terminating entry */

};

@@ -397,6 +403,7 @@

{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0x400, 0xffff) },

{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0x400, 0xffff) },

{ USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0x400, 0xffff) },

+{ USB_DEVICE_VER(OCT_VID, OCT_US101_PID, 0x400, 0xffff) },

{ } /* Terminating entry */

};

@@ -482,6 +489,7 @@

{ USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_7_PID) },

{ USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) },

{ USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) },

+{ USB_DEVICE(OCT_VID, OCT_US101_PID) },

{ USB_DEVICE_VER(FTDI_VID, FTDI_HE_TIRA1_PID, 0x400, 0xffff) },

{ USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID) },

{ } /* Terminating entry */

diff -Nru a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h

--- a/drivers/usb/serial/ftdi_sio.h Thu Sep 25 16:03:48 2003

+++ b/drivers/usb/serial/ftdi_sio.h Thu Sep 25 16:03:48 2003

@@ -133,6 +133,13 @@

#define IDTECH_VID 0x0ACD /* ID TECH Vendor ID */

#define IDTECH_IDT1221U_PID 0x0300 /* IDT1221U USB to RS-232 adapter */

+/*

+ * Definitions for Omnidirectional Control Technology, Inc. devices

+ */

+#define OCT_VID 0x0B39 /* OCT vendor ID */

+/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */

+#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */

+

/* Commands */

#define FTDI_SIO_RESET 0 /* Reset the port */

#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */

For more information look for: 0x0b39 or direcly usb-ftdi_sio-2.4.23-pre5.patch

After all, you only have to delete the *.o of /usr/src/linux-2.4.22-10mdk/drivers/usb/serial go to /usr/src/linux-2.4.22-10mdk and do:

make modules, make modules_install

Now you only have to do:mknod /dev/ttyUSB0 c 188 0, read file:/usr/src/linux-2.4.22-10mdk/Documentation/usb/usb-serial.txt if you want more information. I was able to conect with my external modem, but I need to send AT&D0 with Kppp on terminal to dial.

You can find me at bullakio@wanadoo.es

Note:This Web was not made to support the IE bugs.