Re: FTDI driver in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



16.10.2014 14:02, Johan Hovold пишет:
On Thu, Oct 16, 2014 at 12:47:05PM +0400, Victor Ashik wrote:
  Wed, Oct 15, 2014 at 6:00 PM, Johan Hovold <johan@xxxxxxxxxx> wrote:

No, we're still supposed to support the legacy SIO type of devices,
although that code doesn't get much testing I'm afraid.

But let's start with verifying that the type is actually detected.

Could you post the kernel log from when plugging the device in along
with the "lsusb -v" output for it?

[83986.455025] usb 1-1.2: New USB device found, idVendor=0403,
idProduct=8372
[83986.455029] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[83986.455031] usb 1-1.2: Product: USB Serial Converter
[83986.455032] usb 1-1.2: Manufacturer: FTDI
[83986.455033] usb 1-1.2: SerialNumber: FT00026B
[83986.472948] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[83986.472972] usb 1-1.2: Detected SIO

So the type is indeed detected correctly.

[83986.472974] usb 1-1.2: Number of endpoints 2
[83986.472975] usb 1-1.2: Endpoint 1 MaxPacketSize 64
[83986.472976] usb 1-1.2: Endpoint 2 MaxPacketSize 64
[83986.472977] usb 1-1.2: Setting MaxPacketSize 64
[83986.473150] ftdi_sio ttyUSB0: Unable to read latency timer: -32
[83986.473626] ftdi_sio ttyUSB0: Unable to write latency timer: -32
[83986.473673] usb 1-1.2: FTDI USB Serial Device converter now attached to
ttyUSB0

Are you able to verify if rx or tx works separately, e.g. by connecting
to a working serial port and setting up two terminal sessions? Remember
to try with flow control disabled on both ends as well.

Also could you post a log from when opening, reading/writing and closing
the device? Make sure to enable debugging in usb-serial core as well.
Using echo and cat (e.g. echo hello >/dev/ttyUSB0) can suffice as
long the port has been properly set up.

I captured a data exchange between NetBSD and a modem via USB, on NetBSD I issued commands:

cu -l /dev/ttyUSB0 -s 38400
AT+FCLASS?

and got a resonse:

0

OK

Here is a hex dump of a packet with letter A from host to a device:

0000   c0 03 12 06 01 88 ff ff 53 03 02 0c 01 00 2d 00  ........S.....-.
0010   95 a1 3f 54 00 00 00 00 2a f4 0d 00 8d ff ff ff  ..?T....*.......
0020   02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0040   05 41                                            .A

This is an echoed A back from the modem:

0000   c0 03 12 06 01 88 ff ff 43 03 82 0c 01 00 2d 00  ........C.....-.
0010   95 a1 3f 54 00 00 00 00 2a 91 0e 00 00 00 00 00  ..?T....*.......
0020   03 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00  ................
0030   00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00  ................
0040   31 60 41                                         1`A

Please check the capture file attached.
Hope this helps.

Attachment: netbsd-modem-AT+FCLASS.pcapng
Description: application/pcapng


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux