Re: ZTE MF112 HSUPA - report and patch for usbdevs, umsm.c, umsm.4

Previous thread: acpithinkpad(4) fan control by Christopher Zimmermann on Monday, November 29, 2010 - 7:23 am. (7 messages)

Next thread: allow bioctl to read passphrase from stdin by Chris Kuethe on Monday, November 29, 2010 - 3:22 pm. (10 messages)
From: MERIGHI Marcus
Date: Monday, November 29, 2010 - 9:25 am

hello, 

disclaimer: David Coppa told me to post this to tech@ so this is not a
case of cross posting. 

bought a ZTE MF112 today for my girlfriends ms win notebook. Took the
chance to test it on OpenBSD. 
Without the patches below the thingy attaches as umsm for a second,
detaches and re-attaches as umass. 
After patching it attaches as umsm0, umsm1, umsm2, umsm3 and ucom0,
ucom1, ucom2. 

ucom2 is the one you would want to use with pppd.

I inspected the modem log on ms win to find out what AT commands are
used by the proprietary software, here we go:

TIMEOUT 5
ECHO ON
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO CARRIER"
ABORT "VOICE"
ABORT "NO DIALTONE"
'' AT
OK ATV1
OK ATE1
OK AT&F&D2&C1S0=0
OK ATS7=60S30=0
OK ATS0=0
'' AT
OK ATV1
OK ATE1
OK AT&F&D2&C1S0=0
OK ATS7=60S30=0
# that's what it realy does: OK ATDT*###
# but does not work for me on OpenBSD, so use usual:
OK ATDT*99#
CONNECT ""

Do not ask me what the unusual ones of these commands do; all I can say
is that I got a working internet link and minimal testing showed:
(I got excellent reception here.)
- got max speeds around 250KB/s
- speed changed often and dropped down to as little as 1,5KB/s
- sometimes it stayed there, sometimes it increased again. 

I am going to stick with my "Sierra Wireless, AC850, 3G Network
Adapter". Gives me "only" about 80KB/s but that reliably.

btw, what is the right list for such patches?

bye, 

Marcus

Index: umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.68
diff -u -r1.68 umsm.c
--- umsm.c	12 Oct 2010 21:08:08 -0000	1.68
+++ umsm.c	29 Nov 2010 14:35:40 -0000
@@ -159,6 +159,7 @@
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_K3565Z }, 0},
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF633 }, 0},
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF637 }, 0},
+	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF112 }, DEV_UMASS4},
 
 	{{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_EXPRESSCARD }, 0},
 	{{ ...
From: Jonathan Gray
Date: Monday, November 29, 2010 - 3:20 pm

does it come back as the same id? the other ZTE devices apparently
come back differently.

From: MERIGHI Marcus
Date: Wednesday, December 1, 2010 - 1:56 pm

since I'm not sure what your question is aiming at I did the attach
and patch dance once more and saved "usbdevs -v":

on a snapshot of today, ergo before patching:
first:
umsm0 attach
port 2 addr 2: full speed, power 500 mA, config 1,
  ZTE WCDMA Technologies MSM(0x2000), ZTE,Incorporated(0x19d2), 
  rev 0.00, iSerialNumber P671A2ZTED010000
umsm0 detach
umass0 attach:
port 2 addr 2: full speed, power 500 mA, config 1,
  ZTE WCDMA Technologies MSM(0x0117), ZTE,Incorporated(0x19d2), 
  rev 0.00, iSerialNumber P671A2ZTED010000

after updating src to -current today and patching:
umsm0 attach
port 2 addr 2: full speed, power 500 mA, config 1,
  ZTE WCDMA Technologies MSM(0x2000), ZTE,Incorporated(0x19d2), 
  rev 0.00, iSerialNumber P671A2ZTED010000
umsm0 detach
umsm0 attach 
port 2 addr 2: full speed, power 500 mA, config 1,
  ZTE WCDMA Technologies MSM(0x0117), ZTE,Incorporated(0x19d2), rev 0.00,
  iSerialNumber P671A2ZTED010000
ucom0 attach
umsm1 attach
ucom1 attach
umsm2 attach
ucom2 attach
umsm3 attach

bye, 

marcus

From: MERIGHI Marcus
Date: Wednesday, December 1, 2010 - 2:55 pm

added patch for umsm(4) man page.


Index: share/man/man4/umsm.4
===================================================================
RCS file: /cvs/src/share/man/man4/umsm.4,v
retrieving revision 1.64
diff -u -r1.64 umsm.4
--- share/man/man4/umsm.4	12 Oct 2010 21:08:08 -0000	1.64
+++ share/man/man4/umsm.4	1 Dec 2010 21:46:18 -0000
@@ -92,6 +92,7 @@
 .It Li "Vodafone Mobile Broadband K3765" Ta Ta USB
 .It Li "ZTE MF633" Ta Ta USB
 .It Li "ZTE MF637" Ta Ta USB
+.It Li "ZTE MF112" Ta Ta USB
 .El
 .Pp
 Devices suspected of being compatible are:
Index: sys/dev/usb/umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.68
diff -u -r1.68 umsm.c
--- sys/dev/usb/umsm.c	12 Oct 2010 21:08:08 -0000	1.68
+++ sys/dev/usb/umsm.c	1 Dec 2010 21:46:59 -0000
@@ -159,6 +159,7 @@
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_K3565Z }, 0},
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF633 }, 0},
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF637 }, 0},
+	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF112 }, DEV_UMASS4},
 
 	{{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_EXPRESSCARD }, 0},
 	{{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MERLINV620 }, 0},
