question

simon avatar image
simon asked trueox edited

Communication with the Mini after ICloverConnector.Sale

We have found that every so offten calling ICloverConnector.Sale() fails to returns a result from the Clover Mini when the sale is complete.

We are using the .NET 4.0.2 API, connecting to the Clover Mini via USB to the USB pay display app and have seen this on both Windows 7 & 10

Usally when a sale is started we get sevral messages from the OnDeviceActivityStart()/ OnDeviceActivityEnd() callbacks, followed by one from OnSaleResponse(). But sometimes we get nothing.

We can see in our logs that it was working up to this point without issue, with a sale going through 20-30 mins prior. The Clover connector thinks it is still connected and the sale goes thoguh the Clover OK, its just the messages have stopped.

The only time we call RemoveCloverConnectorListener() is just before disposing of the CloverConnector, and AddCloverConnectorListener() just after construction of the CloverConnector.

Has anyone else experianced this? and if so who did you solve it?


Clover Minisemi-integrationsUSB Pay Display
10 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered trueox commented
I was assuming this was a devkit since you did not specify the environment. If the connection is dropped at some point the CloverConnector will automatically connect when the connection has been re-established. You should not be creating a new Connector, and that is likely the root cause of your problem here.
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

simon avatar image
simon answered David Marginian Deactivated commented
We have now moved to a single CloverConnector and put it onto a couple of sites this morning. One has already reported that it has happened again, this time he called us whilst it was still happing.

We also added a button the user could press that called RetrieveDeviceStatus with sendLastMessage set to true, in the hope this may kick it back into gear (it did not)

When it happened our software was till responsive and could make call to the clover connector, but no messages were returned ( IsReady was true on the clover connector)

I can see a payment was taken at 12:07:58 successfully, but the next payment at 14:53:43 did not get a response.

We managed to capture the event view logs for the clover and can see that after a normal payment has started there are lines that read

  1. Exiting sendMessageSync()
  2. Got Message:{"id":"982","method":"ACK",
  3. Got Message:{"id":"983","method":"TX_START_RESPONSE",…
  4. Got Message:{"id":"984","method":"UI_STATE",

But when this happens the Event viewer logs say nothing after Exiting sendMessageSync() for minute then it gets a new request from us RETRIEVE_DEVICE_STATUS_REQUEST

Any ideas what else could be causing this?

Update: I have noticed that between the first payment and second, there is a event log

  1. 14:13:10 - receiveMessagesThread Exception: Read failed, 0 bytes returned
  2. 14:13:10 - 4 : Terminating receiveMessagesThread
I am not sure if this is relevant or not, but it not in any other event logs we have see.

3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented
Simon,
Thank you for your excellent write-up. Our Windows team was able to reproduce the problem and fix it. We are planning a patch release in the coming weeks with the fix.
3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

trueox avatar image
trueox answered trueox edited

I plugged my Clover mini (2nd Gen) into a USB 3.0 port and it does seem to be more stable.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

HTML Editor


Add some details...
Characters : 0
Tab to the formatting toolbar with Alt/Option + F10. If inside toolbar, press ESC to return to editor. Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community