initdev_mini_imu.sh 405 B

123456789101112
  1. #!/bin/bash
  2. echo "Remap the mini imu device serial port(/dev/ttyUSB*) to /dev/mini_imu ..."
  3. echo 'KERNEL=="ttyUSB*", SUBSYSTEMS=="usb",ATTRS{idVendor}=="1a86",ATTRS{idProduct}=="7523",SYMLINK+="mini_imu"' > /etc/udev/rules.d/mini_imu_board.rules # Mini_Imu
  4. service udev reload
  5. sleep 2
  6. service udev restart
  7. echo "Add current user to dialout groups ..."
  8. sudo usermod -a -G dialout $USER
  9. echo "finish !"