I have a cRIO-9068 running LV Linux RT. I have a USB sensor that Linux detects and assigns to /dev/ttyACM0. I cannot read from the device until after I SSH into the 9068 and change the file priviledges using,
chmod 777 /dev/ttyACM0
If I reboot the cRIO or pull the sensor out and replug it back in the permissions are lost.
How can I force NI's Linux RT to always give the LV code permissions to this file? I tried the System Exec.vi but it failed with an error indicating that I did not have permissions to complete the operation. I have modified the system so 'lvuser' has ADMIN rights but that didn't make a difference.
I tried the steps found here: http://ubuntuforums.org/showthread.php?t=1201978
This did not work.
Even if it did... it doesn't appear to be a long term solution as the beginning of the file states,
# do not edit this file, it will be overwritten on update
I'm looking into this and will try and post anything that I find tomorrow.
I've looked into it and haven't been able to find a many resources. I would recommend emailing into email@example.com and creating a service request so that your question can be escalated and researched further. If you do create a service request, reference this forum post so they can see the methods you've tried so far.
Here is the answer I got from NI tech support
How Do I Access the Shell on a NI Linux Real-Time OS Device? http://digital.ni.com/public.nsf/allkb/9822A3A39B1D0CBB86257C55006B962A (Please follow the instructions on the section “Connecting with SSH”). We recommend to use a tool named putty: http://www.putty.org/ As soon as you get in the shell please follow this instructions 1- Navigate to the folder /etc/udev/rules.d You can do that using the following command: cd /etc/udev/rules.d 2- Once you are in that folder you must edit the file named: 70-usb-serialpermissions.rules You can modified with VI editor (I am including a guide on how to use it: https://www.washington.edu/computing/unix/vi.html ) 3- The File had the following text: SUBSYSTEM=="tty", KERNEL=="ttyUSB*", GROUP="tty", MODE="0666" You have to modified the KERNEL value to "ttyACM[0-9]*" and it should look like this: SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", GROUP="tty", MODE="0666"
This worked for LVRT 2014SP1. However, when I upgraded to LVRT 2015SP1 it wasn't working anymore... I noticed that the file name "70-usb-serialpermissions.rules" changed to "70-usb-serial-permissions.rules". Since this was an upgrade I now had both "70-usb-serialpermissions.rules" and "70-usb-serial-permissions.rules" in the /etc/udev/rules.d folder. I renamed "70-usb-serialpermissions.rules" to "___70-usb-serialpermissions.rules" and rebooted.
Things seem to be working now...