This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pypilot, signalk and USB
#12
(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!
Reply


Messages In This Thread
Pypilot, signalk and USB - by tonym - 2021-08-19, 05:15 PM
RE: Pypilot, signalk and USB - by seandepagnier - 2021-08-19, 07:47 PM
RE: Pypilot, signalk and USB - by tonym - 2021-08-19, 07:52 PM
RE: Pypilot, signalk and USB - by ironman - 2021-08-21, 11:57 AM
RE: Pypilot, signalk and USB - by tonym - 2021-09-26, 11:56 PM
RE: Pypilot, signalk and USB - by aardvarkash10 - 2021-11-04, 06:10 AM
RE: Pypilot, signalk and USB - by seandepagnier - 2021-08-20, 09:27 PM
RE: Pypilot, signalk and USB - by tonym - 2021-08-20, 10:40 PM
RE: Pypilot, signalk and USB - by seandepagnier - 2021-08-21, 01:16 AM
RE: Pypilot, signalk and USB - by seandepagnier - 2021-11-04, 06:37 AM
RE: Pypilot, signalk and USB - by aardvarkash10 - 2021-11-04, 08:29 AM
RE: Pypilot, signalk and USB - by ironman - 2021-11-04, 01:18 PM
RE: Pypilot, signalk and USB - by aardvarkash10 - 2021-11-04, 08:51 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)