Skip to main content

Best Practices: Troubleshooting

CAN Communication Errors

”socketcan write failed: No buffer space available (os error 105)”

Cause: CAN TX buffer overflow - sending too many messages too fast. Solutions:
  1. Increase control period:
  2. Increase TX queue length:
  3. Stop other CAN senders:
  4. Reduce feedback request frequency:

“CAN interface not found”

Cause: CAN interface not configured or not up. Solutions:

“Permission denied on /dev/ttyACM0”

Cause: User doesn’t have permission to access serial port. Solutions:

Motor Response Issues

”state = None”

Cause: No feedback frame received yet. Solutions:
Check:
  • Motor powered on
  • CAN wiring correct (CAN_H, CAN_L)
  • Correct motor_id and feedback_id
  • Bitrate matches motor configuration

”Mode switch timeout”

Cause: Motor not responding to mode change command. Solutions:
  1. Verify motor ID:
  2. Check motor status:
  3. Clear errors first:
  4. Increase timeout:

“Motor not moving”

Cause: Motor disabled, wrong mode, or command not being sent. Checklist:

Error Code Reference

Damiao Status Codes

Handling Errors

Import Errors

”ImportError: cannot import name ‘Controller’”

Cause: Package not installed or ABI library missing. Solutions:

“AbiLoadError: Failed to load libmotor_abi”

Cause: ABI shared library not found or incompatible. Solutions:

Performance Issues

High CPU Usage

Causes & Solutions:
  1. Tight loop without sleep:
  2. Excessive polling:

Inconsistent Timing

Solutions:

Debugging Tips

Enable Verbose Logging

Check CAN Traffic

Test with CLI

Isolate Problem

Getting Help

If issues persist:
  1. Check documentation:
  2. Gather information:
  3. Report issue with:
    • Full error message
    • Code snippet
    • System information
    • CAN configuration

Next Steps