Router for boat

CreakyDecks

New member
Joined
9 Sep 2011
Messages
700
Visit site
Wire the NMEA data into some sort of computer, maybe a Pi, and set up a server on that which displays the information you want on a simple web page. Then any device on a local network just has to use a normal browser to view that information. That way you don't have to worry about low level wireless protocols etc because you would just be using them in a normal way.
 

Heckler

Active member
Joined
24 Feb 2003
Messages
15,817
Visit site
Looks like a good choice, particularly since Stu wants it to talk to an iPad - "includes iOS demo code".

Now he just needs to sign up for an Apple developer account and learn Objective C.

Pete[/QUOTE
Pete
And so we digress! The point I have been making is that I have something similar to what Bruce has kindly pointed out. The Bruce solution is a vanilla one, ready for writing to. The Orange one is complicated by the fact it has defacto software on.
I know my limitations, I know that the digital yacht solution uses tcip, it says so in its blurb. I know that there are some serious software writers on here, that like playing with things like this. I asked a simple question. Bruce is drilling down to what I am after.
I like playing with things, I am curious about things! Oh and my knowledge of networking is slightly more than the average persons so your analogy likening me to someone who doesnt know one end of a spanner from the other is patronising to say the least. If you are competent in what I would like to do, perhaps a little time spent being constructive like Bruce would be better?
S
 

Heckler

Active member
Joined
24 Feb 2003
Messages
15,817
Visit site
Wire the NMEA data into some sort of computer, maybe a Pi, and set up a server on that which displays the information you want on a simple web page. Then any device on a local network just has to use a normal browser to view that information. That way you don't have to worry about low level wireless protocols etc because you would just be using them in a normal way.
thanks for that. As i understand it nmea is displayed in sentences, so i could feed it in to a serial port, use hyperterminal type stuff and display the sentences, but something needs to convert it to something that is graphical. I know Angus Mcdoon has done something like this to display ais stuff on a simple screen but he is away sailing.
S
 

maby

Well-known member
Joined
12 Jun 2009
Messages
12,783
Visit site
I have a lash-up of exactly this working on a Raspberry Pi using a USB-Serial adaptor to get the NMEA in and out and a USB WiFi adaptor for the networking. The software consists of a couple of shell scripts to get it configured and something like a hundred lines of Python code to implement the services. There are two services available - one is a simple HMTL5 dashboard that displays wind speed and direction and boat speed and depth on a web page that dynamically updates - you can open it from any mobile browser on a smartphone or tablet and see the instruments from anywhere on the boat. There's also a service that transmits the NMEA sentences out using telnet protocol over a TCP socket. This is intended to be compatible with the Digital Yacht Boatranet product - experiments using software that works with Boatranet seem to indicate that it is, but it is not tested to any real extent yet.

None of it was difficult - I've probably devoted something between ten and twenty hours getting it to this state - but I am a professional programmer. I'm not prepared to publish it - partly because it is still very fragmentary and partly because it might develop to form part of a commercial product in the future - but if the OP wants to IM me, I'll be happy to pass on a few lessons that I've learned. Anyone with a year or two experience of Unix systems programming would do everything I've done in a few hours too!
 

BruceDanforth

Well-known member
Joined
13 Mar 2004
Messages
17,871
Location
Tyne and Wear
Visit site
Unless Digital Yacht have wrapped the nmea up in a transport layer then you could maybe just throw out UDP from the pi or Nigel's black box and use their apps as long as both ends agree on a port.

There is a free AIS app you could try it with. Their app for displaying instrument data is a fiver. Not worth writing your own GUI for that.

thanks for that. As i understand it nmea is displayed in sentences, so i could feed it in to a serial port, use hyperterminal type stuff and display the sentences, but something needs to convert it to something that is graphical. I know Angus Mcdoon has done something like this to display ais stuff on a simple screen but he is away sailing.
S
 

maby

Well-known member
Joined
12 Jun 2009
Messages
12,783
Visit site
Unless Digital Yacht have wrapped the nmea up in a transport layer then you could maybe just throw out UDP from the pi or Nigel's black box and use their apps as long as both ends agree on a port.

There is a free AIS app you could try it with. Their app for displaying instrument data is a fiver. Not worth writing your own GUI for that.

I strongly believe that Digital Yacht just transmit the NMEA sentences over a telnet port. That is what my lash-up does and it works with software that claims to be Digital Yacht compatible.
 

Heckler

Active member
Joined
24 Feb 2003
Messages
15,817
Visit site
I strongly believe that Digital Yacht just transmit the NMEA sentences over a telnet port. That is what my lash-up does and it works with software that claims to be Digital Yacht compatible.

Aha, if i plug my ais sentences in to my xp pooter through the serial to usb port, hyperterminal displays them. Therefore am i right in thinking that telnet could squirt the sentences out wirelessly through a pi or my router and that the DY app could then understand them and display them?
S
PS DY claim that they use tcpip to transport
 

maby

Well-known member
Joined
12 Jun 2009
Messages
12,783
Visit site
Aha, if i plug my ais sentences in to my xp pooter through the serial to usb port, hyperterminal displays them. Therefore am i right in thinking that telnet could squirt the sentences out wirelessly through a pi or my router and that the DY app could then understand them and display them?
S

That is my belief - but, as I said, it is based on experiments with third party software that purports to be Digital Yacht compatible, not on actual documentation from DY.

I searched around on the internet for the source code to a telnet server written in Python and hacked it so that when it received an incoming connection request it simply opened the back channel and immediately started echoing the NMEA sentences out on it. If I connect to it from applications such as OpenCPN, it sees all my navigational data in real time.
 

Heckler

Active member
Joined
24 Feb 2003
Messages
15,817
Visit site
That is my belief - but, as I said, it is based on experiments with third party software that purports to be Digital Yacht compatible, not on actual documentation from DY.

I searched around on the internet for the source code to a telnet server written in Python and hacked it so that when it received an incoming connection request it simply opened the back channel and immediately started echoing the NMEA sentences out on it. If I connect to it from applications such as OpenCPN, it sees all my navigational data in real time.

Hmm, so forget about the Orange box, buy a NB and pay someone some beer tokens?
S
 

BruceDanforth

Well-known member
Joined
13 Mar 2004
Messages
17,871
Location
Tyne and Wear
Visit site
I think you should just be able to connect the power, network and NMEA wires, set the baud rate and the port etc. and it will appear as a host on your network which you then point the app at.

(Famous last words etc..)
 

maby

Well-known member
Joined
12 Jun 2009
Messages
12,783
Visit site
That box looks awfully like Nigels boxes! But how does one get NB to understand and squirt out the data?
S
Maby beat me to it!

If you do this on a Raspberry Pi, use a usb-serial adaptor that is supported by Raspian and it will appear as /dev/ttyUSB0. Find the source code for a telnet server written in Python (or C or C++ - pick the language you are most comfortable with) and add startup code to it to configure /dev/ttyUSB0 to the correct speed/character length/parity to match your NMEA input stream. Also, find the place in the code that accepts incoming connections and check what it does. If it is a proper telnet server, it will go through some sort of login sequence and then drop down to a listener loop where it accepts incoming commands and executes them, piping the output back to the outgoing port of the telnet session. Get rid of all that and echo the result of reading /dev/ttyUSB0 out to the telnet outgoing port.

That should work, but is too simplistic - it will only accept a single incoming connection and hogs the NMEA data. To do it properly, you need to get your hands dirty with multi-threading code - one thread reading the NMEA data and posting it on some sort of internal pipe and a separate thread to handle each connection to the telnet server over the network. They all pick up the same data from the NMEA input thread and push it out to the client applications.
 

maby

Well-known member
Joined
12 Jun 2009
Messages
12,783
Visit site
Hmm, so forget about the Orange box, buy a NB and pay someone some beer tokens?
S


I think that is likely to be the easiest solution. Most of these routers are Linux based and can be reprogrammed, but they do not include user friendly development tools. My lash-up contains everything that is necessary and cost a fair bit under £100. I can plug up a screen, mouse and keyboard to program it (or use a free X-Server and do it over the network from my PC). It's all well documented and understood - buy an idiots guide to Python and you can have the various fragments of code I've written so far.
 

Heckler

Active member
Joined
24 Feb 2003
Messages
15,817
Visit site
That is my belief - but, as I said, it is based on experiments with third party software that purports to be Digital Yacht compatible, not on actual documentation from DY.

I searched around on the internet for the source code to a telnet server written in Python and hacked it so that when it received an incoming connection request it simply opened the back channel and immediately started echoing the NMEA sentences out on it. If I connect to it from applications such as OpenCPN, it sees all my navigational data in real time.
Just been playing with DY app, found this, so it will accept tcpip stuff.
View attachment 43507
S
 

Martin_J

Well-known member
Joined
19 Apr 2006
Messages
4,407
Location
Portsmouth, UK
Visit site
Skipper Stu..

A quick read of this thread seems to show that you already have a laptop (or netbook) connected to the NMEA bus and are happy seeing the data on hyperterminal.

Something like the NavMonPC software (free download) will display all the NMEA information as dials or scrolling displays on the screen.

NavMonPC also has the ability to read in data from up to four serial ports so you could have NMEA in at 4800 from GPS, NMEA in from your Seatalk converter (for depth, speed through water and wind etc.) and AIS in at 38400 leaving you one spare input still.

It will also allow for the re-transmission into virtual serial ports for use in other software on the same laptop such as OpenCPN (or AutoPolaire for creating polars).

Now - Back to the original question - If you already have this laptop connected then you could just re-transmit the NMEA information out of its wireless port and receive it on your iPad, Android or any other wireless device. No other hardware needed.

I use iRegattaPro on Android for a great repeater display and Sail Tracker Polar NMEA for a play with polars.

Hope this helps - PS - To re-transmit on WiFi it is just a couple of DOS commands that are needed (and a bit of background reading on Microsoft Virtual Miniport). The commands create a new SSID that is broadcast from the laptop and re-transmits the NMEA information over this network! (Any questions on setup, just ask).
 
Joined
20 Jun 2007
Messages
16,234
Location
Live in Kent, boat in Canary Islands
www.bavariayacht.info
... To re-transmit on WiFi it is just a couple of DOS commands that are needed (and a bit of background reading on Microsoft Virtual Miniport). The commands create a new SSID that is broadcast from the laptop and re-transmits the NMEA information over this network! (Any questions on setup, just ask).

I know all about using the Microsoft Virtual Miniport, as detailed in this thread:

Here is how to share your Wi-Fi signal using a single card, under Windows 7 or 8...

But how do you get it to retransmit the NMEA data?
 

maby

Well-known member
Joined
12 Jun 2009
Messages
12,783
Visit site
I know all about using the Microsoft Virtual Miniport, as detailed in this thread:



But how do you get it to retransmit the NMEA data?

I must say that was not clear to me either - at least without writing a small amount of code in something like C++ or Python.
 

Cardo

Active member
Joined
3 Oct 2005
Messages
4,231
Location
In a plastic tub!
www.yacht-tinkerbell.co.uk
We also have this working on the boat.

Setup as follows:
Alfa R36 router doing it's normal thing. It supplies internet to the boat via either a 3G dongle or a WiFi adapter.
Raspberry Pi connected to R36 by ethernet cable.
NMEA outputs of AIS and chart plotter to Raspberry Pi using two of these (The Pi speaks their language out of the box, no drivers required): http://www.ebay.co.uk/itm/181127382846?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649
Laika's fantastic Kplex software running on the Raspberry Pi, which acts as an NMEA multiplexer. It takes the NMEA inputs from the AIS and plotter and supplies them to the network via a standard TCP port. I can connect to the NMEA feed using any iOS app that supports them, or OpenCPN on my laptop.
As a Brucy Bonus, we also have a python script running on the Pi that supplies the NMEA data (and some other goodies) to my Pebble smart watch. All the NMEA data is available on my wrist, very handy!
 

Martin_J

Well-known member
Joined
19 Apr 2006
Messages
4,407
Location
Portsmouth, UK
Visit site
I know all about using the Microsoft Virtual Miniport, as detailed in this thread:



But how do you get it to retransmit the NMEA data?

I set this up a while back and not being on the boat this is going to be from memory...

Day to day - I just start up OpenCPN, click on a batch file on the desktop that runs the Virtual Miniport command to start the WiFi then enable WiFi on the Android and start up iRegatta.

I seem to remember that I set up OpenCPN to start the 'TCP/IP server' on a specific TCP port (within OpenCPN), to listen on all four COM ports and to re-transmit on a Virtual COM port.

I believe it is the starting of the TCP/IP server that does the re-transmission to WiFi. The startup of Virtual COM ports is just to allow other software on the same laptop to listen to the incoming NMEA streams. I can test this evening.

I can post the details of what I have in my .bat file this evening if it helps.
 
Top