# USB to RS485
- The following protocol applies to firmware V4.1 or later
- Send the AT+VER serial command to check the firmware version; if no version is returned or it shows V33, please update to the latest firmware
- The SANPO Motor Debug Tool can generate test code quickly and supports CAN/RS485 motors
## Protocol Overview
| Use Case | TX Protocol | RX Protocol |
| --- | --- | --- |
| RS485 motors, up to 64-byte frames | Motor data passthrough; last 4 bytes: Channel 1 byte + data length (1 byte) + tail 0x0D 0x0A | Motor feedback passthrough |
- The first two bytes of RS485 frames must not be the reserved headers 0x45 0x54, 0x41 0x54, or 0x53 0x54
### RS485 Frame Example
TX frame
| RS485 data passthrough (max 60 bytes) | Channel (1 byte) | Data length (1 byte) | Tail (2 bytes) |
| --- | --- | --- | --- |
| 0x22 0x33 0x00 0x53 0x54 0x00 0x53 0x54 0x00 0x53 0x54 0x00 0x53 0x54 0x00 0x53 0x54 | 0x00 | 0x11 | 0x0D 0x0A |
RX frame (motor feedback passthrough)
| RS485 feedback passthrough (max 60 bytes) |
| --- |
| 0x22 0x33 0x00 0x53 0x54 0x00 0x53 0x54 0x00 0x53 0x54 0x00 0x53 0x54 0x00 0x53 0x54 |
## Motor Debug Tools
- SANPO Motor Debug Tool supports CAN/RS485 motors
- Unitree motor tool: https://gitcode.com/sanpo/robot/tree/v4/tools/UnitreeMotor.zip
- Unitree usage guide: https://support.unitree.com/home/zh/Motor_SDK_Dev_Guide/Motor_debugging_assistant
## Examples
- USB to RS485 example (Python): Download
Example: send a sine motion command to a Unitree RS485 GO-M8010 motor (ID 1) on Windows COM9(Linux /dev/ttyACM0), RS485-2
```bash
Windows:
python3 usb2rs485_unitree_sine_demo_v4.py --port COM9 --motors 1 --channel 2
Ubuntu(Jetson):
sudo python3 usb2rs485_unitree_sine_demo_v4.py --port /dev/ttyACM0 --motors 1 --channel 2
```