OpenMarine

Full Version: Daisy hat and openplotter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have an updated openplotter install on a raspberry pi4. Everything seems to be working with the exception of the daisy hat that is connected to the pi gpio. I've followed the guide on how to install the daisy hat from wegmatt: https://wegmatt.com/files/dAISy%20HAT%20...kstart.pdf

Then, I go to the openplotter-serial utilitiy, setup an alias for the daisy and add the connection to signalk. But the ais data does not show up in signalk, but shows following error: "PM: error: permission denied, cannot open /dev/ttyOP_ais" and status is "not connected (retry delay 86s)"

Just for a test, I tried to add the daisy directly within opencpn with following error message:

"The device selected is not accessible; opencpn will likely not be able

to use this device as-is. You might want to exit openvpn, reboot and
retry after creating a file called /etc/udev/rules.d/70-openvpn.rules
with the following content:

KERNEL=="ttyUSB", MODE="0666"
KERNEL=="ttyACM*", MODE="066"
KERNEL=="ttyS*", MODE="0666"

For more info, see the file LINUX_DEVICES.md in the distribution docs.
"

I'm pretty sure the daisy is connected correctly, because if I do a sudo cat /dev/serial0 from terminal I actually see !AIVDM sentences. However if I remove the sudo, I get a permission denied. So I'm suspecting that signalk does not have permissions to the serial connection? Or maybe something else is running on openplotter that uses the serial somehow (and prevents signalk from reading)? Perhaps I have some weird settings from updating openplotter a few times? Seems a lot of updates was made to the system (which seems very nice upgrades by the way)

Did anyone experience something similar and found a solution? 

Thanks in advance
I have the same problem with the WegMatt Daisy hat. Also, new version, seems to affect USB GPS receiver sentences Serial->GPSD->SignalK, whereby the GPGSVs lines are truncated.
I suspect you are correct regarding permissions of SignalK or other OpenPlotter permission as the same error messages appear for Daisy and VK-162 GPS with OpenPlotter. However, they work SignalK->OpenCPN without OpenPlotter. Would be nice for direct connect to SignalK.
I know absolutely nothing about openplotter but the message says the user doesn't has permission to exec the command. Try using "sudo" [command]

Cheers,

Renato Salles
READ:
You might want to exit openvpn, reboot and
retry after creating a file called /etc/udev/rules.d/70-openvpn.rules
with the following content:

KERNEL=="ttyUSB", MODE="0666"
KERNEL=="ttyACM*", MODE="066"
KERNEL=="ttyS*", MODE="0666"

Easy, isn't it

Cheers,
@rsalles Yes, easy is it, if that actually solves the issue - which it didn't in my case at least. It should not be required to sudo a serial read command. In my case I learned two things:

1. Do not use the uart script proposed by the daisy quick start guide. If you did, revert it by "sudo ./uart_control default". Use instead only the openplotter-serial utility, click on the UART button and reboot. Setup an alias for the daisy and link it to signalk.
2. If it still does not allow you to read serial data, unplug all other usb/serial equipment like GPS, wifi adapters, converters etc. Reboot the system with ONLY the daisy hat connected. This actually did the trick for me - I think this is an OS issue really - it is not related directly to openplotter or the daisy it self, somehow multible things try to read serial which also gives a permissions issue. No OS speciallist, but at least my assumption. After getting the daisy up and running, I simply connected the other stuff again with no issue.

I received great help from wegmatt really, although my daisy was fully functional (all the time actually).
I had the same issue in conjuction with a Raspi 4 and the pican-m HAT, which has a rs422 interface to send and receive NMEA0183 data.

After every boot the command

ls -l /dev/ttyS0

only showed read permssions for user and group: crw-r--r--
when I modified this using

sudo chmod 666 /dev/ttyS0

rights temporarily changed to crw-rw-rw-
and the signal-k server connected to the interface.

The solution to this problem is to modify the file /boot/cmdline.txt.
In my installation it was this command line

Code:
console=tty1 root=PARTUUID=320441f2-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles console=serial0,115200


I simply removed the console-part:

Code:
console=tty1 root=PARTUUID=320441f2-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles


and rebooted. After this everything was fine without changing the access rights manualy.

Michael






incomplete