Closed hongyi-zhao closed 3 years ago
The connection method I mentioned above is suggested by the chassis vendor. OTOH, I don't have the device you told here.
There are two issues here:
Currently, tcpdump can't do the first of those except with an RS-232 to Ethernet converter. Changing that would need support in libpcap, with a libpcap module that can read from the converter.
Changing the latter would require tcpdump dissector support for whatever formats are produced by the converters in question. I doubt that what CAN support is in tcpdump can handle the various forms of RS-232 to Ethernet supported by the converters, so that would require tcpdump changes.
What RS-232 to USB converter are you using?
Changing the latter would require tcpdump dissector support for whatever formats are produced by the converters in question. I doubt that what CAN support is in tcpdump can handle the various forms of RS-232 to Ethernet supported by the converters, so that would require tcpdump changes.
It seems wireshark can do this job. See the following for more info:
https://wiki.wireshark.org/CaptureSetup/USB https://www.wireshark.org/docs/dfref/u/usb.html
What RS-232 to USB converter are you using?
IMO, it's only a converter. Are there different kinds of such converters?
It seems wireshark can do this job.
What Wireshark can do is capture raw USB traffic and dissect it. How useful that would be for dissecting USB-to-serial traffic is another matter - there does not appear to be any code path in Wireshark to hand the data on USB to any CAN dissector.
Are there different kinds of such converters?
To quote the Wikipedia "USB adapter" page:
For the computer to be able to detect and process the data signals drivers must be installed on the computer. Some chip models have drivers installed by default, including FTDI, while drivers for other chip models must be manually installed (e.g. for Windows and MacOS, WCH CH340, Silicon Labs 210x.
The requirement for a driver seems to indicate that not all adapters use the same protocol over USB to encapsulate serial data.
... not all adapters use the same protocol over USB to encapsulate serial data.
Some converters (like the one from eBay above) uses MQTT which should be simple to decode.
I try to debug a driverless vehicle chassis with its CAN interface connected to a computer via an RS-232 to USB converter. Can tcpdump be used as a serial port debugger for this scenario?
Regards, HY