Hello,
We are seeing some unexpected behavior with the PCAN-Ethernet gateway we are using to communicate using TCP sockets between a PCB that broadcasts and can receive CAN messages, and a linux server.
We observed that we were receiving stale data from the gateway and after some experimentation, concluded that the gateway must have some sort of internal storage buffer that begins to fill up as soon as we connect the PCB (which is constantly sending out CAN messages) to the gateway. If there is a delay between when the PCB and the gateway are connected, and when the server reads data off the gateway, we get the data that was stored in the gateway's buffer when the PCB and gateway were first connected not the newest data being sent by the PCB.
We are able to work around this by dumping the first 33156 bytes of data received whenever we open a socket from the server to the gateway, but this is not an ideal solution. Is there any way to configure the size of the gateway's internal data buffer or turn it off completely? I was not able to find any mention of this behavior in the developer documentation or the manual.
Thank you!
PCAN-Ethernet Gateway Internal Buffer
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: PCAN-Ethernet Gateway Internal Buffer
It is not possible to change the buffer size of the CAN Queue (which should be the problem) and we also would never recommend to do that.
What you could do is using the JSON Command for the CAN Channel and reset the Route / CAN Channel when you start your application. Then all internal queues are flushed.
See Developer Documentation section 3.2.4 - Resetting a CAN Channel or a Route.
The easy way to test up in front if this solves your problem, is to use the shell emulation (command line on the module itself). Best is to invest some time and read chapter 3 JSON Interface
What you could do is using the JSON Command for the CAN Channel and reset the Route / CAN Channel when you start your application. Then all internal queues are flushed.
See Developer Documentation section 3.2.4 - Resetting a CAN Channel or a Route.
The easy way to test up in front if this solves your problem, is to use the shell emulation (command line on the module itself). Best is to invest some time and read chapter 3 JSON Interface
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------