Re: ZTE MF730M 3G dongle help please

2015-01-11 Thread Hans Petter Selasky

On 01/11/15 15:34, Gary Palmer wrote:

On Sun, Jan 11, 2015 at 11:29:51AM +0100, Hans Petter Selasky wrote:

Hi,

Config index 0 is the default, so you might want to try without the ",
UQ_CFG_INDEX_0" in the end.

USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN,
UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0),


Hi Hans Petter,

I was meaning to ask - is putting U3GINIT_SCSIEJECT in u3g.c the right
thing to do for a device that isn't a serial 3G modem?  Would
UQ_MSC_EJECT_SCSIEJECT in usb_quirk.c be better?  There doesn't
appear to be an equivalent section in the RNDIS driver.



Hi,

Currently only the U3G driver calls the "usb_msc_eject()" functions, so 
until further just put the quirk there with a comment about no modem 
features.


--HPS

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ZTE MF730M 3G dongle help please

2015-01-11 Thread Gary Palmer
On Sun, Jan 11, 2015 at 11:29:51AM +0100, Hans Petter Selasky wrote:
> Hi,
> 
> Config index 0 is the default, so you might want to try without the ", 
> UQ_CFG_INDEX_0" in the end.
> 
> USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, 
> UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0),

Hi Hans Petter,

I was meaning to ask - is putting U3GINIT_SCSIEJECT in u3g.c the right 
thing to do for a device that isn't a serial 3G modem?  Would
UQ_MSC_EJECT_SCSIEJECT in usb_quirk.c be better?  There doesn't 
appear to be an equivalent section in the RNDIS driver.

Thanks,

Gary
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ZTE MF730M 3G dongle help please

2015-01-11 Thread Gary Palmer
On Sun, Jan 11, 2015 at 11:29:51AM +0100, Hans Petter Selasky wrote:
> Hi,
> 
> Config index 0 is the default, so you might want to try without the ", 
> UQ_CFG_INDEX_0" in the end.
> 
> USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, 
> UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0),

Doesn't work

Inserting after boot with bootverbose enabled I get

Jan 11 14:11:17 micro2 kernel: usb_alloc_device: Found possible auto-install 
disk (trying next config)
Jan 11 14:11:17 micro2 kernel: ugen1.2:  at usbus1
Jan 11 14:11:17 micro2 kernel: Ejecting ZTE,Incorporated ZTE Mobile Broadband 
Station using method 3

Nothing shows up in "camcontrol devlist" and nothing in ifconfig

While config index 0 may be the default, setting that quirk has the added
advantage of disabling the

"Found possible auto-install disk (trying next config)"

code, so that it is the first device (the CD) that is ejected.  That seems
to trigger the switch into RNDIS mode.

Messages from insertion after boot with bootverbose enabled:

