K4CZP3R/tapo-p100-java-poc

Hardware v2.0 - handshake not respond cookie session ID needed to next command

Triyono123 opened this issue · 2 comments

Before in v1.0 or v1.2, handshake could be made normally, and responded with:
{
"error_code":0,
"result":{
"key":"........."
}
}
and also with TP Session ID.

But somehow when we try to connecting to Tapo hardware v2.0, the handshake did not go well. In result, responded with:

200 OK with Header: Server : SHIP 2.0

Any Experts please advise.

I see you've asked the same question in other p100 repo's. I think you will get help there, I'm not working on it anymore.

This repo only contains first proof of concept to get tapo devices working.

You could decrypt newest tapo app and see what's the difference between current version and my writeup about older (v1) version here

Just for anyone else looking at this PoC, the change to the tapo firmware causes HTTP empty headers to be rejected (with a HTTP/200 OK). The empty header arises from KspHttp:22 :

.addHeader("Cookie", cookie != null ? cookie : "")

If you want to run this PoC, this could be changed to:

        Request.Builder builder = new Request.Builder();
        if (cookie != null) {
            builder.addHeader("Cookie", cookie);
        }
        builder.url(url)
               .post(body);
        Request request = builder.build();