-
Notifications
You must be signed in to change notification settings - Fork 480
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
help finding SP3 "nightlight" payload #158
Comments
Broadlink devices authenticates at the beginning and they will have another key and iv for that session. Have you got those key and iv for decryption? The packet of authentication should be at the beginning of the communication. |
Oh, I think that is the part I've been missing! |
I've been looking into the dump but couldnt really find any hint of and authentication package, not in the described way. But I found out, that the decrypt key, once the device is "setup" stay the same for time being, or at least as long the network isnt changed anymore... means it doesnt matter if I change the device from where I am sending the packets (like from the lib or from AWS)... the key stays same, which will be helpful to decode later. I also noticed that the key changes whenever you "reset" the device... ie move it to another wifi or similar. |
So, my guess was right. When you move the device to antoher wifi network, the "key" will reset, otherwise it will stay the same. So I am thinking that the "initliaze" procedure will always alter the key. What i did now is brought the python-broadlink on my raspi which i use to capture the packages. First i'Ve been running the manual "power on/power off" procedure, printing out the "key". Verifying its changing away from `0976...' I did this by adding this early in the
I cant tell why self.key turns into Then I used tcpdump to capture packages going from and to the SP3 (as described above). On my pc I've then created a new device and changed This is what I got
So there are 4 states in total :) - someone might just have guessed that! This is also reflects directly in the return state of the
|
@Nightreaver, @mjg59 I think that this issue can be closed, together with #73 Thanks a lot @Nightreaver ! |
Fixed with #159. Thank you! |
Hello
As i have both now, SP3S anbd SP3, i'm trying to find the the proper payload für turning on/off the nightlight of the SP3.
As these are wifi switches I've setup a wifi-ethernat bridge with raspberry to tcpdump the package comunication between AWS and the SP3.
I found out, that there a general "status" request from AWS every 3 seconds.
So i've been capturing and after some delay i turned the nightlight on and off, same for power .. on and off.
Because of the 3sec ping with is pretty exact every 3 seconds.
So I think I figured out which are the corresponding command packages
So thepackage with 72byte of data is the control package coming from AWS to turn on/off the device answered by a 560byte response from the device. (compared to 72 -> 568 for regular status)
So further i'm only looking into the packages coming from AWS, not going to, as I guess they dont help me with turning on/off yet.
So in the end I got exactly 4 packages of 72 byte from AWS (which is matching with turning on/off two times)
the data looks like (this is supposed to be night light on)
technically after removing the first 56 bytes im left with the payloads
i did several dumps, on turning on/off seem to be always same
my problem now is decrypting and reading what is actually going on.
i'm using this
but it doesnt seem right to ... i think i'm missing something
maybe someone can help with that
I was thinking that when I decode the payload, i'll get back a payload like from python-broadlink which is like
bytearray(b'\x02\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
but its totally differentmaking 4 commands in total
so they use different encryption or something?
The text was updated successfully, but these errors were encountered: