OpenMarine

Full Version: Route SDR/AIS stream into Kplex?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I capture the SDR/AIS stream into Kplex for multiplexing?

There's evidently a bit that I don't quite understand about this whole SDR/AIS thing - perhaps I'm just overthinking things...  Smile  Is the stream presented via a tty interface somewhere?

A pointer to some documentation for this would be great...
https://sailoog.gitbooks.io/openplotter-...eiver.html
This doc has to be updated sorry but there are the basics

You just have to calibrate.

kplex and opencpn are configured out of the box to get AIS from an SDR.
(2017-11-29, 07:32 PM)Sailoog Wrote: [ -> ]https://sailoog.gitbooks.io/openplotter-...eiver.html
This doc has to be updated sorry but there are the basics

You just have to calibrate.

kplex and opencpn are configured out of the box to get AIS from an SDR.
I got SDR/AIS working Smile it just needed a new antenna.

My question is more around how to manipulate the AIS NMEA (eg can I view the AIS sentences in the NMEA diagnostics window, forward it to a serial output etc).
(2017-12-01, 11:11 AM)seaspray Wrote: [ -> ]I got SDR/AIS working Smile it just needed a new antenna.

My question is more around how to manipulate the AIS NMEA (eg can I view the AIS sentences in the NMEA diagnostics window, forward it to a serial output etc).

Assuming the AIS is going into Kplex then it should be sent out of address 10.10.10.1, port 10109. (which it should be..)

Then you can save it to a file using node red , code below. Probably won't do you much good though, AIS messages aren't like most NMEA where you can easily see the data, they are binary so not so easy to get into. 
Quote:!AIVDM,2,2,2,B,000003v0100,2*61
!AIVDM,2,1,3,B,E>jae:?9PSa2ah77a:417bW2@7HwcHJp:OLb,0*09
!AIVDM,2,2,3,B,000003v0100,2*60
!AIVDM,2,1,4,B,E>jae:w9PSa2ah77a:417bW2@7JObO30:UOH,0*70
!AIVDM,2,2,4,B,000003v0100,2*67
!AIVDM,2,1,5,B,E>jae;?9PSa2ah9Wbb417bW2@9pwarrP:TfS,0*2D
!AIVDM,2,2,5,B,000003v0100,2*66
!AIVDM,2,1,6,B,E>jae;g9PSa2ah9Wbb417bW2@9qwbc@@:LtP,0*4E
!AIVDM,2,2,6,B,000003v0100,2*65



Code:
[
   {
       "id": "2ec38e6f.de4e32",
       "type": "switch",
       "z": "f1a0cb4.fe86138",
       "name": "Filter just ais",
       "property": "payload",
       "propertyType": "msg",
       "rules": [
           {
               "t": "regex",
               "v": "!AIVDM*",
               "vt": "str",
               "case": true
           }
       ],
       "checkall": "true",
       "outputs": 1,
       "x": 412,
       "y": 68.99998474121094,
       "wires": [
           [
               "b94ee7ad.e95078"
           ]
       ]
   },
   {
       "id": "36d7cef4.ce9742",
       "type": "tcp in",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "server": "client",
       "host": "10.10.10.1",
       "port": "10109",
       "datamode": "stream",
       "datatype": "utf8",
       "newline": "\\n",
       "topic": "",
       "base64": false,
       "x": 184.00001525878906,
       "y": 83,
       "wires": [
           [
               "2ec38e6f.de4e32"
           ]
       ]
   },
   {
       "id": "b94ee7ad.e95078",
       "type": "file",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "filename": "/home/pi/savedais2.txt",
       "appendNewline": true,
       "createDir": false,
       "overwriteFile": "false",
       "x": 624,
       "y": 45.99998474121094,
       "wires": []
   }
]