USB CAN adapters can appear as follows on Linux.
A can network device appears. e.g. can0, shown by ifconfig.
Set bitrate for NMEA2000 and bring up CAN interface:
ip link set can0 up type can bitrate 250000
It seems SignalK doesn't do this itself.
Some USB to CAN adapters may run a firmware that presents as a CDC-ACM serial port, e.g. CANable devices. slcand can talk to the devices over the virtual serial port and create a standard SocketCAN device, at which point you can continue the same as with a native SocketCAN adapter.
slcand -o -s5 /dev/ttyACMx
The -s arguments sets the CAN bus speed:
-s0 = 10k -s1 = 20k -s2 = 50k -s3 = 100k -s4 = 125k -s5 = 250k -s6 = 500k -s7 = 750k -s8 = 1M
Install Linux SocketCAN tools:
sudo apt install can-utils
Configure SocketCAN interface:
ip link set can0 up type can bitrate 250000
Use canboat analyzer tool:
candump can0 | candump2analyzer | analyzer
Can open SocketCAN interfaces, like can0
. Select Analyze → Decode As
, and in the last column of the table you can click to set it to J1939
. This will decode as far as giving you PGNs. I didn't find an NMEA2000 decoder, but this at least tells you data is flowing.
CANable is a USB - CAN interface using an STM32F072. CANable firmware does slcan. The same device can be flashed with candleLight firmware which does Linux native / SocketCAN. I bought a device from Aliexpress which came with candleLight.