From owner-freebsd-usb@FreeBSD.ORG Sat Jan 10 17:19:04 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FBE7756; Sat, 10 Jan 2015 17:19:04 +0000 (UTC) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 431CBBAF; Sat, 10 Jan 2015 17:19:04 +0000 (UTC) Received: from gjp by mail.in-addr.com with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Y9zgj-0003Yg-Nu; Sat, 10 Jan 2015 17:19:01 +0000 Date: Sat, 10 Jan 2015 17:19:01 +0000 From: Gary Palmer To: freebsd-usb@freebsd.org Subject: ZTE MF730M 3G dongle help please Message-ID: <20150110171901.GA47211@in-addr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2015 17:19:04 -0000 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: 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 iProduct = 0x0002 iSerialNumber = 0x0004 <1234567890ABCDEF> bNumConfigurations = 0x0003 with the following config: % usbconfig -d ugen2.7 dump_all_config_desc ugen2.7: 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 bmAttributes = 0x00c0 bMaxPower = 0x00fa Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0008 bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0050 iInterface = 0x0005 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0001 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Configuration index 1 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0020 bNumInterfaces = 0x0001 bConfigurationValue = 0x0002 iConfiguration = 0x0003 bmAttributes = 0x00c0 bMaxPower = 0x00fa Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0008 bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0050 iInterface = 0x0005 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0001 bmAttributes = 0x0002 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: at usbus2 Jan 10 16:38:10 noop kernel: umass0: 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: 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: 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: 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: 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: 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: at usbus2 Jan 10 16:45:53 noop kernel: urndis0: on usbus2 Jan 10 16:45:53 noop kernel: ue0: on urndis0 Jan 10 16:45:53 noop kernel: ue0: Ethernet address: Jan 10 16:45:53 noop kernel: umass0: 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: 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: 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 Jan 10 16:45:53 noop root: Unknown USB device: vendor 0x19d2 product 0x1403 bus uhub6 and ue0: flags=8802 metric 0 mtu 1500 ether nd6 options=29 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