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.
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": []
}
]