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
NMEA to pypilot

I've planned to get NMEA data (wind) to the pypilot. I have a raymarine system, so its running seatalkNG. I do have a DigitalYacht iKonvert Gateway (USB), NMEA2000 to NMEA0183 converter that has an USB output and gives NMEA data to a PC. As a first try I put this USB in the RPI running pypilot (MicroUSB port), but it doesn't work. Anyone tried this?
How would the best possibility be to get the SEatalkNG to NMEA0183 and into pypilot?

Currently I am only running pypilot, so no OpenCPN, but I guess this would be an option.

Edit: Is the microUSB port usable for this? Or should I go via some other serial connection? Somewhere Sean stated you could go from an NMEA0183 network and a USB to serial converter to the pypilot...

Thanks for tips.

Provided you have already established with your pc connection that it outputs a wmv sentence, first thing that would come to mind is baudrate. I believe pypilot probes at 4800 and 38400 only. Bring down pypilot, find out the device name in /dev; then set baudrate with stty -F devicename baudrate, then cat the devicename to check mwv sentences come through. Edit: if it does not, solve that first; if it does, post the output of pypilot when ran at the prompt.

Myself, I have pypilot, and wind, interfaced through native signalk.
You can do it with micro usb or through wifi.

The question is, if the usb device you plugged into the pi is recognized, and it may even need to edit the udev rules.

So, ssh into tinypilot and run "dmesg | tail" after plugging into micro usb port and see what the result is.

Also, yes it only works at 4800 and 38400 baud normally.
Thanks. Yes, it talks (talked last year) with my computer. However it needs dedicated drivers (unless running ubuntu). Guess this could be an issue?

Does it usually work to have a standard nmea0183 to USB cable plugged into the RPI zero running pypilot, without any more config?

Edit: Did'nt see Seans answer before submitting. It can send on 4800 and 38400 baud, I've tried both. The converter doesn't show any USB connection, so it seems it's not recognized. I will do some more testing during the next nights, everything is well build into the boat right now...

HI again,

this is what I got:

tc@box:~$ dmesg | tail
[ 2397.012416] usb 1-1: new full-speed USB device number 4 using dwc_otg
[ 2397.012752] Indeed it is in host mode hprt0 = 00021501
[ 2397.248187] usb 1-1: New USB device found, idVendor=0403, idProduct=6001
[ 2397.248202] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2397.248209] usb 1-1: Product: FT232R USB UART
[ 2397.248216] usb 1-1: Manufacturer: FTDI
[ 2397.248222] usb 1-1: SerialNumber: A601SDDE
[ 2397.251468] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
[ 2397.251682] usb 1-1: Detected FT232RL
[ 2397.252784] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

I guess it is just some definition that has to be changed?

The nmea test tool on the PC reads wind data, true and apparent. RAW data coming from the converter in wind mode:


I looks like your adaptor is recognized and a device is set up:

[ 2397.252784] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

That means your adaptor shows up as /dev/ttyUSB0, and you can set its baudrate with stty -F /dev/ttyUSB0 38400.

Then you can verify you get data by typing cat /dev/ttyUSB0.

If that is all right, I should ask the question that should have been asked before: why do you say "but it doesn't work"? What you should see is that the option 'Wind' is added to the dropdown in the pypilot user interface 1). 

If you get data, and the option wind is not shown, then it is time to stop pypilot (sudo sv stop pypilot), run pypilot at the prompt, and share the output of it.

1) NOTE: this applies to the OpenCPN plugin and the Openplotter interface; the web interface always shows all options, but if you select wind and there is not wind data, it flicks back to compass.
is pypilot assigned this serial port? It wont probe unless assigned in ~/.pypilot/serial_ports if the file exists. Otherwise you can delete it to probe all ports.

What output do you see from pypilot?

You should also see the nmea stream on 20220 etc:

telnet <address> 20220
Hi, thanks a lot for you quick replies. Really awesome!

@Ironman, yes, not working meant I don't get the W on the display and can't choose wind mode.

That's what I did today:
- look for serial_prots -> not existing
- Try to cat ttyUSB0 -> device busy
- down pypilot
- cat ttyUSB0 -> no output
- up pypilot
- telnet 20220 -> all NMEA sentences, incl. MWV
- Check pypilot -> wind mode available.

So, I basically only restarted pypilot without restarting tinypilot. I've turned tinypilot and the instruments off and on a couple of times and wind mode keep beeing available, so it seems to work.

Thanks for your help!

it sometimes doesn't work after rebooting the tinypilot??

if you get no output from "cat <device>" it does not mean it isnt working. cat doesnt work on tinypilot
(Today, 12:10 AM)seandepagnier Wrote: so..

it sometimes doesn't work after rebooting the tinypilot??

if you get no output from "cat <device>" it does not mean it isnt working.  cat doesnt work on tinypilot


For now it always works, after I once rebooted pypilot while tinypilot was running.

I will see how it works in the next weeks, but during the tests (3 reboots of the whole system, including instruments and converter), it worked (without any further work after start up).

BR, Fabian

Forum Jump:

Users browsing this thread: ironman, 1 Guest(s)