Date: Sun, 11 Jan 2015 02:52:38 +0000 From: Gary Palmer <gpalmer@freebsd.org> To: Philip Guyton <phil.lxnet@gmail.com> Cc: freebsd-usb@freebsd.org Subject: Re: ZTE MF730M 3G dongle help please Message-ID: <20150111025238.GB47211@in-addr.com> In-Reply-To: <CADbbYFN5_idRCCDY3xdMWdXUqW1wmhwqq18AC9Bm7KW-z5vgjQ@mail.gmail.com> References: <20150110171901.GA47211@in-addr.com> <CADbbYFN5_idRCCDY3xdMWdXUqW1wmhwqq18AC9Bm7KW-z5vgjQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Philip, Try the attached patch. It's relative to releng/9.3 so it may not apply cleanly to 10.x. It does mean rebuilding the kernel. If you rebuild the kernel you can boot with the device inserted. If you apply the quirks you listed in addition to UQ_CFG_INDEX_0 and UQ_MSC_EJECT_SCSIEJECT then you can insert the device after boot. No idea what Linux does, but this is as far as my limited knowledge of the USB subsystem in FreeBSD has got me. Regards, Gary On Sat, Jan 10, 2015 at 07:31:07PM +0000, Philip Guyton wrote: > @Garry Palmer > Don't know if it helps or not but I've previously posted some info on this > list re a long battle I had with this same ZTE-MF730M > My post (unanswered as far as I know) is at:- > Quirks required to remove 6 minute CAM status: CCB error with ZTE-MF730M > <http://lists.freebsd.org/pipermail/freebsd-usb/2014-June/013029.html> > I was switching the device to the cdc ether mode (preferred by me) for use > with if_cdce.ko. > Also posted a devd hack for pfsense that might help:- > zte-mf730m 42Mbps 3G howto and request for further assistance > <https://forum.pfsense.org/index.php?topic=77989.0> > again no reply. > I appreciate this is not an answer but hope this helps, I received no help > myself with this dongle and FreeBSD so suspect it's uninteresting to these > 2 mailing lists. > Switches almost instantly and perfectly reliable with modern linux kernels > (no usb-modeswitch required) so using it there. But also a guide / source > to how it can be done. Didn't track down exactly how it's done in the > linux kernel though unfortunately. Would be a nice addition to FreeBSD > though. > > On Sat, Jan 10, 2015 at 5:19 PM, Gary Palmer <gpalmer@freebsd.org> wrote: > > > > > Hi, > > > > I have a ZTE MF730M. When first connected to my 9.3-RELEASE-p7 box > > it takes a few seconds (approximately 7) and then shows up as: > > > > % usbconfig -d ugen2.7 dump_device_desc > > ugen2.7: <ZTE Mobile Broadband Station ZTE,Incorporated> at usbus2, cfg=1 > > md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > > > > bLength = 0x0012 > > bDescriptorType = 0x0001 > > bcdUSB = 0x0200 > > bDeviceClass = 0x0000 > > bDeviceSubClass = 0x0000 > > bDeviceProtocol = 0x0000 > > bMaxPacketSize0 = 0x0040 > > idVendor = 0x19d2 > > idProduct = 0x1420 > > bcdDevice = 0xf0f7 > > iManufacturer = 0x0001 <ZTE,Incorporated> > > iProduct = 0x0002 <ZTE Mobile Broadband Station> > > iSerialNumber = 0x0004 <1234567890ABCDEF> > > bNumConfigurations = 0x0003 > > > > with the following config: > > > > % usbconfig -d ugen2.7 dump_all_config_desc > > ugen2.7: <ZTE Mobile Broadband Station ZTE,Incorporated> at usbus2, cfg=1 > > md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > > > > > > Configuration index 0 > > > > bLength = 0x0009 > > bDescriptorType = 0x0002 > > wTotalLength = 0x0020 > > bNumInterfaces = 0x0001 > > bConfigurationValue = 0x0001 > > iConfiguration = 0x0003 <Self Powered> > > bmAttributes = 0x00c0 > > bMaxPower = 0x00fa > > > > Interface 0 > > bLength = 0x0009 > > bDescriptorType = 0x0004 > > bInterfaceNumber = 0x0000 > > bAlternateSetting = 0x0000 > > bNumEndpoints = 0x0002 > > bInterfaceClass = 0x0008 > > bInterfaceSubClass = 0x0006 > > bInterfaceProtocol = 0x0050 > > iInterface = 0x0005 <Mass Storage> > > > > Endpoint 0 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0081 <IN> > > bmAttributes = 0x0002 <BULK> > > wMaxPacketSize = 0x0200 > > bInterval = 0x0000 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > Endpoint 1 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0001 <OUT> > > bmAttributes = 0x0002 <BULK> > > wMaxPacketSize = 0x0200 > > bInterval = 0x0001 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > > > > > Configuration index 1 > > > > bLength = 0x0009 > > bDescriptorType = 0x0002 > > wTotalLength = 0x0020 > > bNumInterfaces = 0x0001 > > bConfigurationValue = 0x0002 > > iConfiguration = 0x0003 <Self Powered> > > bmAttributes = 0x00c0 > > bMaxPower = 0x00fa > > > > Interface 0 > > bLength = 0x0009 > > bDescriptorType = 0x0004 > > bInterfaceNumber = 0x0000 > > bAlternateSetting = 0x0000 > > bNumEndpoints = 0x0002 > > bInterfaceClass = 0x0008 > > bInterfaceSubClass = 0x0006 > > bInterfaceProtocol = 0x0050 > > iInterface = 0x0005 <Mass Storage> > > > > Endpoint 0 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0081 <IN> > > bmAttributes = 0x0002 <BULK> > > wMaxPacketSize = 0x0200 > > bInterval = 0x0000 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > Endpoint 1 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0001 <OUT> > > bmAttributes = 0x0002 <BULK> > > wMaxPacketSize = 0x0200 > > bInterval = 0x0001 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > > > > > the kernel reports: > > > > Jan 10 16:38:10 noop kernel: usb_alloc_device: Found possible auto-install > > disk (trying next config) > > Jan 10 16:38:10 noop kernel: ugen2.7: <ZTE,Incorporated> at usbus2 > > Jan 10 16:38:10 noop kernel: umass0: <Mass Storage> on usbus2 > > Jan 10 16:38:10 noop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 > > Jan 10 16:38:10 noop kernel: umass0: Get Max Lun not supported > > (USB_ERR_STALLED) > > Jan 10 16:38:10 noop kernel: umass0:8:0:-1: Attached to scbus8 > > Jan 10 16:39:24 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:39:24 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:39:24 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > Jan 10 16:40:38 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:40:38 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:40:38 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > Jan 10 16:41:51 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:41:51 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:41:51 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > n 10 16:43:05 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 > > 00 00 24 00 > > Jan 10 16:43:05 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:43:05 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > Jan 10 16:44:19 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:44:19 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:44:19 noop kernel: (probe0:umass-sim0:0:0:0): Error 5, Retries > > exhausted > > > > > > nothing shows up in "camcontrol devlist". > > > > If I do > > > > usbconfig -d ugen2.7 power_off > > usbconfig -d ugen2.7 power_on > > > > I now get: > > > > Jan 10 16:45:17 noop kernel: umass0: at uhub6, port 1, addr 7 > > (disconnected) > > Jan 10 16:45:21 noop kernel: umass0: <Mass Storage> on usbus2 > > Jan 10 16:45:21 noop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 > > Jan 10 16:45:21 noop kernel: umass0:8:0:-1: Attached to scbus8 > > Jan 10 16:45:21 noop kernel: cd1 at umass-sim0 bus 0 scbus8 target 0 lun 0 > > Jan 10 16:45:21 noop kernel: cd1: <ZTE USB SCSI CD-ROM 2.31> Removable > > CD-ROM SCSI-2 device > > Jan 10 16:45:21 noop kernel: cd1: Serial Number 1234567890ABCDEF > > Jan 10 16:45:21 noop kernel: cd1: 40.000MB/s transfers > > Jan 10 16:45:21 noop kernel: cd1: cd present [2177 x 2048 byte records] > > Jan 10 16:45:21 noop kernel: cd1: quirks=0x10<10_BYTE_ONLY> > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): READ TOC/PMA/ATIP. > > CDB: 43 02 00 00 00 00 aa 00 0c 00 > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): CAM status: SCSI > > Status Error > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): SCSI status: Check > > Condition > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): SCSI sense: ILLEGAL > > REQUEST asc:24,0 (Invalid field in CDB) > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): Error 22, Unretryable > > error > > > > and this shows up in camcontrol devlist: > > > > <ZTE USB SCSI CD-ROM 2.31> at scbus8 target 0 lun 0 (cd1,pass7) > > > > now if I do > > > > % camcontrol eject cd1 > > Unit stopped successfully, Media ejected > > > > I get the following kernel logs: > > > > Jan 10 16:45:52 noop kernel: ugen2.7: <ZTE,Incorporated> at usbus2 > > (disconnected) > > Jan 10 16:45:52 noop kernel: umass0: at uhub6, port 1, addr 7 > > (disconnected) > > Jan 10 16:45:52 noop kernel: cd1 at umass-sim0 bus 0 scbus8 target 0 lun 0 > > Jan 10 16:45:52 noop kernel: cd1: <ZTE USB SCSI CD-ROM 2.31> s/n > > 1234567890ABCDEF detached > > Jan 10 16:45:52 noop kernel: (cd1:umass-sim0:0:0:0): Periph destroyed > > Jan 10 16:45:53 noop kernel: ugen2.7: <ZTE,Incorporated> at usbus2 > > Jan 10 16:45:53 noop kernel: urndis0: <RNDIS Communications Control> on > > usbus2 > > Jan 10 16:45:53 noop kernel: ue0: <USB Ethernet> on urndis0 > > Jan 10 16:45:53 noop kernel: ue0: Ethernet address: <redacted> > > Jan 10 16:45:53 noop kernel: umass0: <Mass Storage> on usbus2 > > Jan 10 16:45:53 noop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 > > Jan 10 16:45:53 noop kernel: umass0:8:0:-1: Attached to scbus8 > > Jan 10 16:45:53 noop kernel: cd1 at umass-sim0 bus 0 scbus8 target 0 lun 0 > > Jan 10 16:45:53 noop kernel: cd1: <ZTE USB SCSI CD-ROM 2.31> Removable > > CD-ROM SCSI-2 device > > Jan 10 16:45:53 noop kernel: cd1: Serial Number 1234567890ABCDEF > > Jan 10 16:45:53 noop kernel: cd1: 40.000MB/s transfers > > Jan 10 16:45:53 noop kernel: cd1: cd present [2177 x 2048 byte records] > > Jan 10 16:45:53 noop kernel: cd1: quirks=0x10<10_BYTE_ONLY> > > Jan 10 16:45:53 noop kernel: da0 at umass-sim0 bus 0 scbus8 target 0 lun 1 > > Jan 10 16:45:53 noop kernel: da0: <ZTE MMC Storage 2.31> Removable Direct > > Access SCSI-2 device > > Jan 10 16:45:53 noop kernel: da0: Serial Number 1234567890ABCDEF > > Jan 10 16:45:53 noop kernel: da0: 40.000MB/s transfers > > Jan 10 16:45:53 noop kernel: da0: Attempt to query device size failed: NOT > > READY, Medium not present > > Jan 10 16:45:53 noop kernel: da0: quirks=0x2<NO_6_BYTE> > > Jan 10 16:45:53 noop root: Unknown USB device: vendor 0x19d2 product > > 0x1403 bus uhub6 > > > > and > > > > ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 > > ether <redacted> > > nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> > > > > shows up > > > > Any way of getting a more automated switch to the RNDIS protocol? > > > > I've got a hack going right now via devd but I'd have thought there would > > be a way of doing this via the quirks mechanism. The devd stuff isn't > > ideal as I found out that there is no real way to associate the umass > > creation event with a particular cam device, so I end up with a script > > that waits and uses camcontrol to try to figure out the cd device that > > is created via umass. > > > > Thanks, > > > > Gary > > _______________________________________________ > > freebsd-usb@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > > --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ZTE_MF730M.diff.txt" Index: usb/quirk/usb_quirk.c =================================================================== --- usb/quirk/usb_quirk.c (revision 276888) +++ usb/quirk/usb_quirk.c (working copy) @@ -485,6 +485,8 @@ USB_QUIRK(TEXTECH, U2M_2, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(WCH2, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), + USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), + /* Non-standard USB AUDIO devices */ USB_QUIRK(MAUDIO, FASTTRACKULTRA, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Index: usb/serial/u3g.c =================================================================== --- usb/serial/u3g.c (revision 276888) +++ usb/serial/u3g.c (working copy) @@ -561,6 +561,7 @@ U3G_DEV(TOSHIBA, HSDPA, 0), U3G_DEV(YISO, C893, 0), U3G_DEV(WETELECOM, WM_D200, 0), + U3G_DEV(QUALCOMMINC, ZTE_MF730M, U3GINIT_SCSIEJECT), /* Autoinstallers */ U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT), U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), Index: usb/usbdevs =================================================================== --- usb/usbdevs (revision 276888) +++ usb/usbdevs (working copy) @@ -3618,6 +3618,7 @@ product QUALCOMMINC E0086 0x0086 3G modem product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z 0x1179 3G modem +product QUALCOMMINC ZTE_MF730M 0x1420 3G modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem --RnlQjJ0d97Da+TV1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150111025238.GB47211>