Although the can-utils package is available in Linux to interact with CAN network devices, I am trying to confirm if tcpdump can print just hex format when reading CAN packets without including ASCII characters?
tcpdump version 4.2.1 libpcap version 1.1.1
The only work around was I found was to direct the tcpdump output to a file then read from said file using a util like hexdump, xxd, or OD, etc.
The upper left screen is based on the script below:
# tcpdump -ivcan0 -s0 -x -w - -s0 -l > canpackets.hex & tail -f canpackets.hex | hexdump -vC
The upper right screen represents the tcpdump output using (-x) without redirecting to hexdump; which still prints ASCII.
The bottom left screen is candump; which is here just to illustrate the hex values that are generated by the cangen util in the bottom right screen.
while :; do ./cansend vcan0 001#1122334455667788; sleep .25; done