Has anyone forked the socketCan particle firmware to use TCP server/client instead of just serial?
I'm trying to use the can utils with my photon, but I don't want to do it via serial port. I would prefer to do it via TCP socket. I say this because I only have a Mac and it seems the can-utils is not supported. Instead I'm doing my work on a linux server I have inside my house. I've got the socketCAN firmware updated to support TCP server client that I believe is working. Specifically, I have a 2nd firmware version that does not do socketCAN, but just a pure CAN implementation that is a one way device: it sends all CAN messages seen over the TCP connection to a listening client.
I believe my blocking issue is somewhere on the client side. socketCAN uses UNIX sockets, not TCP sockets. To fix this, I'm using "socat UNIX_LISTEN:/tmp/socket-can,fork TCP::" to create a local machine socket that is hooked to the TCP socket of the photon server. Running "nc -U /tmp/socket-can" shows me all the CAN traffic, so that works.
However, when I do "candump /tmp/socket-can" I get the message "SIOCGIFINDEX: No such device". Hmm. Carloop socketCAN docs say for the serial method, one must run slcand to create the proper unix device, so I run "slcand -o -c -s 4 /tmp/socket-can can0" but I don't think that worked because "ip addr" shows no can0 device. I'm not sure what's wrong here.
My top level goal is to be able to run cansniffer to help me filter out a lot of noise on the CAN IHS bus so I can figure out what the unlock and lock codes are for my 2018 ram 2500. I'm also hoping the remote start/stop can be triggered over this bus with the right message.
I thought about forking the cansniffer code to add support for a TCP socket, but my C coding skills are quite old (damn you pointers) and I'm not sure I can hack it without getting lost in the code.