question

paulryan avatar image
paulryan asked David Marginian Deactivated commented

Clover Android SDK Mini USB disconnect/reconnect issue

Hi David,


Happy new year! Hope you’ve enjoyed the break.

I'm working on developing semi-integration from my Android POS to clover mini through USB connection.

Every thing is going well, I'm just completing some negative testing.


Please see the below

  • Completing a successful transaction @ 21:42:55.
  • USB disconnected @ 21:43:06.
  • POS reconnect attempts via SDK every 3 seconds. Initially returning the expected ‘USB Pay Display not found’ as the device is still disconnected.
  • USB reconnected @ 21:43:21.
  • SDK fails to reconnect ‘Permission denied’.
  • Device is not connected at this stage and transactions will fail


I've also tried the below without the above reconnect attempts every 3 seconds.


1.) When the cable is removed I receive a callback for "[OnDeviceDisconnected] Clover device has disconnected. which I do I log this event and take no further action.

2.) When The cable is reattached. I should receive another callback for "[OnDeviceConnected] Device is connecting. but don't receive this call back.


Could you advise how I should implement reconnect logic on android SDK when USB cable is disconnected and reconnected.


Thanks in Advance

Clover Android SDK
10 |2000

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

You should not be implementing custom reconnect logic, the SDK will do that for you.

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.

paulryan avatar image paulryan commented ·
Thanks David,


Can you explain please ?


0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ paulryan commented ·

Can you explain what you are doing? It isn't clear to me whether you you are relying on the reconnect logic within the SDK or trying to do something custom. Can you tell us a little bit more about the permission denied error (do you have logs from your device for example?).

0 Likes 0 ·
paulryan avatar image paulryan David Marginian ♦♦ commented ·

Usb Display not found

01-02 21:43:21.863 2663 2721 D USBCloverManager: Setting accessory mode

01-02 21:43:21.863 2663 2721 D USBCloverTransport: Start pos usb setup from USBTransport

01-02 21:43:21.871 2663 2663 D PosUsbRemoteProtocolService: onStartCommand, intent: Intent { act=com.clover.remote.usb.intent.ACTION_USB_SETUP cmp=uk.co.kappture/com.clover.remote.client.transport.usb.pos.PosUsbRemoteProtocolService }, flags: 0, startId: 1

0 Likes 0 ·
Show more comments

Write an Answer

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