OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
umsm(4) patch

From: Jona Joachim (jajhcl-club.lu)
Date: Wed Sep 30 2009 - 11:50:05 CDT


Hi,
I have a USB UMTS/HSDPA modem which isn't recognized correctly.
It's one of those devices which emulate a usb CDROM drive which contains
the windows drivers so that the vendor doesn't have to ship a CD.
If you don't mount the CD drive and wait for about 30 seconds the key
reinitializes and gives you access to the real modem device.
Unfortunately the key also has a micro-SD slot and it's recognized as
umass(4) instead of umsm(4):

Sep 30 14:05:36 spaceman /bsd: umass0 at uhub3
Sep 30 14:05:36 spaceman /bsd: port 1 configuration 1 interface 0 "Qualcomm, Incorporated USB GLB Storage" rev 1.10/0.00 addr 2
Sep 30 14:05:36 spaceman /bsd: umass0: using SCSI over Bulk-Only
Sep 30 14:05:36 spaceman /bsd: scsibus3 at umass0: 2 targets, initiator 0
Sep 30 14:05:36 spaceman /bsd: cd1 at scsibus3 targ 1 lun 0: <Global, USB Storage, 2.31> SCSI2 5/cdrom removable

wait...

Sep 30 14:06:07 spaceman /bsd: cd1 detached
Sep 30 14:06:07 spaceman /bsd: scsibus3 detached
Sep 30 14:06:07 spaceman /bsd: umass0 detached
Sep 30 14:06:13 spaceman /bsd: umass0 at uhub3
Sep 30 14:06:13 spaceman /bsd: port 1 configuration 1 interface 0 "Qualcomm, Incorporated Global Wireless WCDMA DEV" rev 1.10/0.00 addr 2
Sep 30 14:06:13 spaceman /bsd: umass0: using SCSI over Bulk-Only
Sep 30 14:06:13 spaceman /bsd: scsibus3 at umass0: 2 targets, initiator 0
Sep 30 14:06:13 spaceman /bsd: sd1 at scsibus3 targ 1 lun 0: <Global, MMC Storage, 2.31> SCSI2 0/direct removable
Sep 30 14:06:13 spaceman /bsd: sd1: drive offline

So I patched umsm to make it use its umass -> umsm switch magic for this
key. With patch applied the key is correctly detected:

cd1 detached
scsibus3 detached
umass0 detached
umsm0 at uhub3 port 1 configuration 1 interface 0 "Qualcomm, Incorporated Global Wireless WCDMA DEV" rev 1.10/0.00 addr 2
umsm1 at uhub3 port 1 configuration 1 interface 1 "Qualcomm, Incorporated Global Wireless WCDMA DEV" rev 1.10/0.00 addr 2
ucom0 at umsm1
umsm2 at uhub3 port 1 configuration 1 interface 2 "Qualcomm, Incorporated Global Wireless WCDMA DEV" rev 1.10/0.00 addr 2
ucom1 at umsm2
umsm3 at uhub3 port 1 configuration 1 interface 3 "Qualcomm, Incorporated Global Wireless WCDMA DEV" rev 1.10/0.00 addr 2
ucom2 at umsm3

I don't really know what manufacturer this is, here's the output from
usbdevs:

When it's in CD mode:
port 1 addr 2: full speed, power 500 mA, config 1, USB GLB Storage(0x2000), Qualcomm, Incorporated(0x05c6), rev 0.00

When it's in modem mode:
port 1 addr 2: full speed, power 500 mA, config 1, Global Wireless WCDMA DEV(0x0015), Qualcomm, Incorporated(0x05c6), rev 0.00, iSerialNumber Usb MODEM Port

I just called it USB_PRODUCT_QUALCOMM_MSM_HSDPA3, I don't know if this
is the right way to name it.

Here's some more information:

AT+CGMI
Global Wireless Incorporated

AT+CGMM
E180

AT+CGMR
Global E180 V1.1.0 Global E180 V1.1.0 1 [Sep 4 2008 12:00:00]

According to what's written on the USB stick it's manufactured by "HSDPA
TECHNOLOGIES CO. LTD.", yeah right...

Diff is attached.

Best regards,
Jona

--
Worse is better
    Richard P. Gabriel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (OpenBSD)

iEYEARECAAYFAkrDjD0ACgkQj0bT63DmrGTL9ACdEAV6+YB2DYePUsrtetiJcfel
/v8AnAqANP6g2T9pVZKAebTEjyjK1uhT
=mBHe
-----END PGP SIGNATURE-----