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
Error in the kplex-APP / No output
#11
(2020-07-12, 09:12 AM)PaddyB Wrote:
(2020-07-12, 08:39 AM)jamos.tan@gmail.com Wrote:


I've tried doing this with UDP, TCP, SignalK connection and none of them receive any deltas/second, when trying the TCP connection it says "connection refused" and the rest of the connection options just don't receive data. When looking at the data browser in SignalK the connection is not listed, i guess that's because there was no data found to begin with. I know the data is there because Kplex does see it, but SignalK doesn't. Eventually I want to have the AIS data in Freeboard. 

is the device sending the data connected to the openplotter network or another shared network? Should be sending to 10.10.10.1. not 192.168.*.*

It is on the same network, I am working with localhost, so class A 10.10.10.1 (or 127.0.0.1 localhost) and not class c 192.168.x.x
Reply
#12
(2020-07-12, 11:33 AM)jamos.tan@gmail.com Wrote:
(2020-07-12, 09:12 AM)PaddyB Wrote:
(2020-07-12, 08:39 AM)jamos.tan@gmail.com Wrote:


I've tried doing this with UDP, TCP, SignalK connection and none of them receive any deltas/second, when trying the TCP connection it says "connection refused" and the rest of the connection options just don't receive data. When looking at the data browser in SignalK the connection is not listed, i guess that's because there was no data found to begin with. I know the data is there because Kplex does see it, but SignalK doesn't. Eventually I want to have the AIS data in Freeboard. 

is the device sending the data connected to the openplotter network or another shared network? Should be sending to 10.10.10.1. not 192.168.*.*

It is on the same network, I am working with localhost, so class A 10.10.10.1 (or 127.0.0.1 localhost) and not class c 192.168.x.x

Sounds weird - could you post a message or screenshot of opencpn nmea debug window? Is it just ais that aren't being received when you configure signalk connections to receive on udp/tcp? What was the sending device again?
Reply
#13
Posting the kplex configuration that works might also help in figuring out the problem here.


Sent from my iPhone using Tapatalk
Reply
#14
(2020-07-12, 11:46 AM)PaddyB Wrote:
(2020-07-12, 11:33 AM)jamos.tan@gmail.com Wrote:
(2020-07-12, 09:12 AM)PaddyB Wrote:
(2020-07-12, 08:39 AM)jamos.tan@gmail.com Wrote:


I've tried doing this with UDP, TCP, SignalK connection and none of them receive any deltas/second, when trying the TCP connection it says "connection refused" and the rest of the connection options just don't receive data. When looking at the data browser in SignalK the connection is not listed, i guess that's because there was no data found to begin with. I know the data is there because Kplex does see it, but SignalK doesn't. Eventually I want to have the AIS data in Freeboard. 

is the device sending the data connected to the openplotter network or another shared network? Should be sending to 10.10.10.1. not 192.168.*.*

It is on the same network, I am working with localhost, so class A 10.10.10.1 (or 127.0.0.1 localhost) and not class c 192.168.x.x

Sounds weird - could you post a message or screenshot of opencpn nmea debug window? Is it just ais that aren't being received when you configure signalk connections to receive on udp/tcp? What was the sending device again?

OpenCPN works just fine, also without Kplex configured. SDR VHF seems to open the UDP connection, I can see that in the network plugin details (addresses and ports) as follows:

SDR AIS output (client)
UDP openplotter.local:10110
UDP 192.168.1.51:10110
UDP 192.168.1.47:10110
UDP 10.10.10.1:10110

When I add a Kplex incoming connection (UDP in - port 10110) to test this input I get the AIS sentences. However, when testing it now I get an error; OSError occured. I haven't changed this connection, but I can't reset it either. When removing it, rebooting the pi and adding that same connection again, it works.

