delay in message transfer when using TCP
Posted: Wed 19. Aug 2015, 10:17
Hello,
I'm using your PCAN-Wireless Gateway together with the Virtual PCAN-Gateway on a Windows laptop.
The network connection is a direct connection to the gateway (ad hoc mode).
When using TCP as protocol, there are some delays when receiving the messages via PCAN-View on the laptop.
Test procedure:
There are 7 messages sent on the CAN bus, then there is 1 sec. delay, then the same 7 messages are sent again and so on.
CAN trace on the CAN bus:
(1439969833.493952) can0 0FF#0101010101010101
(1439969833.496198) can0 0FF#0202020202020202
(1439969833.498758) can0 0FF#0303030303030303
(1439969833.501307) can0 0FF#0404040404040404
(1439969833.503848) can0 0FF#0505050505050505
(1439969833.506427) can0 0FF#0606060606060606
(1439969833.508981) can0 0FF#0707070707070707
The messages are sent within 15msec.
On the receiving side (PCAN-View), I get:
36 5504.662 DT 00FF Rx 8 01 01 01 01 01 01 01 01
37 5716.738 DT 00FF Rx 8 02 02 02 02 02 02 02 02
38 5716.739 DT 00FF Rx 8 03 03 03 03 03 03 03 03
39 5716.740 DT 00FF Rx 8 04 04 04 04 04 04 04 04
40 5716.740 DT 00FF Rx 8 05 05 05 05 05 05 05 05
41 5716.740 DT 00FF Rx 8 06 06 06 06 06 06 06 06
42 5716.741 DT 00FF Rx 8 07 07 07 07 07 07 07 07
43 6519.573 DT 00FF Rx 8 01 01 01 01 01 01 01 01
44 6721.838 DT 00FF Rx 8 02 02 02 02 02 02 02 02
45 6721.840 DT 00FF Rx 8 03 03 03 03 03 03 03 03
46 6721.840 DT 00FF Rx 8 04 04 04 04 04 04 04 04
47 6721.841 DT 00FF Rx 8 05 05 05 05 05 05 05 05
48 6721.841 DT 00FF Rx 8 06 06 06 06 06 06 06 06
49 6721.842 DT 00FF Rx 8 07 07 07 07 07 07 07 07
There is a delay of 200msec between 43 and 44.
Using UDP with 15 frames, there is no delay:
22 17657.740 DT 00FF Rx 8 01 01 01 01 01 01 01 01
23 17658.464 DT 00FF Rx 8 02 02 02 02 02 02 02 02
24 17660.328 DT 00FF Rx 8 03 03 03 03 03 03 03 03
25 17661.849 DT 00FF Rx 8 04 04 04 04 04 04 04 04
26 17663.597 DT 00FF Rx 8 05 05 05 05 05 05 05 05
27 17665.386 DT 00FF Rx 8 06 06 06 06 06 06 06 06
28 17667.124 DT 00FF Rx 8 07 07 07 07 07 07 07 07
29 18672.240 DT 00FF Rx 8 01 01 01 01 01 01 01 01
30 18673.555 DT 00FF Rx 8 02 02 02 02 02 02 02 02
31 18675.225 DT 00FF Rx 8 03 03 03 03 03 03 03 03
32 18677.128 DT 00FF Rx 8 04 04 04 04 04 04 04 04
33 18678.849 DT 00FF Rx 8 05 05 05 05 05 05 05 05
34 18680.604 DT 00FF Rx 8 06 06 06 06 06 06 06 06
35 18682.442 DT 00FF Rx 8 07 07 07 07 07 07 07 07
Do you have any idea, what could cause this delay when using TCP protocol?
Attached are the two trc files from PCAN-View.
Do you have also some infos about expected message loss, depending on CAN bus load and/or other environment parameters (especially when using UDP)?
Thanks and best regards!
I'm using your PCAN-Wireless Gateway together with the Virtual PCAN-Gateway on a Windows laptop.
The network connection is a direct connection to the gateway (ad hoc mode).
When using TCP as protocol, there are some delays when receiving the messages via PCAN-View on the laptop.
Test procedure:
There are 7 messages sent on the CAN bus, then there is 1 sec. delay, then the same 7 messages are sent again and so on.
CAN trace on the CAN bus:
(1439969833.493952) can0 0FF#0101010101010101
(1439969833.496198) can0 0FF#0202020202020202
(1439969833.498758) can0 0FF#0303030303030303
(1439969833.501307) can0 0FF#0404040404040404
(1439969833.503848) can0 0FF#0505050505050505
(1439969833.506427) can0 0FF#0606060606060606
(1439969833.508981) can0 0FF#0707070707070707
The messages are sent within 15msec.
On the receiving side (PCAN-View), I get:
36 5504.662 DT 00FF Rx 8 01 01 01 01 01 01 01 01
37 5716.738 DT 00FF Rx 8 02 02 02 02 02 02 02 02
38 5716.739 DT 00FF Rx 8 03 03 03 03 03 03 03 03
39 5716.740 DT 00FF Rx 8 04 04 04 04 04 04 04 04
40 5716.740 DT 00FF Rx 8 05 05 05 05 05 05 05 05
41 5716.740 DT 00FF Rx 8 06 06 06 06 06 06 06 06
42 5716.741 DT 00FF Rx 8 07 07 07 07 07 07 07 07
43 6519.573 DT 00FF Rx 8 01 01 01 01 01 01 01 01
44 6721.838 DT 00FF Rx 8 02 02 02 02 02 02 02 02
45 6721.840 DT 00FF Rx 8 03 03 03 03 03 03 03 03
46 6721.840 DT 00FF Rx 8 04 04 04 04 04 04 04 04
47 6721.841 DT 00FF Rx 8 05 05 05 05 05 05 05 05
48 6721.841 DT 00FF Rx 8 06 06 06 06 06 06 06 06
49 6721.842 DT 00FF Rx 8 07 07 07 07 07 07 07 07
There is a delay of 200msec between 43 and 44.
Using UDP with 15 frames, there is no delay:
22 17657.740 DT 00FF Rx 8 01 01 01 01 01 01 01 01
23 17658.464 DT 00FF Rx 8 02 02 02 02 02 02 02 02
24 17660.328 DT 00FF Rx 8 03 03 03 03 03 03 03 03
25 17661.849 DT 00FF Rx 8 04 04 04 04 04 04 04 04
26 17663.597 DT 00FF Rx 8 05 05 05 05 05 05 05 05
27 17665.386 DT 00FF Rx 8 06 06 06 06 06 06 06 06
28 17667.124 DT 00FF Rx 8 07 07 07 07 07 07 07 07
29 18672.240 DT 00FF Rx 8 01 01 01 01 01 01 01 01
30 18673.555 DT 00FF Rx 8 02 02 02 02 02 02 02 02
31 18675.225 DT 00FF Rx 8 03 03 03 03 03 03 03 03
32 18677.128 DT 00FF Rx 8 04 04 04 04 04 04 04 04
33 18678.849 DT 00FF Rx 8 05 05 05 05 05 05 05 05
34 18680.604 DT 00FF Rx 8 06 06 06 06 06 06 06 06
35 18682.442 DT 00FF Rx 8 07 07 07 07 07 07 07 07
Do you have any idea, what could cause this delay when using TCP protocol?
Attached are the two trc files from PCAN-View.
Do you have also some infos about expected message loss, depending on CAN bus load and/or other environment parameters (especially when using UDP)?
Thanks and best regards!