lkml.org 
[lkml]   [2008]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] option.c: add support for the ET502HS HSDPA modem
From
Date
Hi everyone,

the attached patch (against 2.6.25) allows to recognize and run the ONDA
ET502HS HSDPA modem (which seems to be widespread here in Italy) through
the option driver without any further udev configuration or external
software (usb_modeswitch). Here is what I did:

1. add an unusual device entry in unusual_devs.h to bypass the ZeroCD
mechanism;
2. add proper PCI vendor and product IDs in option.c.

It works reliably for me (no oopses, no hangs, download peaks of
300KB/s) on a Dell Precision M20 Laptop running Debian (lenny).
Two warnings:

1. It takes as much as 30s for the device to setup properly as a modem,
so watch the logs for /dev/ttyUSB* devices to appear before firing off
the connection scripts.
2. The actual modem device is /dev/ttyUSB1.

Please CC me in any answer as I am not subscribed to the list.

Mauro Andreolini
--
Ing. Mauro Andreolini - Ph.D., Research Associate
Dipartimento di Ingegneria dell'Informazione
Università di Modena e Reggio Emilia - Italia
e-mail: andreolini.mauro@unimore.it
www: http://weblab.ing.unimo.it/people/andreolini/
tel: +39 059 2056325, fax: +39 059 2056129

diff -ruN linux-2.6.25-orig/drivers/usb/serial/option.c linux-2.6.25/drivers/usb/serial/option.c
--- linux-2.6.25-orig/drivers/usb/serial/option.c 2008-04-17 04:49:44.000000000 +0200
+++ linux-2.6.25/drivers/usb/serial/option.c 2008-04-19 19:05:06.000000000 +0200
@@ -184,6 +184,9 @@
#define AXESSTEL_VENDOR_ID 0x1726
#define AXESSTEL_PRODUCT_MV110H 0x1000

+#define ONDA_VENDOR_ID 0x19d2
+#define ONDA_PRODUCT_ET502HS 0x0002
+
#define BANDRICH_VENDOR_ID 0x1A8D
#define BANDRICH_PRODUCT_C100_1 0x1002
#define BANDRICH_PRODUCT_C100_2 0x1003
@@ -296,6 +299,7 @@
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
{ USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
+ { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
diff -ruN linux-2.6.25-orig/drivers/usb/storage/unusual_devs.h linux-2.6.25/drivers/usb/storage/unusual_devs.h
--- linux-2.6.25-orig/drivers/usb/storage/unusual_devs.h 2008-04-17 04:49:44.000000000 +0200
+++ linux-2.6.25/drivers/usb/storage/unusual_devs.h 2008-04-19 19:06:18.000000000 +0200
@@ -1520,6 +1520,16 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_DEVICE),

+/* Reported by Mauro Andreolini <andreoli@weblab.ing.unimo.it>
+ * This entry is needed to bypass the ZeroCD mechanism
+ * and to properly load as a modem device.
+ */
+UNUSUAL_DEV( 0x19d2, 0x2000, 0x0000, 0x9999,
+ "Onda ET502HS",
+ "USB MMC Storage",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_DEVICE),
+
/* Reported by Jaco Kroon <jaco@kroon.co.za>
* The usb-storage module found on the Digitech GNX4 (and supposedly other
* devices) misbehaves and causes a bunch of invalid I/O errors.
\
 
 \ /
  Last update: 2008-04-19 20:47    [W:0.024 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site