Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 05-06-2017, 09:06   #91
Registered User

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,437
Re: SignalK development ?

Quote:
Originally Posted by Auspicious View Post

(...)

N2K isn't fast enough.

Ethernet is 10 Mbps, 100 Mbps, or 1 Gbps.
So assuming CAN bus is 1Mbps (which is limiting) vs. Ethernet 10Mbps or faster, if I build a wifi based sensor, can this one reach Ethernet-like speeds then? I mean skip the CAN bus part, work in wifi only.

Sorry if I sound naive. I am using TCP passively but have low understanding of the technical side of ethernet / wifi world.

Not that it is necessary for sensors like depth or fuel but maybe then a common platform for the sensors and the radar (and other) imagery could be had?

Does SK have a 'sending an img file' sentence that we could use to send radar data (or other image data) in SK over WiFi?

We may after all end up with small boats and big boats using two wildly different methods to create, transfer and display the nav data. Maybe the big guys need a new version of N2K that will manage radar and other big data well.

b.
barnakiel is offline   Reply With Quote
Old 05-06-2017, 10:57   #92
Registered User
 
Auspicious's Avatar

Join Date: Jun 2003
Location: Chesapeake Bay
Boat: HR 40
Posts: 3,651
Send a message via Skype™ to Auspicious
Re: SignalK development ?

Quote:
Originally Posted by barnakiel View Post
So assuming CAN bus is 1Mbps (which is limiting) vs. Ethernet 10Mbps or faster, if I build a wifi based sensor, can this one reach Ethernet-like speeds then? I mean skip the CAN bus part, work in wifi only.
CANbus is 1/4 of 1 Mbps. BT is 1-3 Mbps(ish). WiFi can achieve 54 Mbps pretty easily. Gigabit Ethernet is really fast. *grin*

I don't know what you have in mind. I expect your biggest issue will be traffic management and scaling. What works for three sensors may not work for ten.

With all due respect you sound like your background is like that of the digital EEs as data rates got faster. I lived through the time when we had to go out and hire analog EEs out of retirement as clock speeds got faster and traces on circuit boards behaved like transmission lines and we had to worry about characteristic impedance and termination resistance. This is relevant because as software people become systems people you have to understand - really understand - the hardware you run over. Consider the bottom of the OSI model. The physical layer is important. You have to worry about latency and buffering. If you include autopilot--just as an example--you are in the realm of near real time and that means more than faster hardware. It means determinism. By the way - don't confuse near real time with real time. Real time is really hard. Ask the people doing remote medicine.

Quote:
Originally Posted by barnakiel View Post
Does SK have a 'sending an img file' sentence that we could use to send radar data (or other image data) in SK over WiFi?
I'm a little dated on some of this stuff and the newer radar systems are not something I've done more than install and set up. I suspect that there is no imagery in the conventional sense of the word. I know a lot of processing that used to be "downstairs" is now in the dome. You'll have to do the research yourself (please report back) that what is passed down the cable from the dome is rϴ arrays. You have to keep up, stay in order, and render it not only fast enough but at a consistent rate. Frame rates aren't relevant. On the other hand I may just be old. *grin* Given that the radars I am familiar with have a dome to display connection and subordinate displays must network with the primary makes me think I'm correct.

While more processing is happening at the sensor (consider the movement of GPS receivers into the "antenna" as an analogy) I suspect there is still a lot of processing in the display for radar and sonar, especially fishfinders and side-scan.

Homework will be graded. *grin* Seriously, if you find credible data to the contrary (footnotes please) of my speculation especially at the interface I will be grateful.
__________________
sail fast and eat well, dave
AuspiciousWorks
Beware cut and paste sailors
Auspicious is offline   Reply With Quote
Old 05-06-2017, 13:44   #93
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 513
Re: SignalK development ?

Quote:
Originally Posted by Lake-Effect View Post
I don't see the necessity of having every single transducer on a single buss... but it's still very possible. One option would be small wifi boards like the ESP8266 ($5) plus a regulator/interface board ($?) that can easily take the output of most transducers and put out as SK on wifi.
With a genuine motive of discussion around more effective promotion of Signal K rather than being combative, I think this illustrates some opportunities for improvement.

