Introduction
What can cause stability issues in the Marshall link?
These stability issues usually happen due to not using proper hardware:- 24V/1.5A power source
- If using a USB-to-COM adaptor, it must be a Chipi-X, the only type approved by Nayax’s technical team. It has also been shown in the past that other types of adaptors may (and tend to) cause stability issues.
- Issues with your machine’s COM port (physical connection/ COM port management).
- If using Marshall over LAN, it could be due to issues with your Ethernet connector, LAN communication, etc.
You’ve mentioned that the Marshall task is being “starved”. What does it mean?
Once the Marshall task doesn’t get enough priority to run, it’s “starved” and may not behave properly. In that case, your machine would stop sending the “Keep Alive” signals. The device (VPOST/VPOSM) will detect that the machine is disconnected due to a missing “Keep Alive” and launch a new pairing process. Starvation is the worst problem you can have, and it can cause unexpected behavior depending on when it occurs (which I think you’ve seen), so it’s very important to solve it. Those issues can cause weird behavior from the consumer’s POV and even break the Marshall link, which shouldn’t happen (and when it does, you won’t be able to make or complete transactions). Possible causes for the starvation of the Marshall task: not giving the Marshall a high enough priority to run, having your machine do other things which will cause it to not respond to Marshall (keepalives or other commands) in time, extensive file-writing other than the SDK’s, etc.What does it look like?
Once the Marshall task is starved you’d see the following:How the “keepalive” mechanism works/what is the reason for the starvation
The “no keep alive” means that your peripheral did not respond to the keep alive, which occurs every second (unless configured otherwise), and in that case, it would try to resend the packet. If there is no response, it would try again (1 original attempt 2 retried), and if this attempt fails, the Marshall link would be deemed broken. The pairing process (the establishment of communication between the VPOST/VPOSM and your charger) would be re-initiated. In some cases, starvation is caused by poor task handling or by extensive file writing (unrelated to the Marshall log writing). While a file is being written, all tasks are halted to prevent corruption of the flash. In addition, the starvation could be due to your peripheral doing tasks unrelated to Marshall, causing it not to respond to the Marshall task in time.Can I increase the time between keepalives? Would that solve the starvation issue?
The SDK is made to work best with a keepalive of 1 second, and increasing the keepalive to a higher amount won’t solve the issue of starvation- it would just take much longer to realize there’s some issue with the communication. We don’t recommend having it set to more than 5 seconds. For example, if you had it configured to 30 seconds, it would take 3*30=90 seconds for the SDK to realize there’s an issue, and in that time, the VPOST may appear “frozen”/unresponsive, confusing consumers. Having keepalives occur every second is not what’s overloading the processor; the issue is that the task doesn’t get enough priority to start with.Note: For VPOSM, in case of Marshall over ETH, there’s a need to set the keepalive to 10 seconds due to LAN requirements/limitations.