Re: usb modem "Can't setup transfer"

2015-11-13 Thread Hans Petter Selasky

On 11/12/15 20:43, Alfred Perlstein wrote:

Hans,

Thank you, that allows it to attach and the device nodes appear in /dev/

However I then can not seem to send any AT commands and get a response
via either cu -l /dev/ttyU1 or cu -l /dev/ttyU1.

Any further steps?  Is there a way to virtually share this hardware with
you?


Hi,

You will need to capture a USB trace from a working driver to get 
further. Sounds like the device needs a custom driver to function.


--HPS

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


Re: usb modem "Can't setup transfer"

2015-11-12 Thread Alfred Perlstein

Hans,

Thank you, that allows it to attach and the device nodes appear in /dev/

However I then can not seem to send any AT commands and get a response 
via either cu -l /dev/ttyU1 or cu -l /dev/ttyU1.


Any further steps?  Is there a way to virtually share this hardware with 
you?


-Alfred

On 11/12/15 12:31 AM, Hans Petter Selasky wrote:

On 11/11/15 20:51, Alfred Perlstein wrote:




Hi,

The device is very special in that it uses an interrupt type of 
endpoint for receiving the data.




  Endpoint 1
 bLength = 0x0007
 bDescriptorType = 0x0005
 bEndpointAddress = 0x0084  
 bmAttributes = 0x0003  
 wMaxPacketSize = 0x003f
 bInterval = 0x0002
 bRefresh = 0x
 bSynchAddress = 0x



In umodem.c you might want to change the USB matching filter to accept 
interrupt endpoints:



[UMODEM_BULK_RD] = {
.type = UE_BULK, // change this to UE_BULK_INTR
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_RX,


This change will break other modem drivers, but at least it will give 
some clues if it works or not.


--HPS



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


Re: usb modem "Can't setup transfer"

2015-11-12 Thread Hans Petter Selasky

On 11/11/15 20:51, Alfred Perlstein wrote:




Hi,

The device is very special in that it uses an interrupt type of endpoint 
for receiving the data.




  Endpoint 1
 bLength = 0x0007
 bDescriptorType = 0x0005
 bEndpointAddress = 0x0084  
 bmAttributes = 0x0003  
 wMaxPacketSize = 0x003f
 bInterval = 0x0002
 bRefresh = 0x
 bSynchAddress = 0x



In umodem.c you might want to change the USB matching filter to accept 
interrupt endpoints:



[UMODEM_BULK_RD] = {
.type = UE_BULK, // change this to UE_BULK_INTR
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_RX,


This change will break other modem drivers, but at least it will give 
some clues if it works or not.


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


Re: usb modem "Can't setup transfer"

2015-11-11 Thread Alfred Perlstein



On 11/11/15 12:36 AM, Hans Petter Selasky wrote:

On 11/11/15 04:37, Alfred Perlstein wrote:

Hello,

A friend gave me a usb modem recently.  The model is:
Multi-Tech Systems - Multi-Modem USB - MT5634ZBA

The Linux driver info is here:
ftp://ftp.multitech.com/usb/usb-linux2.txt

When I plug this device into FreeBSD I get a ugen0 device.

So I tried hacking into the driver itself:

diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c
index c1e8812..9886294 100644
--- a/sys/dev/usb/serial/umodem.c
+++ b/sys/dev/usb/serial/umodem.c
@@ -136,6 +136,7 @@ static const STRUCT_USB_HOST_ID 
umodem_host_devs[] = {

 {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)},
 {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)},
 {USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)},
