Re: usbserial issue

2012-08-13 Thread Guilherme Bedin
Hi,

 I discovered the problem. I am using Openwrt and I was missing the
module usb-serial-option.
Using it everything works fine. The device modules and parameters are
loaded and  ttyUSB*
are created.

Thanks for all the help,
Guilherme



On Fri, Jul 20, 2012 at 3:47 AM, Bjørn Mork bj...@mork.no wrote:
 Guilherme Bedin gbe...@gmail.com writes:

   Thanks for explanation on how things work.
 The problem is if I don't pass the vendor and prodId the 3g modem is
 detect as an USB mass storage. Even after using usb_modeswitch

 usb_modeswitch -default-vendor 0x19d2 -default-product 0×2000
 -target-vendor 0x19d2 -target-product 0×0031  -message-endpoint 0×01
 -message-content 555342431234567
 820008c85010101180101010101

 I am running on:
 Linux OpenWrt 3.3.8 #1 Mon Jul 9 20:09:35 MSK 2012 mips GNU/Linux

 With:

 Modem 3g

 D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
 P:  Vendor=19d2 ProdID=0031 Rev= 0.00

 That device was added to the option driver almost 3 years ago, so the
 driver support should be OK.  But you might be interested in this
 recent discussion of modeswitch problems with exactly that device:

  http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=951

 I suspect you are hit by the same problem, causing usb_modeswitch to
 switch the modem twice.

 All thanks to the genious in ZTE who is responsible for reusing the same
 device ID for switched and unswitched mode in different devices. So
 19d2:0031 is the target ID for some devices like yours, but it is the
 default unswitched ID for others... Thank you, ZTE.  That's just brilliant.

 But anyway, try upgrading to the latest usb_modeswitch_data.  If that
 doesn't work, enable usb_modeswitch logging to verify that the problem
 really is double switching.  Then look at
 /lib/udev/rules.d/40-usb_modeswitch.rules
 and see if it's possible to tweak the rules to avoid this.

 Or just create an empty 19d2:0031 config to disable the second switch.
 But that is only a local workaround, since there are devices with this
 ID shich need switching.


 Bjørn
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


usbserial issue

2012-07-19 Thread Guilherme Bedin
Hi,

  I am playing with some devices and seems to me that I stuck with
a driver limitation. I connected  usb-to-rs323/485 converter
that uses ftdi_sio and usbserial modules and it works. After that
I tried to use a 3g modem and it works passing vendor and product
parameters to the usbserial module. But if I try to use both
devices together just one works.
Looking the documentation seems to me that the usbserial is made
to suport just one device, is this true?

I will try to recompile the usbserial module with another name to load
it 2 times with different parameters.
Is there something that will prevent this idea to work ?

Thanks,
Guilherme
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usbserial issue

2012-07-19 Thread Guilherme Bedin
Hi,

  Thanks for explanation on how things work.
The problem is if I don't pass the vendor and prodId the 3g modem is
detect as an USB mass storage. Even after using usb_modeswitch

usb_modeswitch -default-vendor 0x19d2 -default-product 0×2000
-target-vendor 0x19d2 -target-product 0×0031  -message-endpoint 0×01
-message-content 555342431234567
820008c85010101180101010101

I am running on:
Linux OpenWrt 3.3.8 #1 Mon Jul 9 20:09:35 MSK 2012 mips GNU/Linux

With:

Modem 3g

D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=0031 Rev= 0.00
S:  Manufacturer=ZTE,Incorporated
S:  Product=ZTE WCDMA Technologies MSM
S:  SerialNumber=P671A1VIVD01

[282646.03] usb 1-1.4: new high-speed USB device number 18 using
ehci-platform
[282646.17] scsi6 : usb-storage 1-1.4:1.2
[282647.17] scsi 6:0:0:0: Direct-Access ZTE  MMC Storage
   2.31 PQ: 0 ANSI: 2
[282647.19] sd 6:0:0:0: [sdb] Attached SCSI removable disk


[282719.88] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[282719.88] usb 1-1.3: Detected FT232BM
[282719.89] usb 1-1.3: Number of endpoints 2
[282719.89] usb 1-1.3: Endpoint 1 MaxPacketSize 16384
[282719.90] usb 1-1.3: Endpoint 2 MaxPacketSize 16384
[282719.90] usb 1-1.3: Setting MaxPacketSize 64
[282719.92] usb 1-1.3: FTDI USB Serial Device converter now
attached to ttyUSB0


rs485 USB-Serial
D:  Ver= 1.10 Cls=00(ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 4.00
S:  Manufacturer=FTDI
S:  Product=USB - Serial


Any suggestions are welcome.

Thanks,
Guilherme

On Thu, Jul 19, 2012 at 5:55 PM, Greg KH gre...@linuxfoundation.org wrote:
 On Thu, Jul 19, 2012 at 04:37:17PM -0300, Guilherme Bedin wrote:
 Hi,

   I am playing with some devices and seems to me that I stuck with
 a driver limitation. I connected  usb-to-rs323/485 converter
 that uses ftdi_sio and usbserial modules and it works. After that
 I tried to use a 3g modem and it works passing vendor and product
 parameters to the usbserial module.

 Ah, you shouldn't be passing any vendor ids to the module, that's the
 problem here.  The individual drivers should be handling this device,
 not the generic usb serial driver.

 What kernel version are you using?  What is the vendor/product id of
 your 3g modem and your ftdi_sio device?

 But if I try to use both
 devices together just one works.
 Looking the documentation seems to me that the usbserial is made
 to suport just one device, is this true?

 Yes, it is ment to support only one generic device, that is true.

 I will try to recompile the usbserial module with another name to load
 it 2 times with different parameters.
 Is there something that will prevent this idea to work ?

 If it works, your device throughput will be very slow.  Use the real
 drivers for your usb-serial devices instead (ftdi_sio and probably the
 option driver).

 thanks,

 greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html