oyooyo / keyble

Command line tools and library for controlling eqiva eQ-3 Bluetooth smart locks
90 stars 28 forks source link

Protocol docu #41

Closed lechndo closed 9 months ago

lechndo commented 2 years ago

Hi,

I just got my new eqiva door lock, started playing around and found this tool to be very helpful.

Is there a documentation about the protocol somewhere? Would be nice to have, to play around with the lock by myself.

Unfortunately I'm not familiar with JavaScript, I'm more the C/C++ and Python guy, so maybe it would be better for me to have a look onto the ESP32 project... but

I was wondering if it would be complicated/possible to extend keyble to also read the locks logs - as it is possible with the app. I have seen the related issue #33 for this, but there is no final answer... I just mentions:

And figuring out how the device log works would take quite a bit of effort since I've never looked into this so far.

So does this mean there is no docu about the protocol and it needs to be reverse engineered?

I also found the "_Mount_Options_SetMessage"... which seems not to be used for any function in the commandline tool? Is there any plan for usage?

Thx for this great tool and your answers

oyooyo commented 2 years ago

Hi @lechndo ,

Is there a documentation about the protocol somewhere? Would be nice to have, to play around with the lock by myself. I was wondering if it would be complicated/possible to extend keyble to also read the locks logs - as it is possible with the app. [...] So does this mean there is no docu about the protocol and it needs to be reverse engineered?

If there is documentation, then I'm not aware of it. Back when I was developing keyble, eqiva did not hand out any documentation, and I doubt that this has changed in the meantime.

As far as I know, I was the first person who reverse-engineered the protocol. I did so by disassembling, modifying, reassembling etc. the official Android app etc. It was quite a lot of work and took me dozens of hours, and I assume that nobody else has done that since, because after the release of keyble it was of course much easier to look at the keyble source code (which supports at least the most important features).

Unfortunately, I did not write down any documentation about the protocol back then, and I've forgotten quite a lot since.

I also found the "_Mount_Options_SetMessage"... which seems not to be used for any function in the commandline tool? Is there any plan for usage?

No, not at the moment. As far as I remember, I found a Java package in the disassembled code of the smartphone app that contained one Java class for each message type that exists. And at least the names of those classes were not obfuscated, so I added an entry for all message types that exist to the keyble source code using the original name, even for those message types that I did not use yet.

These message types are now basically unused leftovers in the code, but if someone wanted to implement one the missing features, he might still find them useful.

Unfortunately, I am not even using the lock anymore, so I have little personal incentive to further develop keyble right now...

digaus commented 9 months ago

@lechndo

I implemented the Mount_Options_Set_Message in my esphome port:

https://github.com/digaus/esphome-components-eqiva

Now you can setup the lock without the need of the app :)

lechndo commented 9 months ago

Thx for implementing it. Unfortunately I no longer own such a lock. I returned the lock because of insufficient WAF. Mabe we will try something similar in the future, when our son goes to school 🤔

digaus commented 9 months ago

Combined with fingerprint the waf is pretty good here 🙃

Designed a custom ESP32 specifically for a pushable doorbell+fingerprint combo IMG_3930 IMG_3713 IMG_3705

lechndo commented 9 months ago

Looks really nice. Which fingerprint reader do you use?

Ircama commented 9 months ago

Now you can setup the lock without the need of the app :)

Interesting! Can you describe the protocol sequence?