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
#1
Hi all,

This is all rather new to me and I'm wondering if I need to do anything special to stop the following.

Basically, I insert an Actisense NGT1 (N2k to USB) into any port on the PI 4, give it an alias in Serial then add it to signalK. SignalK sees it ok and I can see the data from my N2k AIS system quite happily. However, the minute I add Pypilot into the equation, all data from the NGT stops flowing.

Ive been through all the options I can think of but it seems that when the pypilot service is running, signalK gets no data from the NGT and often reports that it can connect to the USB port because its busy. To me this implies that pypilot is pinching the port before signalk manages to connect to it.

How do I stop this happening? ANyone know?

I should point out I'm not particularly linux wise, so please be gentle.

System is a RPI 4B 8gb
Openplotter 2.81
IMU 9255 connected via Pypilot.

N2K system has Airmar DST800, Garmin AIS 600 and a simrad TP22 tillerpilot, when its all connected. Data all flows nicely in Actisense NMEA reader when NGT1 is plugged into windoze.


Strikes me that I need to stop pypilot connecting to the USB and taking its data from sigk.
Reply
#2
You need to prevent pypilot from trying to access the serial port. Pypilot is looking for motor controllers and nmea0183 devices.

Simply add the device to:
~/.pypilot/blacklist_serial_ports

Otherwise add only the serial ports pypilot should use to
~/.pypilot/serial_ports

if neither file exists, pypilot will probe all available ports.
Reply
#3
(2021-08-19, 07:47 PM)seandepagnier Wrote: You need to prevent pypilot from trying to access the serial port.   Pypilot is looking for motor controllers and nmea0193 devices.

Simply add the device to:
~/.pypilot/blacklist_serial_ports

Otherwise add only the serial ports pypilot should use to
~/.pypilot/serial_ports

if neither file exists, pypilot will probe all available ports.

Hi Sean and thanks for the reply.

would that need to be in the full path format I.e /dev/ttyusb0, 
just the name i.e ttyusb0

Sorry if I appear dumb here.

Tony M
Reply
#4
put the full path, and ensure the correct case, eg:

/dev/ttyUSB0
not
/dev/ttyusb0

it should work the the alias as well such as /dev/ttyOP_n2k or whatever.
Reply
#5
Thanks again @seandepagnier

works a treat when you know what you're doing.

Smile

Regards Tony M
Reply
#6
If you have any suggestions for how to make this easier (even if difficult to implement) please continue the discussion.

For example, maybe somehow pypilot could detect the device is n2k and automatically do this. Or somehow negotiate with signalk-node server (did you configure the port there?) to see which ports not to grab?

It is somewhat difficult because maybe later in the future another device which actually is intended to be used by pypilot is plugged in, and has the exact same device signature of this one. So dmesg output of your device would be helpful it would give me some hints. I do not use n2k and I am biased against it, so have no intention of directly supporting it, or using such hardware, but I would like things to work more smoothly and accept signalk as an intermediate for conversion.
Reply
#7
(2021-08-19, 07:47 PM)seandepagnier Wrote: You need to prevent pypilot from trying to access the serial port.   Pypilot is looking for motor controllers and nmea0193 devices.

Simply add the device to:
~/.pypilot/blacklist_serial_ports

Otherwise add only the serial ports pypilot should use to
~/.pypilot/serial_ports

if neither file exists, pypilot will probe all available ports.

I updated the Workbook with this information.

https://github.com/pypilot/workbook/wiki...onnections
Reply
#8
(2021-08-21, 11:57 AM)ironman Wrote:
(2021-08-19, 07:47 PM)seandepagnier Wrote: You need to prevent pypilot from trying to access the serial port.   Pypilot is looking for motor controllers and nmea0193 devices.

Simply add the device to:
~/.pypilot/blacklist_serial_ports

Otherwise add only the serial ports pypilot should use to
~/.pypilot/serial_ports

if neither file exists, pypilot will probe all available ports.

I updated the Workbook with this information.

https://github.com/pypilot/workbook/wiki...onnections

Sean,

I'd be more than happy to provide you with  all the information you need, once the boat is afloat and doing what it shoud be. At the moment I'm still building the system and finding my way around raspberry/openplotter et al.
( in amongst all the other jobs I have on my list.).

Tony.
29ft Sadler 29 "Pleinair"

based on the east coast of England.
Reply
#9
(2021-09-26, 11:56 PM)tonym Wrote:
(2021-08-21, 11:57 AM)ironman Wrote:
(2021-08-19, 07:47 PM)seandepagnier Wrote: You need to prevent pypilot from trying to access the serial port.   Pypilot is looking for motor controllers and nmea0193 devices.

Simply add the device to:
~/.pypilot/blacklist_serial_ports

Otherwise add only the serial ports pypilot should use to
~/.pypilot/serial_ports

if neither file exists, pypilot will probe all available ports.

I updated the Workbook with this information.

https://github.com/pypilot/workbook/wiki...onnections

Sean,

I'd be more than happy to provide you with  all the information you need, once the boat is afloat and doing what it shoud be. At the moment I'm still building the system and finding my way around raspberry/openplotter et al.
( in amongst all the other jobs I have on my list.).

Tony.
29ft Sadler 29 "Pleinair"

based on the east coast of England.
Hi Tony and others - I have run into exactly this problem with pypilot probing usb connections.  

While I understand conceptually what is going on and what the fix is, I am a complete RPi and linux newbee and command line etc is greek to me.  I'm learning, but its a battle.

Are you able to give me a step-by-step of how to access the relevant directory and file to write the "blacklist" line into the config?  Preferably using really short and simple words like I'm a 5 year old.

Thanks!
Reply
#10
it is in the ~/.pypilot directory a file named serial_ports or a file blacklist_serial_ports

What specifically is the program conflicting? I will like to build logic in the future to help negotiate these issues if possible.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)