Adapting Digicom USB Wave HSUPA for linux embedded

Digicom USB Wave HSUPA

I just adapted a weird existing driver for Pirelli Chipset adopted by Digicom modem (approx. 75,00 euro), creating a new version v0.7.3 suitable for kernel 2.6.30.1.
Like most of the HUAWEI devices (like Vodafone one) you are going to face with an annoying behaviour that present the device as USb storage the first time you connect it.
You have to eject it in order to allow the system to detect it as modem ttyUSB0.
The most funny thing is that the producer didn't care about any other linux version than Ubuntu 8.10 with kernel 2.6.27-8.
Of course embedded devices don't have all the features you may have on a desktop distribution, moreover if you have a headless console based system.

 

USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
input: PC Speaker as /devices/platform/pcspkr/input/input2
scsi 2:0:0:0: CD-ROM            Pirelli  CDROM            2.01 PQ: 0 ANSI: 4
usb-storage: device scan complete
Driver 'sr' needs updating - please use bus_type methods
sr0: scsi-1 drive
Uniform CD-ROM driver Revision: 3.20
sr 2:0:0:0: Attached scsi CD-ROM sr0
sd 0:0:0:0: Attached scsi generic sg0 type 0
sr 2:0:0:0: Attached scsi generic sg1 type 5
usb 2-2: USB disconnect, address 3
usb 2-2: new high speed USB device using ehci_hcd and address 4
usb 2-2: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
option 2-2:1.0: GSM modem (1-port) converter detected
usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
option 2-2:1.1: GSM modem (1-port) converter detected
usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
option 2-2:1.2: GSM modem (1-port) converter detected
usb 2-2: GSM modem (1-port) converter now attached to ttyUSB2
usbcore: registered new interface driver option
option: v0.7.3:USB Driver for GSM modems Pirelli/Digicom (patched by KOAN <www.koansoftware.com>)
scsi 3:0:0:0: Direct-Access     Pirelli  MMC Storage      1.01 PQ: 0 ANSI: 2
sd 3:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
sd 3:0:0:0: [sdb] Attached SCSI removable disk
EXT3 FS on sda1, internal journal



  USB Driver for GSM modems
  Copyright (C) 2010  Marco Cavallini <m.cavallini AT koansoftware.com>
    v0.7.3: added support for kernel 2.6.30 commented unexistent dtr_rts and replacing close parameters
 .snip.
#define PIRELLI_VENDOR_ID            0x1266
#define PIRELLI_PRODUCT_C100_1            0x1002
#define PIRELLI_PRODUCT_C100_2            0x1003
#define PIRELLI_PRODUCT_1004            0x1004
#define PIRELLI_PRODUCT_1005            0x1005
#define PIRELLI_PRODUCT_1006            0x1006
#define PIRELLI_PRODUCT_1007            0x1007
#define PIRELLI_PRODUCT_1008            0x1008
#define PIRELLI_PRODUCT_1009            0x1009
#define PIRELLI_PRODUCT_100A            0x100a
#define PIRELLI_PRODUCT_100B            0x100b
#define PIRELLI_PRODUCT_100C            0x100c
#define PIRELLI_PRODUCT_100D            0x100d
#define PIRELLI_PRODUCT_100E            0x100e
#define PIRELLI_PRODUCT_100F            0x100f
#define PIRELLI_PRODUCT_1011            0x1011
#define PIRELLI_PRODUCT_1012            0x1012


# lsusb
Bus 002 Device 004: ID 1266:1009 Pirelli Broadband Solutions 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 1241:1166 Belkin MI-2150 Trust Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


# ifconfig
ppp0      Link encap:Point-to-Point Protocol
          inet addr:91.80.21.170  P-t-P:10.64.64.64
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:84 (84.0 B)  TX bytes:117 (117.0 B)

Update 7/JUN/2010 : yesterday ported the driver on my Laptop running Unbuntu 10.04 Lucid Lynx, using a Vodafone connection kernel 2.6.32-22-generic.