Index: sys/dev/usb/usbdevs
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.528
diff -u -r1.528 usbdevs
--- sys/dev/usb/usbdevs	30 Nov 2010 00:52:07 -0000	1.528
+++ sys/dev/usb/usbdevs	1 Dec 2010 21:47:03 -0000
@@ -3080,6 +3080,7 @@
 product ZTE CDMA_MSM		0x0001	CDMA Technologies MSM modem
 product ZTE MF633		0x0016	ZTE MF633 USUPA USB modem
 product ZTE MF637		0x0031	ZTE MF637 HSUPA USB modem
+product ZTE MF112		0x0117	ZTE MF112 HSUPA USB modem
 product ZTE K3565Z		0x0063	ZTE K3565-Z USB MSM modem
 product	ZTE UMASS_INSTALLER2	0x0103	ZTE USB MSM installer 
 product ZTE UMASS_INSTALLER	0x2000	ZTE USB MSM installer

From: Stuart Henderson
Date: Wednesday, December 1, 2010 - 3:45 pm

within each vendor section, usbdevs is sorted by product ID,
please keep it that way. otherwise ok with me.

From: MERIGHI Marcus
Date: Thursday, December 2, 2010 - 4:06 am

Only usbdevs changed, modified ordering and modified/added comments.

Index: share/man/man4/umsm.4
===================================================================
RCS file: /cvs/src/share/man/man4/umsm.4,v
retrieving revision 1.64
diff -u -r1.64 umsm.4
--- share/man/man4/umsm.4	12 Oct 2010 21:08:08 -0000	1.64
+++ share/man/man4/umsm.4	1 Dec 2010 21:46:18 -0000
@@ -92,6 +92,7 @@
 .It Li "Vodafone Mobile Broadband K3765" Ta Ta USB
 .It Li "ZTE MF633" Ta Ta USB
 .It Li "ZTE MF637" Ta Ta USB
+.It Li "ZTE MF112" Ta Ta USB
 .El
 .Pp
 Devices suspected of being compatible are:
Index: sys/dev/usb/umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.68
diff -u -r1.68 umsm.c
--- sys/dev/usb/umsm.c	12 Oct 2010 21:08:08 -0000	1.68
+++ sys/dev/usb/umsm.c	1 Dec 2010 21:46:59 -0000
@@ -159,6 +159,7 @@
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_K3565Z }, 0},
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF633 }, 0},
 	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF637 }, 0},
+	{{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF112 }, DEV_UMASS4},
 
 	{{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_EXPRESSCARD }, 0},
 	{{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MERLINV620 }, 0},
Index: sys/dev/usb/usbdevs
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.528
diff -u -r1.528 usbdevs
--- sys/dev/usb/usbdevs	30 Nov 2010 00:52:07 -0000	1.528
+++ sys/dev/usb/usbdevs	2 Dec 2010 10:59:09 -0000
@@ -32,7 +32,7 @@
  */
 
 /*
- * List of known USB vendors
+ * List of known USB vendors and their product IDs.
  *
  * Please note that these IDs do not do anything. Adding an ID here and
  * regenerating the usbdevs.h and usbdevs_data.h only makes a symbolic name
@@ -48,6 +48,8 @@
  *
  * You may have to add these defines to the respective probe routines to
  * make the device recognised by the appropriate device driver.
+ *
+ * Within each vendor section, this is ...
Previous thread: acpithinkpad(4) fan control by Christopher Zimmermann on Monday, November 29, 2010 - 7:23 am. (7 messages)

Next thread: allow bioctl to read passphrase from stdin by Chris Kuethe on Monday, November 29, 2010 - 3:22 pm. (10 messages)