way4net_krumnow
Posts: 38
Joined: Thu Mar 07, 2013 1:31 pm
Location: Germany

Data Forwarding Error Teltonika (TCP vs UDP)

Wed Dec 09, 2015 5:07 pm

Hi!
I wanted to have a data forwarding of some devices from Live to test server to be able to check updates of the protocols on test sertver before going live.

This works pretty well for Telic protocol. And it works well for a protocol of our own wich runs udp only. But it has problems with Teltonika devices.

I think this is due to the fact that Teltonika has some differences in the protocols for udp and tcp (they have both implemented and they use same port for udp and tcp listeners).
The devices cannot login, so all other data is lost.

The live devices run on TCP but it seems that data forwarding is always running on UDP? (I tried to change it but only got option udp to select). I tried it with updating the Teltonika protocol to newest version 4.0.0.3569 to no effect.

This is what the error says in errorlog:
2015-12-09 14:40:06.3452 | Error | 5 | LoggerImpl.Write | Ascii: 354330032327473 |
2015-12-09 14:40:06.3452 | Error | 5 | LoggerImpl.Write | Binary: 0x00,0x0F,0x33,0x35,0x34,0x33,0x33,0x30,0x30,0x33,0x32,0x33,0x32,0x37,0x34,0x37,0x33, |
2015-12-09 14:40:06.3452 | Error | 5 | UdpNmeaListener.m_ProcessDatagram | Error processing UDP packet for GpsGate.Teltonika.TelUdpConnection | System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei GpsGate.Teltonika.TelTcpProtocol._TranslateFromDeviceTCP(Byte[] arrData)
bei GpsGate.Teltonika.TelTcpProtocol.TranslateFromDevice(Byte[] arrData, Int32 iStart, Int32 iLength)
bei GpsGate.Online.Net.NmeaConnection.DeviceToProtocol(Byte[] arrData)
bei GpsGate.Online.Net.Udp.UdpNmeaListener.m_ProcessDatagram(Object obj)

There it says TCP protocol but in terminal is shows coming in from udp:
09.12.2015 15:02:42] (217.160.78.176:57093/Teltonika/udp) Disconnect
[09.12.2015 15:02:42] (217.160.78.176:57093/Teltonika/udp) Error: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
[09.12.2015 15:02:42] (217.160.78.176:57093/Teltonika/udp) Server: [0x00]
[09.12.2015 15:02:42] (217.160.78.176:57093/Teltonika/udp) Client: [0x00][0x0F]354330032327473
[09.12.2015 15:02:42] (217.160.78.176:57093/Teltonika/udp) Connect

Did I do anything wrong? Is there a way of data forwarding using the same connection type as original device (udp, tcp, http..)?

User avatar
johan
GpsGate
Posts: 15423
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Wed Dec 09, 2015 6:35 pm

Have you updated the Teltonika plugin on the destination (receiving) server as well? Because this "should" work.

Regards,
Johan

GpsGate Support

way4net_krumnow
Posts: 38
Joined: Thu Mar 07, 2013 1:31 pm
Location: Germany

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Fri Dec 11, 2015 5:24 pm

Well I updated the Plugin only on the destination server ;)

The originating server has an older version. This is a modded version that I would have to work on to include the update changes.

Is this relevant? I thought it wouldn't as I expected that just the original Message from Device would be dublicated to the destination..

Please let me know if I have to change the originating Server too!

way4net_krumnow
Posts: 38
Joined: Thu Mar 07, 2013 1:31 pm
Location: Germany

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Tue Dec 15, 2015 5:50 pm

Update 4.0.0.3606 (receiving server only) did not fix this.

User avatar
Gabor
GpsGate
Posts: 86
Joined: Thu May 16, 2013 3:43 pm

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Tue Dec 15, 2015 6:32 pm

I will look into this.


Regards,
Gabor
GpsGate Support

User avatar
Gabor
GpsGate
Posts: 86
Joined: Thu May 16, 2013 3:43 pm

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Wed Dec 16, 2015 5:59 pm

We have managed to reproduce the issue. Unfortunately the data forward plugin does not support Teltonika TCP currently.


Regards,
Gabor
GpsGate Support

way4net_krumnow
Posts: 38
Joined: Thu Mar 07, 2013 1:31 pm
Location: Germany

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Wed Dec 16, 2015 7:07 pm

Thanks for the reply. The issue is not very pressing so we can live with it for the time beeing.

m1Gps
Posts: 67
Joined: Sat Dec 28, 2013 7:25 pm

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Fri Dec 18, 2015 12:09 pm

Hi,

Hopefully the Teltonika data can be forwarded effectively soon.

Regards

way4net_krumnow
Posts: 38
Joined: Thu Mar 07, 2013 1:31 pm
Location: Germany

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Fri Dec 18, 2015 1:00 pm

m1Gps maybe it is a solution to configure your teltonica devices to send their data via UDP. Maybe then it will work as the Forwarding always uses UDP and Teltonika seems to have different protocols for TCP and UDP data so this may work..

User avatar
johan
GpsGate
Posts: 15423
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Fri Dec 18, 2015 1:01 pm

If you have your Teltonika device send over UDP to the original server it works.

Regards,
Johan

GpsGate Support

m1Gps
Posts: 67
Joined: Sat Dec 28, 2013 7:25 pm

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Fri Dec 18, 2015 3:49 pm

Hi,

Below statement is what I understand that make me hesitate to use UDP

TCP is more reliable since it manages message acknowledgment and retransmissions in case of lost parts. Thus there is absolutely no missing data. UDP does not ensure that communication has reached receiver since concepts of acknowledgment, time out and retransmission are not present.

Addition, Telcos here also advised to use TCP protocol for best data transfer.

Regards

way4net_krumnow
Posts: 38
Joined: Thu Mar 07, 2013 1:31 pm
Location: Germany

RE: Data Forwarding Error Teltonika (TCP vs UDP)

Fri Dec 18, 2015 4:04 pm

Teltonika devices will repeat all messages that have not been ACKed by GpsGate Server so packet loss should not be an issue here. I would decide on the grounds of how much time it will take to reconfigure all your devices to UDP. And of course, if there is no reason to use UDP, TCP is advised.

Return to “GpsGate for Developers”