command processor for automotive ECUs with a built-in text-based CAN bus terminal (using a panda)
note that most vehicles with a gateway block the required addresses, so you need a direct communication line for any of this to work
Currently supported:
Honda Accord 2018+ EPS connector:
Tesla AP1 EPAS connector:
pip install -r requirements.txt
sudo ln -s $(pwd)/cansh /usr/local/bin/
cansh --scan
Honda Accord 2018+ EPS
export CANTERM_ENABLE_TX_ADDR=1882
export CANTERM_ENABLE_RX_ADDR=1883
export CANTERM_COMMAND_TX_ADDR=1834
export CANTERM_COMMAND_RX_ADDR=1835
Tesla Pre-AP/AP1 EPAS
export CANTERM_ENABLE_TX_ADDR=1634
export CANTERM_ENABLE_RX_ADDR=1635
export CANTERM_COMMAND_TX_ADDR=1636
export CANTERM_COMMAND_RX_ADDR=1637
export CANTERM_FACTORY_MODE_BYPASS=1
# assumes environment variables are set up
cansh
# type 'help' to see available commands and 'exit' to quit
or (without environment variables)
# insert appropriate address (decimal) before running below commands
cansh --enable-tx-addr <enable-tx-addr> --enable-rx-addr <enable-rx-addr> --command-tx-addr <command-tx-addr> --command-rx-addr <command-rx-addr>
# type 'help' to see available commands and 'exit' to quit
# assumes environment variables are set up
cansh -c 'rd 0x00000000 1'
# assumes environment variables are set up
echo 'rd 0x00000000 1' | cansh
execute script example.sh (multi-command)
# assumes environment variables are set up
./example.sh
or
# assumes environment variables are set up
cansh ./example.sh
- additional ECUs with a CAN terminal most likely exist, write support and submit a PR!
- a good shell supports variables, conditional branch logic and looping constructs
- additional hardware support