OpenCPN (on another laptop, couldn't copy the output on a pi but results are the same) gives the following output:

<GREEN>16:53:33 (TCP:192.168.1.47:10110) !AIVDM,1,1,,B,13aFgC@P00PG;F:N7annT?w225kD,0*7A<0x0D><0x0A>
<GREEN>16:53:33 (TCP:192.168.1.47:10110) !AIVDM,1,1,,B,E>jMjbQRHq1000000000000000006LV@?T<mPI3;;;v000,0*4B<0x0D><0x0A>
<GREEN>16:53:50 (TCP:192.168.1.47:10110) !AIVDM,1,1,,B,402E3:1vAn>miPGEahN7pi7008N0,0*47<0x0D><0x0A>
<GREEN>16:53:53 (TCP:192.168.1.47:10110) !AIVDM,1,1,,B,E>jMjbQRHq1000000000000000006LV@?T<mPI3;;;v000,0*4B<0x0D><0x0A>

My SignalK configuration:


Code:
{
  "interfaces": {},
  "pipedProviders": [
    {
      "enabled": true,
      "id": "OPgps",
      "pipeElements": [
        {
          "options": {
            "logging": false,
            "providerId": "OPgps",
            "subOptions": {
              "baudrate": 4800,
              "device": "/dev/ttyAMA0",
              "host": "localhost",
              "providerId": "OPgps",
              "type": "gpsd",
              "validateChecksum": true
            },
            "type": "NMEA0183"
          },
          "type": "providers/simple"
        }
      ]
    },
    {
      "enabled": true,
      "id": "OPpypilot",
      "pipeElements": [
        {
          "options": {
            "logging": false,
            "providerId": "OPpypilot",
            "subOptions": {
              "host": "localhost",
              "port": "20220",
              "providerId": "OPpypilot",
              "type": "tcp",
              "validateChecksum": true
            },
            "type": "NMEA0183"
          },
          "type": "providers/simple"
        }
      ]
    },
    {
      "enabled": true,
      "id": "Pypilot Signal K",
      "pipeElements": [
        {
          "options": {
            "logging": false,
            "subOptions": {
              "port": "20220",
              "type": "udp",
              "providerId": "Pypilot Signal K"
            },
            "type": "SignalK",
            "providerId": "Pypilot Signal K"
          },
          "type": "providers/simple"
        }
      ]
    },
    {
      "pipeElements": [
        {
          "type": "providers/simple",
          "options": {
            "logging": false,
            "type": "NMEA0183",
            "subOptions": {
              "validateChecksum": true,
              "type": "udp",
              "port": "10110",
              "providerId": "OPkplex"
            },
            "providerId": "OPkplex"
          }
        }
      ],
      "id": "AIS",
      "enabled": true
    }
  ],
  "security": {
    "strategy": "./tokensecurity"
  },
  "ssl": false
}
Reply
#15
Signalk will accept your ais sentences and forward them to port 10110, just tried it sending to signalk over wifi UDP on 10.10.10.1 10112 from an esp32. Data gets echoed to port 10110 and opencpn sees it. 
[Image: Kbvhrro.png]

Should kplex be sending to port 10110? Maybe try sending from kplex to signalk over a different udp port?
Reply
#16
Thanks for testing this! Much appreciated!

If I want OpenCPN to forward it to SignalK, OpenCPN would need to be open constantly. Having a few other processes running as well, it will eat too much RAM. I've tried numerous ports with Kplex (30330/40440/50550/etc.), but I just can't seem to get an outgoing connection running with Kplex. Also Kplex seems unstable in general, cannot be restarted and sometimes seems to "think" that no incoming connections are present, although they are clearly added in the GUI. I guess I have to bypass Kplex, and adjust SDR VHF somehow.

The SDR VHF plugin seems to generate the outgoing connection by itself, but cannot be picked up by SignalK (at least with port 10110 it seems), only with Kplex (sometimes, if it works) and with OpenCPN.

Maybe I can find and adjust the SDR VHF settings file and change the port manually, and then try to add it into SignalK.
Reply
#17
Please try with only one active udp connection on the same port: OpenCPN, Signal K or kplex but not more than one at a time. Afaik they will not all work at the same time, at least SK will not open the port if another process has it open nor will it allow others access if SK has it open. Also different startup/restart orders will result in different results if you have multiple processes trying to access the same udp port.


Sent from my iPhone using Tapatalk
Reply
#18
(2020-07-12, 09:53 PM)tkurki Wrote: Please try with only one active udp connection on the same port: OpenCPN, Signal K or kplex but not more than one at a time. Afaik they will not all work at the same time, at least SK will not open the port if another process has it open nor will it allow others access if SK has it open. Also different startup/restart orders will result in different results if you have multiple processes trying to access the same udp port.


Sent from my iPhone using Tapatalk

I've now configured it exactly as a working OP1 operating system, this means:

- Kplex system UDP in 10110
- Kplex signalk TCP out 30330
- NMEA 0183 TCP connection in SignalK port 10110
- OpenCPN TCP input 10110

The only exceptions are is that in my case SDR VHF starts the outgoing connection (unclear if UDP or TCP) so I had to disable all Kplex connections, and this is not on port 30330 but on port 10110.

Now SignalK accepts the connection, but instantly receives 500 and more deltas per second, and crashes not long after that. Having to disable the connection with sudo nano /home/pi/.signalk/settings.json and set the faulty connection to 'false'. Also, just to be sure I didn't have OpenCPN open at this moment.


I didn't have the opportunity to check the data browser because SignalK crashes, there are no other connections that might interfere with this port I can think of anymore.   Sad

----
Edit: I've managed to open the Data Browser and I see that AIS connection has exactly the same values as the OpGPS connection.
These probably conflict in some manner, will report soon.

---
Edit 2: Nope, the GPS connection is serial and added to GPSD. No port attached to it as I can see.
Will look further.

---
Edit 3: SDR VHF has port settings, when changing the port to 30330 a UDP outgoing connection is started and automatically an incoming UDP NMEA0183 connection is made in SignalK.
No delta's/second so no AIS data incoming in SignalK, but everything is still fine in OpenCPN.

I guess this doesn't have anything to do anymore with Kplex, but with either SDR VHF or SignalK. I'll bump this into the proper location, report it at Github issue.
The problem with Kplex however is still present, doesn't seem stable when adding / removing / restarting. When I have these problems again, I'll come back again. Sorry for straying offtopic, sometimes we just don't know what the causes of the problems are. Smile

Some new information:

When the SignalK connection UDP 30330 is running, OpenCPN receives AIS. Without it, it doesn't.
SignalK does seem to passthrough the data to OpenCPN, but this is not visible in the Data Browser.
Reply
#19
jamos your problem is not related to the original post of this thread, let's follow your issue here: https://github.com/openplotter/openplott...f/issues/4

Luckbert, your post is old, is this issue still alive?
Reply
#20
(2020-07-15, 06:00 PM)Sailoog Wrote: jamos your problem is not related to the original post of this thread, let's follow your issue here: https://github.com/openplotter/openplott...f/issues/4

Luckbert, your post is old, is this issue still alive?


While you didn't ask me, yes, I am still having problems with the original poster's problem.  Seems like Celestine also reported the same issue.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)