ttlock / iOS_SDK_Demo

TTLock is a global provider of solutions for smart locks. We provide PCBA and softwares for lock manufactures and end users. We provide open API/SDK for developers. With these APIs/SDKs, you can develop your own applications to manage smart locks. The SDK here is for mobile app to communicate with locks via bluetooth.
MIT License
12 stars 12 forks source link

Facing issue in adding G3 gateway after updating to New firmware version. #31

Closed parvezkhanpsspl closed 3 months ago

parvezkhanpsspl commented 4 months ago

TTLock SDK pod version: 3.3.10

G2 Gateway: Working fine even after updating it to new version.

G3 Gateway: It was working fine with previous version 6.0.0.220224, As there was an update available, we have updated it to new version 6.0.0.231007. Now getting timeout error consistently while adding gateway.

MAC address: 11:77:6D:0E:63:A5 Model: G3P

Please find my below code snippets to initialize gateway:

var infoDic: [AnyHashable: Any]
        infoDic = [
            "SSID": SSID,
            "wifiPwd": wifiPwd,
            "userPwd": ttlockAccountPassword,
            "gatewayName": networkName,
            "uid": ttlockAccountUid
        ]

        TTGateway.initializeGateway(withInfoDic: infoDic) { _ , gatewayStatus in
            if gatewayStatus == .success {
               print("success")
               TTGateway.disconnectGateway(withGatewayMac: self.gatewayMac, block: nil)
            } else {
                print("error")
            }
        }
parvezkhanpsspl commented 4 months ago

TTLock SDK pod version: 3.3.10

G2 Gateway: Working fine even after updating it to new version.

G3 Gateway: It was working fine with previous version 6.0.0.220224, As there was an update available, we have updated it to new version 6.0.0.231007. Now getting timeout error consistently while adding gateway.

MAC address: 11:77:6D:0E:63:A5 Model: G3P

Please find my below code snippets to initialize gateway:

var infoDic: [AnyHashable: Any]
        infoDic = [
            "SSID": SSID,
            "wifiPwd": wifiPwd,
            "userPwd": ttlockAccountPassword,
            "gatewayName": networkName,
            "uid": ttlockAccountUid
        ]

        TTGateway.initializeGateway(withInfoDic: infoDic) { _ , gatewayStatus in
            if gatewayStatus == .success {
               print("success")
               TTGateway.disconnectGateway(withGatewayMac: self.gatewayMac, block: nil)
            } else {
                print("error")
            }
        }

Any update on above issue?

JuannyiOS commented 4 months ago

New version 6.0.0.231007 is ok. We have extensive testing before releasing it to the public. We cannot determine the reason for this. Please Re Connect the Power before adding gateway. ![Uploading IMG_4158.PNG…]()

JuannyiOS commented 4 months ago

IMG_4158

pathanparvezkhan commented 4 months ago

IMG_4158

We have tried reconnecting power before adding gateway. But issue is still persist with the G3 gateway version 6.0.0.231007.

We have captured code debugging screen shots for the same. Please check and let us know if any change is required.

Screenshot 2024-05-07 at 5 39 45 PM Screenshot 2024-05-07 at 5 40 00 PM
parvezkhanpsspl commented 4 months ago

IMG_4158

We have tried reconnecting power before adding gateway. But issue is still persist with the G3 gateway version 6.0.0.231007.

We have captured code debugging screen shots for the same. Please check and let us know if any change is required.

Screenshot 2024-05-07 at 5 39 45 PM Screenshot 2024-05-07 at 5 40 00 PM

Any update on above issue?

ttlock commented 3 months ago

Can you change a gateway? Maybe this gateway is broken.

parvezkhanpsspl commented 3 months ago

Can you change a gateway? Maybe this gateway is broken.

We have two G3 gateways and encountered the same issue with both. We resolved the issue on one of the gateway by adding it using the TTlock iOS official app downloaded from the App Store. We have not faced any issues with it since then. Below are the details of the device that is no longer experiencing any issues:

MAC address: 16:A0:8C:33:7F:33 Model: G3P

However, we are still facing the issue with the other gateway. We have not tried adding it using the TTlock official app yet. It might get fixed if we do so, but it should not be necessary to use the TTlock app to resolve this issue.

Below are the details of the device still facing the issue:

MAC address: 11:77:6D:0E:63:A5 Model: G3P

ttlock commented 3 months ago

Add a parameter "gatewayVersion", ginfoDic[@"gatewayVersion"]= @2; //@2 means G2,@3 means G3,@4 means G4

Add a parameter  gatewayVersion
parvezkhanpsspl commented 3 months ago

Add a parameter "gatewayVersion", ginfoDic[@"gatewayVersion"]= @2; //@2 means G2,@3 means G3,@4 means G4 Add a parameter gatewayVersion

We added the "gatewayVersion" parameter but the issue remains. We also tried reconnecting the power before adding the gateway. Every time we attempt to add it, we get a gateway timeout error. Please find the updated code screenshots attached for your reference.

Screenshot 2024-05-17 at 11 48 51 AM

Screenshot 2024-05-17 at 11 48 24 AM

But the same code is working fine with the below G3 gateway and successfully added. Gateway Id: 519802 Gateway Mac: "16:A0:8C:33:7F:33"

ttlock commented 3 months ago

Sorry for the inconvenience caused to you. Thank you for your feedback. We have identified the cause, please update SDK v3.3.11.

parvezkhanpsspl commented 3 months ago

Sorry for the inconvenience caused to you. Thank you for your feedback. We have identified the cause, please update SDK v3.3.11.

Thank you for your prompt response and assistance.

I have updated SDK to v3.3.11 as you recommended, and I am pleased to confirm that the issue has been resolved. Both gateways are now functioning correctly without any errors. I appreciate your swift support in resolving this matter.

Thank you once again for your help.