We are getting frequent disconnection while working on Clover mini. In between of any transaction Clover mini gets disconnected even though everything is on same network.
What could be causing this problem? If this happens in production then that would be big problem.
After fiddling around for a bit with an ethernet connection while in SNPD, I was able to reproduce the
timeout error message you were seeing by:
1. Having Secure Network Pay Display app (SNPD) open and started
2. Disconnecting the Clover from the network by pulling the ethernet cord
3. Starting the connection process on the POS and leaving it running
4. Reconnecting ethernet while POS is still trying to connect
Based on this, my assumption is that your Clover Device is losing network connectivity, which is causing the disconnection you're experiencing between your POS and the device. My recommendation would be A) if your Clover is on wifi, switch it to ethernet; B) if you're on ethernet already, switch out the cord; C) if wifi is necessary, make sure that your Clover is getting a strong signal.
As for how to re-establish connection to a device that has been disconnected in this way: SNPD relies on an internal Device Server to handle incoming requests generated by your POS through the Remote-pay SDKs, and if you re-open SNPD you'll most likely see a message along the lines of:
EADDRINUSE (Address already in use)
This requires you to go into SNPD's settings and hit 'Configure and Restart Server'. This kills and restarts the Device Server. There isn't a way to do that programatically.
I don't think the
handshake exception is related to the disconnection. That exception is thrown when trying to connect through Secure Network Pay Display app (SNPD) without the SNPD being open on the device. I'm assuming that after closing SNPD, you are trying to reconnect to it without starting it again. SNPD needs to be open and running before trying to connect to it, just like when you connect for the first time.