UDS Sample

This sample can be used to test the uds implementation draft. The UDS implementation does not support all the services yet, but it is a good starting point. The mainly supported use case is the firmware update.

Test with virtual CAN on posix

  1. Add virtual can

    sudo ip link add dev vcan0 type vcan
    sudo ip link set vcan0 mtu 72
    sudo ip link set up vcan0
    sudo ip link property add dev vcan0 altname zcan0
    
  2. Build for native sim and run

    west build\
        --pristine always\
        --board native_sim_64\
        samples/uds
    
    ./build/zephyr/zephyr.exe
    
  3. Run test client in another terminal

    python samples/uds/scripts/test.py
    

Test with board

  1. Enable can interface

    sudo ip link set can0 type can bitrate 500000
    sudo ip link set up can0