question

duyenhang avatar image
duyenhang asked vavagao answered

Do Sale response Sale cancel after change ip and reconnected Clover mini

I use Clover mini, device ipad run POS app connect with Clover mini by SDK ios.

Steps:

1. POS connect ip with clover mini

2. Clover mini change wifi, the ip is change.

3. POS connect again with Clover mini via new ip.

4. do sale

-> Result: response "sale cancel"

Code:

self.myCloverConnector?.dispose()

self.urlSetting = url

let config = WebSocketDeviceConfiguration(endpoint: url,

remoteApplicationID: appId,

posName: appName, posSerial: posSerial,

pairingAuthToken: nil,

pairingDeviceConfiguration: self)


self.myCloverConnector = CloverConnectorFactory.createICloverConnector(config: config)

self.myCloverConnector?.addCloverConnectorListener(self)

self.myCloverConnector?.initializeConnection()


Please help me check

my Clover sn: C032UQ04630195

Clover MiniRemote Pay iOS
10 |2000

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

duyenhang avatar image
duyenhang answered

log on xcode:

2024-11-28 14:20:06.912922+0700 Staging[15795:691475] [connection] nw_socket_connect [C204:1] connectx(37, [srcif=0, srcaddr=<NULL>, dstaddr=192.168.68.6:12345], SAE_ASSOCID_ANY, 0, NULL, 0, NULL, SAE_CONNID_ANY) failed: [64: Host is down]

2024-11-28 14:20:06.913305+0700 Staging[15795:691475] [connection] nw_socket_connect [C204:1] connectx failed (fd 37) [64: Host is down]

2024-11-28 14:20:06.913452+0700 Staging[15795:691475] [] nw_socket_connect connectx failed [64: Host is down]

2024-11-28 14:20:06.914637+0700 Staging[15795:690861] [connection] nw_connection_get_connected_socket [C204] Client called nw_connection_get_connected_socket on unconnected nw_connection

2024-11-28 14:20:06.915384+0700 Staging[15795:690861] TCP Conn 0x281f749a0 Failed : error 0:64 [64]

onDeviceDisconnected

10 |2000

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

duyenhang avatar image
duyenhang answered

after onDeviceDisconnected, reconnect with new ip, it's always get onDeviceDisconnected (but this ip is right)

10 |2000

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

sophia2005 avatar image
sophia2005 answered

It looks like the issue is with the IP change after the Wi-Fi switch. Try reinitializing the connection after the IP update and ensure your POS app is handling the IP change correctly. If the problem persists, check for SDK updates or contact Clover support.

Stimulation Clicker

10 |2000

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

flaresolverr avatar image
flaresolverr answered

It looks like you're encountering an issue where the POS system returns a "sale cancel" message after the Clover Mini changes its IP address when reconnecting to Wi-Fi. This could be due to an interrupted session or a misconfigured WebSocket connection. To resolve this, you should ensure that the connection is properly re-established after the IP change. Make sure to reinitialize the CloverConnector with the new IP, and verify the session before initiating the sale. You may also want to check that the Clover Mini and the POS device are on the same network and avoid frequent IP changes. Additionally, if you’re working on data extraction or other web scraping tasks while troubleshooting, FlareSolverr.com is a great resource to help bypass Cloudflare’s anti-bot protections and streamline your data collection seamlessly.

10 |2000

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

vavagao avatar image
vavagao answered

Transform your English content into engaging RedNote posts with AI-powered assistance. Perfect for creators looking to succeed on <a href="https://www.rednote.pro/">RedNote</a>.

10 |2000

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

juck avatar image
juck answered

Check if the Clover mini's session gets invalidated when the IP changes. It might be causing the transaction to cancel. Ensure the is properly resetting the session. Also, confirm the device configuration aligns with the new IP after reconnection. A deeper look at the logs might help pinpoint the issue.

10 |2000

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

vavagao avatar image
vavagao answered
Transform your English content into engaging RedNote posts with AI-powered assistance. Perfect for creators looking to succeed on RedNote
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

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