Android Emteria ttyS0 permissions on boot
I wrote a small Delphi Pascal program to write and read on the Raspberry (PI3 B+) ttyS0 serial port. It works perfectly but on condition of enabling handwriting permissions by hand.
Using the "chmod 777 /dev/ttyS0" command from the Raspberry shell, in root mode, the serial is activated and my program starts working.
How can I have the ttyS0 serial automatically activated at boot without having to manually intervene each time? Where is it possible to intervene in the various configuration files and what should be written above?
I'm using Emteria 0.7 and 0.9 (the operation is the same).
Thank you all.
0
Comments
1) Simple & dirty solution: write your own init script (check /data/init.d for more details)
2) Proper & safe solution: call "su" in your application and reset the permissions after communication is finished (you can google specific examples)
If I understand it correctly, should I set the permissions directly from Pascal, calling "su" followed by chmod? Would you have an example, (also in other languages)?
Thanks in advance.