-
Notifications
You must be signed in to change notification settings - Fork 10
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
Couldn't receive packages from the device #3
Comments
You probably need to try again. If you know it's using WB2L, then just use BK7231T profile, as the N won't work. If it still shows the same message, check the firmware version in the Tuya app. Also, post Lightleak logs (from the folder you've chosen) and a screenshot showing the error. |
Tried multiple times selecting the BK7231T profile, always getting the same error "The device doesn't respond to ping requests" which is wired since I can confirm it is a WB2L. Tried checking the firmware version on the Tuya App, but unfortunately it is asking me to update to the 3.0.1 version, so it doesn't show the current version. Attached the log and screenshot showing the error. |
From the log I can see that it dropped you out of the wifi around 15 seconds after checking the exploitability status. Did the device stop blinking or reboot? We've never seen a device with 3.0.x firmware version, so it's likely that it's actually not exploitable using Lightleak. If you can create an account on iot.tuya.com to get the "product key" of the device, I can try to grab the 3.0.1 update and check if it should work. |
There's also an app called "Sniffer" on Google Play (with an orange dog icon). If you put the device in pairing mode and run the app, it will show some hexadecimal data for a device named "TY". That data should contain the Product Key, so you can post a screenshot of that or copy the hex bytes here. |
It does stop Blinking and tells me "The device exited Ap mode.." and asks me to restart the device, after I restart the device it does connect again and stops blinking, right after that it gives me the error "The device doesn't respond to ping requests" about a minute later it restarts and starts blinking again. It is possibly that the device is not exploitable, although I got this lights back in 2020, and the 3.0.1 update has been out since I got them. I just never updated some of them. According to the update info the only changes are the the increase from 3 to 7 power cycles in order to reset the bulb and the "Do not Disturb" function that allow the user to select the bulb state after a power loss. This is the Device ID from the bulb that is asking for the update eb87433fcad3214f4beuja And this is the Device ID from a bulb that is already on 3.0.1 ebe250baa820378fcewjkm |
The situation you're describing most likely means that it's not exploitable using the current Lightleak profile - crash after 1 minute is the most obvious symptom. The 3.0.1 version is a new one, which may indicate that the software was compiled by the manufacturer (as opposed to using standard Tuya firmwares). The SSID prefix "Positivo" is also not something we've seen before. If that's the case, the manufacturer could've changed some settings of the compilation, which make Lightleak incompatible. It might also just be a different bootloader which needs a profile. Or a different SSID encryption setting (like Standard vs XOR), but I haven't seen any encryption on BK7231T yet. The device ID you posted is not what I need - the product key is something different. It's easiest to check using the sniffer app I mentioned. |
Got two different results on Sniffer searching for the TY device First
Second
Converting the data to ASCII results in some gibberish in the first device, and the second device gives me something that I think is what you're looking for keytg5kq8gvkv9dh - This is from the device that hasn't been updated to 3.0.1 |
This is the Firmware Key - I thought this will show the PK but apparently it doesn't. You can create an account on |
Already had an account on iot.tuya.com This is the product_id for a bulb that hasn't been updated to firmware 3.0.1 |
keytg5kq8gvkv9dh indicates it is a standard oem_bk7231s_light_ty so 3.0.0 means this has a better than 0 chance of being SDK 2.3.2. Question is if it's the older vulnerable version (still missing a reversed exploit) or the patched version. The AP SSID prefix is just a configuration settings (gw_bi->ap_ssid) |
If 3.0.1 is there since 2020, it's not the patched version and probably the vulnerable version. I'll check if I can pull the update. |
Ah, I missed that they are from 2020. Really strange for a 3.x with a Beken in that time period. |
I can't pull the update from Tuya API. We didn't yet figure out what exactly is needed to make the API return an update URL. I'm only able to do this for one Firmware Key that @Cossid has. Since 3.0.1 is new for us, both Lightleak and Cloudcutter won't work unless we get a firmware dump. I know that WB2L is pretty much impossible to serial-dump without desoldering, but there's not much else we can do at the time. |
I found a different way of getting the upgrade URL, somewhat easier to perform on your side.
{
"dependencies": {
"@tuyapi/cloud": "^0.6.0"
},
"scripts": {
"start": "node index.js"
}
}
const Cloud = require('@tuyapi/cloud');
const debug = require('debug');
debug.enable("@tuyapi/cloud");
let api = new Cloud({
key: "3cxxt3au9x33ytvq3h9j",
secret: "5gdtanjtf38vyxkqh87cjwfcqjhvjjqa",
secret2: "f3hd7pet4p83kemjdf5wqsa5tavrv579",
certSign: "93:21:9F:C2:73:E2:20:0F:4A:DE:E5:F7:19:1D:C6:56:BA:2A:2D:7B:2F:F5:D2:4C:D5:5C:4B:61:55:00:1E:40",
apiEtVersion: '0.0.1',
region: 'AZ', // replace with EU if appropriate
endpoint: "https://a1.tuyaus.com/api.json", // replace with tuyaeu.com if appropriate
// sid: "",
});
api.loginEx({ email: "YOUR_APP_EMAIL", password: "YOUR_APP_PASSWORD" }).then(async sid => {
console.log(sid);
});
api.request({
action: "tuya.m.device.check.for.updates",
data: {
"devId": "PUT_YOUR_DEVICE_ID_HERE",
},
}).then(async data => {
console.log(data);
});
|
Here is the resulting JSON
This is the 3.0.1 update URL https://images.tuyaus.com/smart/firmware/upgrade/202107/1626078774-oem_bk7231s_light_ty_yb_UG_3.0.1.bin And from what I understand the current version is 1.1.2 |
Yes, the current version is 1.1.2. I'll check the firmware later, if it's exploitable or different in any way. Still, if the bootloader differs, we'll not be able to perform Lightleak without having the BL. But having the 3.0.1 firmware itself should be enough to build a cloudcutter profile. |
SDK version 1.0.8 - I don't think we've seen that version before. |
I've been trying to follow along here, is there a reason why |
It does give a result. You have the UG file, which is encrypted and compressed. I ran this command on the unencrypted file. You can do this with this command: ltchiptool soc bkpackager deota --key 0123456789ABCDEF0123456789ABCDEF --iv 0123456789ABCDEF |
We have, 1.0.8 SDK is common and will work with Haxomatic. We also have some bulbs with 1.1.2 already cut (Euarne BR30, LSC 970715, but they're from the older 2.0.0 SDK). I haven't done much lightleak with BK7231T, does it currently only work with the 1.0.5 bootloader? I can easily point out 1.0.4. and 1.0.6 bins If a profile is needed for each. The issue is without schema, we won't have a verified schema for cut mode. We can generate one to use local files, but won't add to the repository until we get the schema verified. |
So it would be the best to make Lightleak work. LL should work with all known bootloaders (1.0.3, 1.0.4, 1.0.5, 1.0.6). I would need to check that 3.0.1 in IDA to see if it should work on Lightleak. I have a 1.1.2 bulb as well (no update for it though) which I tried in the early Lightleak days, and was disappointed that it didn't work. The issue was just like yours - freezing ans rebooting after 1 minute. That may indicate 1.1.2 is problematic. Did you try to Lightleak the other bulb with 3.0.1 already installed? (don't update the first bulb yet) |
I tried on other bulbs that have already been updated to 3.0.1, but I get the same result. |
Let me know if there is anything else I can do to help. I already have a bulb that i removed the cover to confirm that it was a WBL2, i could try desoldering the chip and perform a serial-dump if needed. Also, I did try
|
Right, I forgot you need to trim 32 bytes from the beginning:
|
Here is a profile to cut 3.0.1. Extract it to your @kuba2k2 if he cuts and flashes to ESPHome, is it possible to dump storage, or does ESPHome overwrite it? Also, is it possible to somehow do a full dump with bootloader from ESPHome? |
Yes, it should be possible, but we'd need some code to do that (i.e. a custom component, or a route in the webserver). I haven't done that before, so there's no code to do that yet. |
Just tried with the positivo-bulb profile, but unfortunately it did not work. I first tried on the bulb that hasn't been updated and got So I assumed it had to be on 3.0.1 and tried on a bulb that was already on 3.0.1, it got a bit further, but eventually got -- UPDATE-- I tried putting the bulb in AP mode again after the |
Yes, it should only work on the bulb already on 3.0.1. Can you post the full log please (masking any personal info)? |
I attached the log. Even though it says it failed, I can no longer connect the bulb to the Tuya App, so I guess it kinda worked? |
Did this device come with 3.0.1 or was it upgraded? There is a chance they somehow have a different compile. Log looks like a normal failure. Hopefully I haven't broken haxomatic. |
As far as I remember, it was updated to 3.0.1 at some point. I got 5 bulbs back in 2020, 4 of them I updated to 3.0.1 at some point, the last one hasn't been updated yet. I haven't tried on all 4 bulbs that are on 3.0.1, just on o single one so far and got the result telling me I also tried flashing a 3rd party firmware through cloudcutter, but it didn't work either. |
Well, I have verified haxomatic is outputting expected values. At this point my only theory is that putting the device into AP mode on a device that has taken an OTA update switches back to the original app partition. I'm not sure anyone has tried cutting an OTA updated device. I have dumped them, but I serial flashed. I'll try to test that theory in a couple days when I'm better equipped. |
Ah, we're offsetting expecting APP0, but OTA will usually be APP1, we probably need to offset the exploit addresses. Let me verify what app1 offset is, and I'll have an updated profile for you to test. |
BK7231 doesn't have dual OTA. There's no APP0/1, there's only a "download" partition which is used by the bootloader. The image contained in download partition is decrypted and decompressed, then flashed to the app partition. |
After a bit of research, like @kuba2k2 said, there is only a single app partition on Beken devices, and the exploit addresses in the 3.0.1 profile appear valid. Unfortunately, I cannot test this any further, as I can't seem to get this on a device to better test myself. |
If you have a modern dd you can speed this up tremendously by doing |
Well, I came back to this kind of by accident (looking for OTA files), but re-reading this I was a bit confused what issue remained, so I looked into it a bit further, and this really is a strange and unique case. Firmware 1.1.2 uses key So that alone is a first, where they changed from one base firmware to another. But because they changed firmware, the values in the app firmware are actually overriding what is in storage. Two of those fields happen to be firmware key and ssid prefix. As a result, the profile worked, and wrote all the correct values to storage, but the AP remains overridden by the app firmware, so it can never change to the I can't speak to how this would effect LightLeak, as the process doesn't use storage. I'm pretty sure LightLeak can't work with the 1.1.2 firmware, but it probably should have for the 3.0.1 firmware, though I'm not sure if any of these oddities might break that. As for CloudCutter, @jpbarrettob you can use the profile I attached above and comment out (Add a Edit: Also, I don't know how many resets the 1.1.2 firmware needs for switching pairing modes, but the 3.0.1 firmware requires a very unusual 7x reset cycle.
Edit 3: Tried a second time, and it worked & flashed custom firmware, so if you get a failure the first time, retry a couple times. |
Hi,
I keep getting the error "Couldn't receive packages from the device" while trying to read the flash from a bulb.
Tried selecting BK7231N - Variant 1 ( Standard), BK7231N - Variant 1 ( XOR) and BK7231N - Variant JTAG ( XOR) but they all get the same error.
-- UPDATE--
I opened one of the bulbs and it's using a WB2L chip, from what I found online the WB2L is a BK7231T chip, I tried selecting the BK7231T profile just gives me an "The device doesn't respond to ping requests" error.
The text was updated successfully, but these errors were encountered: