Udev Rules
Udev rules create persistent device symlinks (e.g., /dev/pixhawk) so that the MRS system can reliably find connected hardware regardless of which USB port it's plugged into.
Why Udev Rules Matter
Without udev rules, a Pixhawk might appear as /dev/ttyACM0 one time and /dev/ttyACM1 the next, depending on the order devices are enumerated. Udev rules ensure the device is always accessible at a predictable path like /dev/pixhawk.
Setup via the Utility
The setup utility provides two options under menu option 5 (Udev rules):
5.1 Setup New Udev Rules File
You can get the required fields for a new udev rules file by running:
sudo dmesg -w
Then connect the device and look for lines indicating the device's vendor ID, product ID, and other attributes. Use this information to create a new udev rules file.
5.2 Add Udev Rules to an Existing File
Appends additional rules to an existing udev rules file. Use this when adding new sensors to an already-configured UAV.
Common Devices
The install_script repository includes example udev rules for common frames in subscripts/5Udev_rules/DISREGARD_udev_rules/:
| Frame | File |
|---|---|
| F330 | F330.rules |
| F450 | F450.rules |
| T650 | T650.rules |
| X500 | X500.rules |
These can be used as references when setting up rules for your specific UAV configuration.
Verifying Udev Rules
After adding/modifying rules, always run:
sudo udevadm control --reload-rules
sudo udevadm trigger
After setting up rules and connecting devices, verify they appear correctly:
# Check for pixhawk symlink (requires battery power)
ls /dev/pixhawk
# Check for other sensor symlinks
ls /dev/lidar
ls /dev/garmin
A quick check for the Pixhawk you can do sudo cat /dev/pixhawk to see if it responds (you should see some binary output if the Pixhawk is connected and powered). But a more thorough check is to run the uav_check script, which validates all hardware connections and configurations, including udev rules.
The /dev/pixhawk symlink will only be visible when the UAV is powered by a battery (not just USB). The uav_check script validates this, so make sure the UAV is battery-powered when running the check.