DJI pupper /dev/ttyACM0 error

49 views
Skip to first unread message

Mr Robot

unread,
Dec 10, 2022, 8:51:40 AM12/10/22
to Stanford Quadrupeds
Hi there,

I am building the DJI Pupper. When I enter "sudo systemctl status robot" on the raspberry pi. I get 

serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'

Any ideas how to fix this? Is this related to the FrSky module or to the Teensy?

Thanks,

Felix

the full output of the raspberry is:
pi@raspberrypi:~ $ sudo systemctl enable --now robot
pi@raspberrypi:~ $ sudo systemctl status robot
● robot.service - Robot control service
   Loaded: loaded (/etc/systemd/system/robot.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2022-12-10 13:46:32 GMT; 7s ago
  Process: 902 ExecStart=/usr/bin/python3 /home/pi/StanfordQuadruped/run_djipupper.py (code=exited, status=1/FAILURE)
 Main PID: 902 (code=exited, status=1/FAILURE)

Dec 10 13:46:32 raspberrypi python3[902]:     hardware_interface = HardwareInterface.HardwareInterface(port=SERIAL_PORT)
Dec 10 13:46:32 raspberrypi python3[902]:   File "/home/pi/StanfordQuadruped/djipupper/HardwareInterface.py", line 73, in __init__
Dec 10 13:46:32 raspberrypi python3[902]:     timeout=0,
Dec 10 13:46:32 raspberrypi python3[902]:   File "/home/pi/.local/lib/python3.7/site-packages/serial/serialutil.py", line 240, in __init__
Dec 10 13:46:32 raspberrypi python3[902]:     self.open()
Dec 10 13:46:32 raspberrypi python3[902]:   File "/home/pi/.local/lib/python3.7/site-packages/serial/serialposix.py", line 268, in open
Dec 10 13:46:32 raspberrypi python3[902]:     raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
Dec 10 13:46:32 raspberrypi python3[902]: serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
Dec 10 13:46:32 raspberrypi systemd[1]: robot.service: Main process exited, code=exited, status=1/FAILURE
Dec 10 13:46:32 raspberrypi systemd[1]: robot.service: Failed with result 'exit-code'.

Nathan

unread,
Dec 10, 2022, 10:37:48 PM12/10/22
to Stanford Quadrupeds
Yeah that's related to the Teensy (https://github.com/stanfordroboticsclub/StanfordQuadruped/blob/01a30454c22dfc454d2e976b9146204be1b44186/djipupper/HardwareInterface.py#L67). There could be a few issues 1) Teensy is dead 2) bad cable 3) /dev/ttyACM0 is not the right serial address for the teensy. You can find the correct serial address for the Teensy by executing in terminal a) ls /dev/tty* or b) python -m serial.tools.list_ports

Mr Robot

unread,
Dec 11, 2022, 12:44:17 PM12/11/22
to Stanford Quadrupeds
It turned out to be the cable, thanks!
Reply all
Reply to author
Forward
0 new messages