Skip to content

laasa/avnav-seatalk1-reader-rs232

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

avnav-seatalk1-reader-rs232

grafik

General

The plugin read seatalk 1 protocol via configured RS232.

It is widely based on the

There exist the way to activate the GPIO plugin in openplotter/signalk base on 'Seatalk1 to NMEA 0183'. But especially for beginners like me it's possibly a bit to complicate to get knowledge

  • which software serve the hardware,
  • which one is storing the value and
  • what is the way to get these values in avnav.

It takes a bit of time to understand the powerful ideas of multiplexing between all the software in openplotter family. To get in touch with avnav plugin programming and python and to have simple and short data ways I tried another way. Especially the last thing could be interesting: To have the most current 'depth below transducer' value and not the 2 seconds old one.

Parameter

  • device: e.g. '/dev/ttyUSB0'
  • usbid: as alternative for devive name

Details

Hardware needs

There is the need to convert seatalk 1 level to RS232 levels. An example for such an circuit is suggested here: http://www.thomasknauf.de/rap/seatalk3.htm

grafik

Another idea is to use optocoupler between boat and PC.

Software installation

To install this plugin please

  • install packages via: sudo apt-get update && sudo apt-get install python3-serial
  • start pigpio deamon e.g. via sudo servive pigdiod restart
  • create directory '/usr/lib/avnav/plugins/avnav-seatalk1-reader-rs232' and
  • and copy the file plugin.py to this directory.

Using in anvav

  • STW: value from gps.SEATALK_STW in [m/s]

grafik

  • DBT: value from gpc.SEATALK_DBT in [m]

grafik

Known Issues

  • only tested with linux
  • Windows want work caused by missing defines for CMSPAR
  • CMSPAR is needed to use the sticky parity bit functionality

TODOs

  • generate NMEA0183 frames (for multiplexing to other openplotter software like signalk) ?

Helpers

Setup the serial devices by their serial numbers

  • Label your first USB serial device (e.g SeatalkOut)
  • Connect the first USB serial device to the PC
  • Get the vendorID, deviceID and serial number of the tty device (here "/dev/ttyUSB0") udevadm info -a -n /dev/ttyUSB0 | grep {idVendor} | head -n1 => ATTRS{idVendor}=="0403" udevadm info -a -n /dev/ttyUSB0 | grep {bcdDevice} | head -n1 => ATTRS{bcdDevice}=="0600" udevadm info -a -n /dev/ttyUSB0 | grep {serial} | head -n1 => ATTRS{serial}=="A10KKBM3"
  • creates an udev rule mcedit sudo mcedit /etc/udev/rules.d/10-local.rules SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A10KKBM3", MODE="0666", SYMLINK+="ttyUSB_SeatalkOut"
  • Continue with the next devices
  • at the end the file /etc/udev/rules.d/10-local.rules may look like that SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A10KKF9V", MODE="0666", SYMLINK+="ttyUSB_SeatalkInp" SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A10KKBM3", MODE="0666", SYMLINK+="ttyUSB_SeatalkOut"
  • Use this names in avnav (e.g: "/dev/ttyUSB_SeatalkInp")

About

avnav plugin to read seatalk 1 protocol via RS232

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages