I want to control (sniff) the traffic of my / dev / ttyUSB 0, which is created by FTDI USB Serial Converter. I wrote my application on Windows, and now I'm trying to connect it to Linux and use / dev / tty / USB 0. I want to debug the message that is actually happening.
Software strace is not an option for me, because it only shows syscalls for ioctl.
Using Windows, the "Free Serial Port Monitor" program did this by sniffing at COM1.
Dmesg output:
[16975.000221] usb 7-1: new full-speed USB device number 5 using uhci_hcd
[16975.193543] usb 7-1: New USB device found, idVendor=0403, idProduct=6001
[16975.193548] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[16975.193552] usb 7-1: Product: FT232R USB UART
[16975.193555] usb 7-1: Manufacturer: FTDI
[16975.193558] usb 7-1: SerialNumber: A400BJII
[16975.200550] ftdi_sio 7-1:1.0: FTDI USB Serial Device converter detected
[16975.200599] usb 7-1: Detected FT232RL
[16975.202604] usb 7-1: FTDI USB Serial Device converter now attached to ttyUSB0
However, I tried moserial to do this and the "echo foobar> / dev / ttyUSB0" command to check if it works. Also my software does not generate output for moserial.
UPDATE:
, USB, USB- RS-232 ( FTDI).
usbmon
modprobe usbmon
1.1 Linux 2.6.23
modprobe -t debugfs none/sys/kernel/debug
usbmon0 usbmon0 usbmonX
2.1. USB
cat/sys/kernel/debug/usb/devices | grep FTDI -A 7 -B 4
T: Bus=07 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 12 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0403 ProdID=6001 Rev= 6.00
S: Manufacturer=FTDI
S: Product=FT232R USB UART
S: SerialNumber=A400BJII
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
2,2. . (Bus = 07), usbmon usbmon7
2,3. wirehark usbmon7 (stdout)...
cat/sys/kernel/debug/usb/usbmon/7u
'u'?
https://www.kernel.org/doc/Documentation/usb/usbmon.txt
: "1 " "1u". "1t" 2.6.21. "1u" , ISO, .. , "1 ".
USB RS-232?
... TODO