Set up port permissions on boot - robotique-udes/zeus_rover GitHub Wiki

Set up serial port permissions

To setup the permissions, the zeus user needs to be added to the dialout group.

sudo gpasswd --add ${USER} dialout

Enable SPI devices on boot

  1. Create a new service file

    sudo nano /etc/systemd/system/port_permission.service
    
  2. In the file, copy the following inside the file: (If its for the arm change the root to /home/zeus/catkin_ws/src/zeus_arm/port_permission.sh)

    [Unit]
    Description=Port permission for the GPS.
    
    [Service]
    Type=simple
    ExecStart=/bin/bash /home/zeus/catkin_ws/src/zeus_rover/port_permission.sh
    
    [Install]
    WantedBy=multi-user.target
    

    Save and exit.

  3. Enable the service

    sudo systemctl enable port_permission.service
    

    Reboot