Jan 11 14:21:49 micro2 kernel: ugen1.2:  at usbus1
Jan 11 14:21:49 micro2 kernel: Ejecting ZTE,Incorporated ZTE Mobile Broadband 
Station using method 3
Jan 11 14:21:49 micro2 kernel: ugen1.2:  at usbus1 
(disconnected)
Jan 11 14:21:50 micro2 kernel: ugen1.2:  at usbus1
Jan 11 14:21:50 micro2 kernel: umass0:  on usbus1
Jan 11 14:21:50 micro2 kernel: umass0:  SCSI over Bulk-Only; quirks = 0x
Jan 11 14:21:50 micro2 kernel: umass0:6:0:-1: Attached to scbus6
Jan 11 14:21:51 micro2 kernel: pass4 at umass-sim0 bus 0 scbus6 target 0 lun 0
Jan 11 14:21:51 micro2 kernel: pass4:  Removable 
CD-ROM SCSI-2 device 
Jan 11 14:21:51 micro2 kernel: pass4: Serial Number 1234567890ABCDEF
Jan 11 14:21:51 micro2 kernel: pass4: 40.000MB/s transfers
Jan 11 14:21:51 micro2 kernel: GEOM: new disk cd0
Jan 11 14:21:51 micro2 kernel: cd0 at umass-sim0 bus 0 scbus6 target 0 lun 0
Jan 11 14:21:51 micro2 kernel: cd0:  Removable CD-ROM 
SCSI-2 device 
Jan 11 14:21:51 micro2 kernel: cd0: Serial Number 1234567890ABCDEF
Jan 11 14:21:51 micro2 kernel: cd0: 40.000MB/s transfers
Jan 11 14:21:51 micro2 kernel: cd0: cd present [2177 x 2048 byte records]
Jan 11 14:21:51 micro2 kernel: cd0: quirks=0x10<10_BYTE_ONLY>
Jan 11 14:21:51 micro2 kernel: pass5 at umass-sim0 bus 0 scbus6 target 0 lun 1
Jan 11 14:21:51 micro2 kernel: pass5:  Removable Direct 
Access SCSI-2 device 
Jan 11 14:21:51 micro2 kernel: pass5: Serial Number 1234567890ABCDEF
Jan 11 14:21:51 micro2 kernel: pass5: 40.000MB/s transfers
Jan 11 14:21:51 micro2 kernel: da0 at umass-sim0 bus 0 scbus6 target 0 lun 1
Jan 11 14:21:51 micro2 kernel: da0:  Removable Direct 
Access SCSI-2 device 
Jan 11 14:21:51 micro2 kernel: da0: Serial Number 1234567890ABCDEF
Jan 11 14:21:51 micro2 kernel: da0: 40.000MB/s transfers
Jan 11 14:21:51 micro2 kernel: da0: Attempt to query device size failed: NOT 
READY, Medium not present
Jan 11 14:21:51 micro2 kernel: da0: quirks=0x2
Jan 11 14:21:51 micro2 kernel: da0: Delete methods: 
Jan 11 14:21:51 micro2 kernel: GEOM: new disk da0
Jan 11 14:21:51 micro2 kernel: (da0:umass-sim0:0:0:1): PREVENT ALLOW MEDIUM 
REMOVAL not supported.
Jan 11 14:21:51 micro2 kernel: urndis0:  on usbus1
Jan 11 14:21:51 micro2 kernel: ue0:  on urndis0
Jan 11 14:21:51 micro2 kernel: ue0: bpf attached
Jan 11 14:21:51 micro2 kernel: ue0: Ethernet address: 
Jan 11 14:21:51 micro2 root: Unknown USB device: vendor 0x19d2 product 0x1403 
bus uhub1

Or maybe there is another way of doing it but I haven't played with the
huge number of combinations of the quirks to see if some other
combo work.

I think config index 1 is a micro-SD card reader, which would explain why
eject on it does nothing useful.

I don't have any other 3g USB sticks so I don't know how other devices
are set up and why the skipping of the config index works for them, but
for this device it appears to be the wrong thing to do.

Gary
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ZTE MF730M 3G dongle help please

2015-01-11 Thread Hans Petter Selasky

Hi,

Config index 0 is the default, so you might want to try without the ", 
UQ_CFG_INDEX_0" in the end.


USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, 
UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0),


--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ZTE MF730M 3G dongle help please