+   {USB_VP(0x06e0, 0xf107)},
  };

  /*


Now I get the following:

Nov 10 19:19:54 spigot kernel: ugen3.3:  at
usbus3
Nov 10 19:19:54 spigot kernel: umodem0:  on
usbus3
Nov 10 19:19:54 spigot kernel: umodem0: data interface 1, has CM over
data, has no break
Nov 10 19:19:54 spigot kernel: umodem0: Can't setup transfer
Nov 10 19:19:54 spigot kernel: device_attach: umodem0 attach returned 6

I read the Linux driver and it seems pretty similar, although it does
look like they have a ton more quirks and edge cases the handle.  The
file in Linux I'm looking at is: linux/drivers/usb/class/cdc-acm.c (this
seems to make the most sense given the instructions given at
ftp://ftp.multitech.com/usb/usb-linux2.txt).

I tried turning on sysctl hw.usb.debug=10 however after doing so it
didn't seem to want to probe anymore.

Any ideas?

I can ship this modem to someone if they are interested and have a good
idea how to fix.


Hi,

Can you send the configuration descriptor dump:

usbconfig -d X.Y dump_device_desc dump_curr_config_desc

Maybe the modem fits into the U3G driver.

--HPS


Hans,

Moving it to u3g on -current gives nearly same error:
Nov 11 11:38:48 spigot kernel: u3g0:
Nov 11 11:38:48 spigot kernel:  on usbus3
Nov 11 11:38:49 spigot kernel: u3g0: no ports found
Nov 11 11:38:49 spigot kernel: device_attach: u3g0 attach returned 6
Nov 11 11:38:56 spigot kernel: ugen3.3:  at 
usbus3 (disconnected)

Nov 11 11:39:00 spigot kernel: ugen3.3:  at usbus3
Nov 11 11:39:00 spigot kernel: u3g0:  on usbus3
Nov 11 11:39:00 spigot kernel: u3g0: no ports found
Nov 11 11:39:00 spigot kernel: device_attach: u3g0 attach returned 6



Output from usbconfig is as follows:

/usr/home/alfred # usbconfig -d 3.3 dump_device_desc dump_curr_config_desc
ugen3.3:  at usbus3, cfg=0 
md=HOST spd=FULL (12Mbps) pwr=ON (400mA)


  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0100
  bDeviceClass = 0x0002  
  bDeviceSubClass = 0x
  bDeviceProtocol = 0x
  bMaxPacketSize0 = 0x0008
  idVendor = 0x06e0
  idProduct = 0xf107
  bcdDevice = 0x0100
  iManufacturer = 0x0001  
  iProduct = 0x0002  
  iSerialNumber = 0x  
  bNumConfigurations = 0x0002


 Configuration index 0

bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0029
bNumInterfaces = 0x0002
bConfigurationValue = 0x0001
iConfiguration = 0x0003  
bmAttributes = 0x00a0
bMaxPower = 0x00c8

Interface 0
  bLength = 0x0009
  bDescriptorType = 0x0004
  bInterfaceNumber = 0x
  bAlternateSetting = 0x
  bNumEndpoints = 0x
  bInterfaceClass = 0x00ff  
  bInterfaceSubClass = 0x00ff
  bInterfaceProtocol = 0x00ff
  iInterface = 0x0004  


Interface 1
  bLength = 0x0009
  bDescriptorType = 0x0004
  bInterfaceNumber = 0x0001
  bAlternateSetting = 0x
  bNumEndpoints = 0x0002
  bInterfaceClass = 0x00ff  
  bInterfaceSubClass = 0x00ff
  bInterfaceProtocol = 0x00ff
  iInterface = 0x0005  

 Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0002  
bmAttributes = 0x0002  
wMaxPacketSize = 0x0010
bInterval = 0x
bRefresh = 0x
bSynchAddress = 0x

 Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0084  
bmAttributes = 0x0003  
wMaxPacketSize = 0x003f
bInterval = 0x0002
bRefresh = 0x
bSynchAddress = 0x



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


Re: usb modem "Can't setup transfer"

2015-11-11 Thread Hans Petter Selasky

On 11/11/15 04:37, Alfred Perlstein wrote:

Hello,

A friend gave me a usb modem recently.  The model is:
Multi-Tech Systems - Multi-Modem USB - MT5634ZBA

The Linux driver info is here:
ftp://ftp.multitech.com/usb/usb-linux2.txt

When I plug this device into FreeBSD I get a ugen0 device.

So I tried hacking into the driver itself:

diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c
index c1e8812..9886294 100644
--- a/sys/dev/usb/serial/umodem.c
+++ b/sys/dev/usb/serial/umodem.c
@@ -136,6 +136,7 @@ static const STRUCT_USB_HOST_ID umodem_host_devs[] = {
 {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)},
 {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)},
 {USB_VPI(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_PC5740, 1)},
+   {USB_VP(0x06e0, 0xf107)},
  };

  /*


Now I get the following:

Nov 10 19:19:54 spigot kernel: ugen3.3:  at
usbus3
Nov 10 19:19:54 spigot kernel: umodem0:  on
usbus3
Nov 10 19:19:54 spigot kernel: umodem0: data interface 1, has CM over
data, has no break
Nov 10 19:19:54 spigot kernel: umodem0: Can't setup transfer
Nov 10 19:19:54 spigot kernel: device_attach: umodem0 attach returned 6

I read the Linux driver and it seems pretty similar, although it does
look like they have a ton more quirks and edge cases the handle.  The
file in Linux I'm looking at is: linux/drivers/usb/class/cdc-acm.c (this
seems to make the most sense given the instructions given at
ftp://ftp.multitech.com/usb/usb-linux2.txt).

I tried turning on sysctl hw.usb.debug=10 however after doing so it
didn't seem to want to probe anymore.

Any ideas?

I can ship this modem to someone if they are interested and have a good
idea how to fix.


Hi,

Can you send the configuration descriptor dump:

usbconfig -d X.Y dump_device_desc dump_curr_config_desc

Maybe the modem fits into the U3G driver.

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