Signal K has been developed with a particular use case in mind: Apps on powerful devices written in high level languages across high bandwidth IP networks with a variety of protocols feeding a single server on the backend.

- Acknowledge that there are other use cases that it's not optimal for
- DOTADIW
- Stop the hand waving and concentrate on making the format you have properly defined so people can stop saying "yeah we'd implement it but it's a moving target".

On the last point...a bus-oriented protocol over IP such as some of us with experience in other industries might expect is based on multicast (or broadcast if it's braindead). *Signal K does not support this*. You have a mechanism for connecting to a single server (nice to see that WS and http are now defined as required given that in the early days there was a refusal to define a standard session/transport layer). You have no standard mechanism for accepting data from multiple devices. Signal K has no application level mechanism for loss detection and retransmission so it relies on an underlying reliable transport. Fine for WS/http. Not fine for multicast UDP. Plus there's no limit on message length so you have no limits on fragmentation. I'm similarly reminded of the hand-waving discussions about security on slack.

DOTADIW. You have something that was designed for and works for an important use case. Shore that up. Don't evangelise for use cases which it doesn't work for: it doesn't do the brand any favours.
muttnik is offline   Reply With Quote
Old 05-06-2017, 15:31   #94
Registered User

Join Date: May 2011
Location: Lake Ont
Posts: 8,548
Re: SignalK development ?

Quote:
Originally Posted by barnakiel View Post
Does SK have a 'sending an img file' sentence that we could use to send radar data (or other image data) in SK over WiFi?
I don't know... but what would be the use-case? What "data" produced by a boat radar would be consumable and useful to another device?

There are other solutions to a wired or wireless remote display for radar.


Quote:
Originally Posted by muttnik View Post
Quote:
Originally Posted by Lake-Effect
I don't see the necessity of having every single transducer on a single buss... but it's still very possible. One option would be small wifi boards like the ESP8266 ($5) plus a regulator/interface board ($?) that can easily take the output of most transducers and put out as SK on wifi.
With a genuine motive of discussion around more effective promotion of Signal K rather than being combative, I think this illustrates some opportunities for improvement.
First, I'm a SK fanboy, I like where they're going, but I'm not yet a serious user and certainly not on the team, or positioned to be a knowledgeable evangelist for it. Sorry if I gave that impression. I'll try harder to not speculate, and to stick to the facts as printed, or let the actual SK experts speak to important points.

Quote:
You have a mechanism for connecting to a single server (nice to see that WS and http are now defined as required given that in the early days there was a refusal to define a standard session/transport layer). You have no standard mechanism for accepting data from multiple devices. Signal K has no application level mechanism for loss detection and retransmission so it relies on an underlying reliable transport. Fine for WS/http. Not fine for multicast UDP.
As you know, a network server by definition can handle simultaneous requests, so if each of a few simultaneous requests contain a data payload... you just accepted data from multiple devices. The spec also anticipates separately wired sensors in simpler protocols as appropriate (eg serial/NMEA0183, I2S, IIS). So, the potential is there. I think we would also agree that the TCPIP layer is a good choice as transport mechanism. I haven't dug deeply into the UDP/sockets part of the spec, except to read that it's a means for broadcasting the SK data.

Again, I'm a SK fan, not a knowledgeable spokesperson. Don't let my errors reflect on the good people who are actually working on this.
Lake-Effect is offline   Reply With Quote
Old 05-06-2017, 15:49   #95
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 513
Re: SignalK development ?

Quote:
Originally Posted by Lake-Effect View Post
As you know, a network server by definition can handle simultaneous requests, so if each of a few simultaneous requests contain a data payload... you just accepted data from multiple devices. The spec also anticipates separately wired sensors in simpler protocols as appropriate (eg serial/NMEA0183, I2S, IIS).
Indeed the way Signal K works at the moment is via a central server with multiple protocols on the back end and signal K over web sockets, http or some other reliable protocol not officially specified on the front end, but this is not the bus protocol I think barnakiel is imagining (correct me if I'm wrong barnakiel): That would be something more akin to IEC 61162 part 4, what I guess OneNet will turn out to be (if it ever turns up :-), or something more akin to a market data protocol in the financial world.
muttnik is offline   Reply With Quote
Old 05-06-2017, 16:28   #96
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: SignalK development ?

My repository for a free autopilot using signalk is here:

https://github.com/pypilot/pypilot
seandepagnier is offline   Reply With Quote
Old 09-06-2017, 07:10   #97
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: SignalK development ?

I like the idea of 0183 data via TCP to instruments. Sean, I am always impressed, way above my head. I recall your early git repos about boat automation.

I am guessing it was this one
https://github.com/seandepagnier/rpi_autopilot
rgleason is offline   Reply With Quote
Old 09-06-2017, 12:17   #98
Registered User

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,437
Re: SignalK development ?

Quote:
Originally Posted by rgleason View Post
I like the idea of 0183 data via TCP to instruments. Sean, I am always impressed, way above my head. I recall your early git repos about boat automation.

I am guessing it was this one
https://github.com/seandepagnier/rpi_autopilot
Why to the instruments?

Do you say this meaning a sensor / instrument pair?

If you have a good link to creating a multi client TCP solution for many sensors talking TCP to a single server (processor - e.g. one in a laptop or a tablet) I will be most obligated if you share.

It seems so simple when our onboard devices all talk to the same AP. But somehow I cannot replicate this for our sensors to talk to the same tablet.

I managed to build BT and TCP sensors but I am stumbling when it comes to having them all talk to one tablet. Most boats have many sensors and I would like to be able to handle this now.

I am on BT hardware now but for the above reasons considering a move to TCP. My own boat is wired TCP via kplex run on a wifi router. Simple and works but a bit high Amper footprint (about 0.5A).

Best regards,
b.
barnakiel is offline   Reply With Quote
Old 09-06-2017, 14:43   #99
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: SignalK development ?

Do you say this meaning a sensor / instrument pair? yes
rgleason is offline   Reply With Quote
Old 10-06-2017, 00:35   #100
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: SignalK development ?

Quote:
Originally Posted by barnakiel View Post

If you have a good link to creating a multi client TCP solution for many sensors talking TCP to a single server (processor - e.g. one in a laptop or a tablet) I will be most obligated if you share.
.
Openplotter running on a Raspberry Pi. Though to be fair I've just pushed it a bit using node-red to simulate sensor data going into the Pi over wifi. One udp test was messages going out of a laptop at 100Hz, average time to return to the laptop with all the other gps etc data was around a few mS with around 1% lost messages. This was with everything talking to a mobile phone as an access point, not using the openplotter access point.
This is a snippet of results of a few minutes, 48,727 nmea messages sent.

Code:
Time=4mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=6mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=11mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=3mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=4mS, Lost sentences =425 Time=5mS, Lost sentences =425 Time=3mS, Lost sentences =425
Might give it a go soon with half a dozen tcp sources going out.
conachair is offline   Reply With Quote
Old 10-06-2017, 00:35   #101
Registered User

Join Date: Feb 2016
Posts: 143
Re: SignalK development ?

Quote:
Originally Posted by muttnik View Post
- Acknowledge that there are other use cases that it's not optimal for
There are other use cases that Signal K is not optimal for.

I don't want to force Signal K on anybody. If it works for you great, if not then that's ok too.

I just hope that people would start building more stuff together and making it interoperable. The world seems to be full of private marine data projects.

I am 100% guilty of this myself, but at least I am trying to be a better person.


Quote:
Originally Posted by muttnik View Post
- Stop the hand waving and concentrate on making the format you have properly defined so people can stop saying "yeah we'd implement it but it's a moving target".
Agreed. What would be the best next step in this regard from your point of view?

Quote:
Originally Posted by muttnik View Post
DOTADIW. You have something that was designed for and works for an important use case. Shore that up. Don't evangelise for use cases which it doesn't work for: it doesn't do the brand any favours.
I can only speak for myself, but it is just too bad if the eagerness to explore different solutions in this area looking through Signal K glasses comes across as pushing or evangelising Signal K.

Please try to see it as a wish to build more and better things together rather than pushing a particular solution on everybody.


Quote:
Originally Posted by muttnik View Post
On the last point...a bus-oriented protocol over IP such as some of us with experience in other industries might expect is based on multicast (or broadcast if it's braindead). *Signal K does not support this*. You have a mechanism for connecting to a single server (nice to see that WS and http are now defined as required given that in the early days there was a refusal to define a standard session/transport layer). You have no standard mechanism for accepting data from multiple devices. Signal K has no application level mechanism for loss detection and retransmission so it relies on an underlying reliable transport. Fine for WS/http. Not fine for multicast UDP. Plus there's no limit on message length so you have no limits on fragmentation. I'm similarly reminded of the hand-waving discussions about security on slack.
All of these points are true.

However both java and node SK server accept data from multiple devices, but it is not documented.

About loss detection and retransmission: people keep referring to this, but since neither NMEA0183 or N2K support this I feel this criticism is a bit unwarranted. SK has it over TCP. Why is this a problem? What practical case would you like to solve that SK is not solving and since SK is not the solution what are you using now?

I believe Signal K would work well with IPv6 multicast, but this is just me hand waving since I haven't done it nor have the expertise to say anything more. Again, can you point an example in the marine field that Signal K should learn from? For example NMEA0183 over TCP is architecturewise exactly the same as SK over http/ws.

I believe we have stated that security remains an issue largely unaddressed, apart from the universal mechanisms available for securing http and ws connections in general. For interoperability we do need to address this in the spec.
teppokurki is offline   Reply With Quote
Old 10-06-2017, 03:55   #102
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: SignalK development ?

Quote:
Originally Posted by barnakiel View Post
Why to the instruments?

Do you say this meaning a sensor / instrument pair?

If you have a good link to creating a multi client TCP solution for many sensors talking TCP to a single server (processor - e.g. one in a laptop or a tablet) I will be most obligated if you share.

It seems so simple when our onboard devices all talk to the same AP. But somehow I cannot replicate this for our sensors to talk to the same tablet.

I managed to build BT and TCP sensors but I am stumbling when it comes to having them all talk to one tablet. Most boats have many sensors and I would like to be able to handle this now.

I am on BT hardware now but for the above reasons considering a move to TCP. My own boat is wired TCP via kplex run on a wifi router. Simple and works but a bit high Amper footprint (about 0.5A).

Best regards,
b.

Some more testing, 6 different xdr nmea messages sent to different ports via TCP created n node-red, openplotter multiplexes and sends back out on port 10109 for opencpn (or anything else wanting to listen)

About 0.3A @12v and does *so* much more as well.

Can't see how you'd do this without something acting as a multiplexer sending over an access point, how could your tablet hear anything if it isn't connected to an AP?





conachair is offline   Reply With Quote
Old 10-06-2017, 04:11   #103
Registered User

Join Date: Feb 2017
Posts: 60
Re: SignalK development ?

Quote:
Originally Posted by barnakiel View Post

If you have a good link to creating a multi client TCP solution for many sensors talking TCP to a single server (processor - e.g. one in a laptop or a tablet) I will be most obligated if you share.

First off, apologies for being an A-hole.

Second. Take a look at SignalK node server. It does exactly this
sbender is offline   Reply With Quote
Old 15-06-2017, 13:30   #104
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 513
Re: SignalK development ?

Quote:
Originally Posted by teppokurki View Post
About loss detection and retransmission: people keep referring to this, but since neither NMEA0183 or N2K support this I feel this criticism is a bit unwarranted. SK has it over TCP. Why is this a problem? What practical case would you like to solve that SK is not solving and since SK is not the solution what are you using now?

I believe Signal K would work well with IPv6 multicast, but this is just me hand waving since I haven't done it nor have the expertise to say anything more. Again, can you point an example in the marine field that Signal K should learn from? For example NMEA0183 over TCP is architecturewise exactly the same as SK over http/ws.
To address those points out of order :-)...I think it's perfectly valid to leave transmission reliability to lower layers : however the nature of the default delta update mechanism as I understand it (yes I know the subscription model has options to work differently) means that reliability is required. Unlike a system where transducers repeatedly send their state and missing one may not matter, miss a delta and you could be stuck with the wrong state for a while. You've now specified WS and HTTP as "standards" which is great, but the team refused to do that a couple of years ago insisting that Signal K was good for running over anything.

Also by refusing to bound the length of a Signal K message you make it necessarily stream-oriented: There are limits on a UDP packet size (arguably quite big with IPv6 jumbograms) so putting a Signal K message in UDP may generally work but it's "wrong". Moreover given that your standard use case is transmission over wifi where multicast is notoriously lossy, fragmentation is going to cause nightmares. If you're proposing IPv6 multicast you want to limit message size to some sensible value less than or equal to 1232 bytes (1280-40-8). Also a bounded message size makes things easier for developers in lower level languages.

N2K has reliability at the datalink layer. NMEA-0183-over-IP isn't a real protocol but works ok over multicast because the message sizes are small and generally constantly repeated.

I don't think you need to do what those things do: You've design Signal K for a particular use case and it's working: stick with that.

I do use nmea-0183 over IP simply because i have the tools to do so and sharing them is useful to others. I don't *like* it.

Quote:
Originally Posted by teppokurki View Post
I believe we have stated that security remains an issue largely unaddressed, apart from the universal mechanisms available for securing http and ws connections in general. For interoperability we do need to address this in the spec.
I've been slow in responding because slack doesn't keep enough history to reference the relevant security discussions (probably over a year ago now) and I really didn't want to resort to a hand-waving explanation of my hand-waving statement, but sadly it seems I must. I wonder if the enthusiasm of some of your more confident contributers can lead to false hope that a particular technology which is not in their core area of expertise can solve problems without thinking through the practicalities. A better approach might be to ask what the use case is and whether limiting scope can help address the problem. If your concern is privacy and integrate in transit, leave it to the transport. Drop connectionless transports from your scope and things become much more manageable. Integrity of a message which may traverse multiple hops, resting at each (producer->server A->server B -> client) is something you might like to address in the spec (some kind of json signing?) but is a much smaller scope.

Quote:
Originally Posted by teppokurki View Post
What would be the best next step in this regard from your point of view?
Ask your commercial parters what their pain points are and prioritise those. Their concerns are probably other potential partners' concerns.

Limit the scope and explicitly state what it is: few interfaces to support means you can focus on solutions for the ones you do.

Have a look through the spec and think if anything could be more pinned down, e.g. what standard you're following for json interoperability. Yes it doesn't worry most people but it doesn't hurt to be explicit.
muttnik is offline   Reply With Quote
Old 16-06-2017, 12:18   #105
Registered User

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,437
Re: SignalK development ?

Quote:
Originally Posted by conachair View Post

(...)

Can't see how you'd do this without something acting as a multiplexer sending over an access point, how could your tablet hear anything if it isn't connected to an AP?
An android tablet can create its ow AP. Newer Windows (I think since 7.0) too.

At this point my boat sensors (gps, ais, depth, etc.) (nmea, serial) are connected thru an old wifi router that becomes the AP for all and any listeners. But this method is lame as it requires the router to be there. I can convert these sensors to TCP but I do not know how to get many TCP sensors to talk to the same soft AP. Wifi talking sensors are not too common at all, I think.

I tried the same gimmick with BT sensors but on my testing platform (Arduino) BT gives as many headaches as it does under Windows, so I am a pessimist in respect of my long term patience for BT. I only use it because it is so simple to deploy and cheap to test. I am sure aware of benefits of BT LE but man how I wish BT were as simple and reliable as TCP is.

And so, TCP could be where I will vest my future experiment time and effort. It is not as easy to implement as BT sensors (are) but it is way more reliable, easier to set up and trouble free.

Thanks again for all the tests you have run - most appreciated.

b.
barnakiel is offline   Reply With Quote
Reply

Tags
men


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Marina Development in China GordMay Pacific & South China Sea 4 29-09-2009 04:33
Nautical Development 39 (Morgan 39?) riptide Monohull Sailboats 1 22-07-2009 11:53
News: interesting development craft - high speed landing craft Amgine Multihull Sailboats 0 03-11-2008 11:30
Turks and Caicos Development Petition Canibul Atlantic & the Caribbean 5 24-04-2008 18:15

Advertise Here


All times are GMT -7. The time now is 02:16.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.