(2021-11-04, 08:29 AM)aardvarkash10 Wrote: This - "~/.pypilot" means nothing to me. I am a complete, rank beginner in linux, and the last time I wrote any code it was on portapunch FORTRAN cards at school in the 1970s.
What I actually need is for someone to take me through it, step by step, command by command, line by line.
~/ is unix speak for the home directory of the account you are logged into. So if you are logged in as user pi, this is the home directory of user pi. Typically, and on openplotter this is the case, this is the directory /home/pi/. You can go to your home directory by simply typing cd <enter>. You will see a ~ appear in your prompt, so you know you are in your home directory. If you want to know exactly where you are, you can type pwd (print working directory) and you know for sure:
Quote:pi@openplotter:/etc $ cd
pi@openplotter:~ $ pwd
/home/pi
pi@openplotter:~ $
Now .pypilot is a directory within /home/pi/. You will notice that it starts with a dot. In unix, this means the directory is hidden. If a directory, or any file, starts with a dot, you won't normally see it. So if you type 'ls' (list files and directories) this directory will not be visible. However, if you type 'ls -a', you will see it, along with a whole lot of very important rubbish. And you can go to it with cd:
Quote:pi@openplotter:~ $ ls
Desktop Documents Downloads Music Pictures Public pypilot pypilot_pi RTIMULib.ini Templates Videos
pi@openplotter:~ $ ls -a
. .bash_history .bashrc .config Desktop Downloads .local .npm .openplotter .pki Public pypilot RTIMULib.ini Templates .vnc .xsession-errors .bash_logout .cache .cups Documents .gnupg Music .opencpn Pictures .profile .pypilot pypilot_pi .signalk Videos .Xauthority .xsession-errors.old
pi@openplotter:~ $ cd .pypilot
pi@openplotter:~/.pypilot $ ls
persist_fail pypilot_client.conf pypilot.conf pypilot.conf.bak RTIMULib.ini servodevice signalk-token
Now to create a text file on linux, the text file editor for newbies (equivalent to notepad.exe on windows) would be 'nano'. So to edit a file called ~/.pypilot/blacklist_serial_ports, you would type nano ~/.pypilot/blacklist_serial_ports. Type the device name you want to block, e.g. /dev/ttyUSB0 (mind the correct case), then type CTRL-X and Yes to save the file. Restart pypilot and see what happens.
Now you won't see any useful logging if you run pypilot from the openplotter tool. If a car does not start, you have to look under the bonnet. Better is to disable pypilot in the openplotter tool, and then run it at the prompt. You will then see all the information that will help people here to help you!