2015-01-10 Thread Gary Palmer
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 +, 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
> 
> 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
> 
> 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  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:  at usbus2, cfg=1
> > md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
> >
> >   bLength = 0x0012
> >   bDescriptorType = 0x0001
> >   bcdUSB = 0x0200
> >   bDeviceClass = 0x
> >   bDeviceSubClass = 0x
> >   bDeviceProtocol = 0x
> >   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 = 0x
> >   bAlternateSetting = 0x
> >   bNumEndpoints = 0x0002
> >   bInterfaceClass = 0x0008
> >   bInterfaceSubClass = 0x0006
> >   bInterfaceProtocol = 0x0050
> >   iInterface = 0x0005  
> >
> >  Endpoint 0
> > bLength = 0x0007
> > bDescriptorType = 0x0005
> > bEndpointAddress = 0x0081  
> > bmAttributes = 0x0002  
> > wMaxPacketSize = 0x0200
> > bInterval = 0x
> > bRefresh = 0x
> > bSynchAddress = 0x
> >
> >  Endpoint 1
> > bLength = 0x0007
> > bDescriptorType = 0x0005
> > bEndpointAddress = 0x0001  
> > bmAttributes = 0x0002  
> > wMaxPacketSize = 0x0200
> > bInterval = 0x0001
> > bRefresh = 0x
> > bSynchAddress = 0x
> >
> >
> >
> >  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 = 0x
> >   bAlternateSetting = 0x
> >   bNumEndpoints = 0x0002
> >   bInterfaceClass = 0x0008
> >   bInterfaceSubClass = 0x0006
> >   bInterfaceProtocol = 0x0050
> >   iInterface = 0x0005  
> >
> >  Endpoint 0
> > bLength = 0x0007
> > bDescriptorType = 0x0005
> > bEndpointAddress = 0x0081  
> > bmAttributes = 0x0002  
> > wMaxPacketSize = 0x0200
> > bInterval = 0x
> > bRefresh = 0x
> > bSynchAddress = 0x
> >
> >  Endpoint 1
> > bLength = 0x0007
> > bDescriptorType = 0x0005
> > bEndpointAddress = 0x0001  
> > bmAttributes = 0x0002  
> > wMaxPacketSize = 0x0200
> > bInterval = 0x0001
> > bRefresh = 0x
> > bSynchAddress

Re: ZTE MF730M 3G dongle help please

2015-01-10 Thread Philip Guyton
@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

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

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  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:  at usbus2, cfg=1
> md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
>
>   bLength = 0x0012
>   bDescriptorType = 0x0001
>   bcdUSB = 0x0200
>   bDeviceClass = 0x
>   bDeviceSubClass = 0x
>   bDeviceProtocol = 0x
>   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 = 0x
>   bAlternateSetting = 0x
>   bNumEndpoints = 0x0002
>   bInterfaceClass = 0x0008
>   bInterfaceSubClass = 0x0006
>   bInterfaceProtocol = 0x0050
>   iInterface = 0x0005  
>
>  Endpoint 0
> bLength = 0x0007
> bDescriptorType = 0x0005
> bEndpointAddress = 0x0081  
> bmAttributes = 0x0002  
> wMaxPacketSize = 0x0200
> bInterval = 0x
> bRefresh = 0x
> bSynchAddress = 0x
>
>  Endpoint 1
> bLength = 0x0007
> bDescriptorType = 0x0005
> bEndpointAddress = 0x0001  
> bmAttributes = 0x0002  
> wMaxPacketSize = 0x0200
> bInterval = 0x0001
> bRefresh = 0x
> bSynchAddress = 0x
>
>
>
>  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 = 0x
>   bAlternateSetting = 0x
>   bNumEndpoints = 0x0002
>   bInterfaceClass = 0x0008
>   bInterfaceSubClass = 0x0006
>   bInterfaceProtocol = 0x0050
>   iInterface = 0x0005  
>
>  Endpoint 0
> bLength = 0x0007
> bDescriptorType = 0x0005
> bEndpointAddress = 0x0081  
> bmAttributes = 0x0002  
> wMaxPacketSize = 0x0200
> bInterval = 0x
> bRefresh = 0x
> bSynchAddress = 0x
>
>  Endpoint 1
> bLength = 0x0007
> bDescriptorType = 0x0005
> bEndpointAddress = 0x0001  
> bmAttributes = 0x0002  
> wMaxPacketSize = 0x0200
> bInterval = 0x0001
> bRefresh = 0x
> bSynchAddress = 0x
>
>
>
> 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 = 0x
> 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): INQUIR