Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wireless gateway integration issue using new SDK #4

Open
AAkanksha26 opened this issue Dec 4, 2019 · 1 comment
Open

Wireless gateway integration issue using new SDK #4

AAkanksha26 opened this issue Dec 4, 2019 · 1 comment

Comments

@AAkanksha26
Copy link

Hello!

I've used the SDK "ttlock-sdk-2.0.aar" and "ttlock-gateway-sdk-2.0.aar" in my project for the smart locks. Now I want to integrate the wireless gateway into my project. So I tried using GatewayAPI and followed the instruction given in TTLock documentation. It couldn't work for me and I don't know where I'm going wrong. So I tried the new SDK "com.tongtonglock:ttlock:3.0.6" for gateway integration. Using that I could scan the gateway, connect the gateway and scan wifi networks for gateway; but I couldn't init the gateway. I used the credentials of my TTLock account for this. I used the method as below -

        configureGatewayInfo.uid = MY_INTEGER_USER_ID;
        configureGatewayInfo.userPwd = MY_PASSWORD;
        configureGatewayInfo.ssid = binding.wifiName.getText().toString().trim();
        configureGatewayInfo.plugName = binding.gatewayName.getText().toString().trim();
        configureGatewayInfo.wifiPwd = binding.wifiPwd.getText().toString().trim();
        GatewayClient.getDefault().initGateway(configureGatewayInfo, new InitGatewayCallback() {
            @Override
            public void onInitGatewaySuccess(DeviceInfo deviceInfo) {
                makeToast("gateway init success");
            }

            @Override
            public void onFail(GatewayError error) {
                makeToast(error.getDescription());
            }
        });

It is not showing the message in onFail, not in onInitGatewaySuccess and not even showing some error or exception and after some time, the gateway times out.

Can you please tell me where I'm going wrong or help to solve the issue?
Also please let me know if there is any way to integrate "ttlock-sdk-2.0.aar" along with "com.tongtonglock:ttlock:3.0.6".

Thanks in advance!

@the-code-chef
Copy link

Hello @AAkanksha26 , Did you get any solution?

I am also facing a similar issue.
For me, it's not even scanning.

@ttlock , @lxk123 Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants