EliasKotlyar / Xiaomi-Dafang-Hacks

4.18k stars 1k forks source link

Can't install CFW on Dafang 2017DP3894 on 5.5.1.353 #669

Closed DanielePetrarolo closed 3 years ago

DanielePetrarolo commented 6 years ago

Hello everyone

I really can't install the CFW on my dafang DF3 1080p. I tryed eveything. Downlaod cfw from 1.0 to 1.3, put on microsd, holdsetup button than powered and release at different times. I tried 2 different microsd from Lexar: one is 16GB the other is 8GB. Eveytime I try to flash the camera start spin in just 20seconds, and when I test the blue shining led, I don't get it. Also, passing the steps above give me no result. The camera use always the original firmware. On MiHome the camera is on firmware 5.5.1.353.

Can you give me some advice?

Maybe my DaFang is a new versione? I have bought it some weeks ago.

ferrexevi commented 4 years ago

Thanks, but I don't know what to do next. Regarding the 4.9.1.60 "original firmware folder", I expected to see one file (that I would copy to the sd card as demo.bin) but instead I see a folder with many files. Should I copy the many files to SD card? At the wyze website there is no link to download the 4.9.1.60 file anymore.

try the latest available "4.9.2.42". If it fails, it is a matter of testing versions. Then to connect to the wifi you have to modify the file WPA_suplicant.conf.dist to then rename it and leave it with extension .conf for it to take effect, I assume that you know this step well, otherwise, it will not connect to your wifi

ctrager commented 4 years ago

I tried with 4.9.2.42 but it didn't work. That is, after I install cfw-1.1, the camera light stays yellow and I can't connect to it via the app, nor does anything happen if I then turn it on with the firmware_mod contents on the sd card.

I also tried the files related to this: https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/issues/986 That is, firmware 4.9.4.28 and his cfw-1.1 But also didn't work.

Foden7 commented 4 years ago

Once you've booted with the hacked firmware you need to replace the boot microSD with one that contains the system files and then reboot the camera. From here https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/tree/master/firmware_mod, then rename wpa_supplicant.conf.dist to wpa_supplicant.conf and edit the contents to match your wi-fi. Then reboot your camera and wait 3-5 mins for the solid blue light to appear

ctrager commented 4 years ago

@Foden7 - I've done that a few times. The light doesn't turn blue. I thought after flashing cfw-1.1.bin. I should be able to run the camera even WITHOUT an SD card? Of course, I wouldn't get the features in firmware_mod, but at least I would know that the step of flashing cfw-1.1.bin worked. I never get back to blue after flashing cfw-1.1.bin, regardless of whether I have an SD card with firmware_mod contents or not. I'm guessing my issue is I still haven't started with the firmware known to work, 4.9.1.60, and isn't available at the wyze website anymore.

Foden7 commented 4 years ago

As far as I know you need an sd card with the file/folder structure from the link in my previous message.

Sd card with demo.bin MUST be formatted FAT32 and ONLY contain demo.bin

Oldest I have is 4.9.2.42, key thing for me was to have a piece of a credit card that I used to push down the setup button on the camera whilst I was pushing in the power cable, made it much easier. Lost my notes for the rest, pretty sure I posted them here ages ago. With the demo.bin sd card installed, hold down the setup button whilst putting power to the camera. When the camera powers up the light flashes yellow, i think, and then after a while changes to blue (or the other way around). Keep the setup button pressed until then, usually 10 seconds or so - I don't think it hurts holding it too long. Then I leave it alone for at least 5 mins before it gets powered off. Then swap the sd card for the one with the file/folder structure from the link in my previous message and power it on. After 30 seconds or so it's connected to my Wi-Fi

ctrager commented 4 years ago

Thanks. I'm sure the problem is NOT with me holding setup button because I'm able to easily switch back and forth between different firmwares that I download from wyze. The step I can't get past is after I flash cfw-1-1.bin the camera is effectively dead. Doesn't get to blue, both when I reboot without sd card and if I reboot with sd card with firmware_mod contents.

I'm giving up for now.

(My goal was to try the hacks RTSP stream because the experimental wyze firmware with RTSP, 4.28.4.41, results in a pretty poor looking stream. I wanted to get the stream so that I could write my own specialized motion detection logic but the stream is so jerky it's not usable to me. I was wondering whether the stream that's part of the hacks is better.)

Foden7 commented 4 years ago

Gotcha - sorry, you are obviously doing that right to switch firmware. For me, the stream via the hack is terrible no matter what settings I try. I used to have all my cameras on this firmware and then used SightHound to view/record the stream. The RTSP firmware, for me, is WAY better than this hack. I ditched SightHound, excellent product but renewals every year. Detection is AWEOSME, https://www.sighthound.com/. I now use TinyCamPro running on Lineage OS 14.1 running on VirtualBox. I had it running on Android x86 OS and it was great. I wanted to run the setup headless but couldn't find any remote access software that worked properly with AOSP Android

I took a look at the WayBackWhen machine and older firmware is available try here https://web.archive.org/web/20191217193836/https://support.wyzecam.com/hc/en-us/articles/360024852172

Good luck

domotica-orellana-loyola commented 4 years ago

What would be the configuration for a hidden ssid

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 ap_scan=1

network={ ssid="enteryourssidherebutrememebertokeepthequotes" psk="enteryourpasswordherebutremembertokeepthequotes" key_mgmt=WPA-PSK }

Foden7 commented 4 years ago

This is what I have in the standard \config\wpa_supplicant.conf file

For more configuration option please see:

https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 ap_scan=1

network={ ssid="SSID"

Uncomment to connect to Hidden SSIDs

    #scan_ssid=1 
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP WEP104 WEP40
    psk="PW"
    priority=2

}

kalyway101 commented 4 years ago

Thanks. I'm sure the problem is NOT with me holding setup button because I'm able to easily switch back and forth between different firmwares that I download from wyze. The step I can't get past is after I flash cfw-1-1.bin the camera is effectively dead. Doesn't get to blue, both when I reboot without sd card and if I reboot with sd card with firmware_mod contents.

I'm giving up for now.

(My goal was to try the hacks RTSP stream because the experimental wyze firmware with RTSP, 4.28.4.41, results in a pretty poor looking stream. I wanted to get the stream so that I could write my own specialized motion detection logic but the stream is so jerky it's not usable to me. I was wondering whether the stream that's part of the hacks is better.)

I'm having the EXACT same issue as you. I can successfully flash, 4.9.2.42 AND 4.9.4.28 with no issues at all. I then downloaded cfw-1.1 and rename it to demo.bin and hold the setup button for 10seconds while I plug it in.

It starts as a solid yellow for about 2seconds, the light changes to a light blue (not solid blue) for about 1minute, then restarts so the light changes back to yellow (2seconds again) then goes to light blue for about 1second, then switches to solid yellow and stays that way indefinitely.

After about 10mins I unplug it, copy the "firmware_mod" files with my proper wifi settings, rename from conf.dist to .conf, and when I plug it back in... it's just solid yellow without any connection to my WiFi.

EDIT: So it works! I followed this video except that I had a 128GB card, so I ended up creating a 512mb partition and it works great!!!

https://www.youtube.com/watch?v=DD7mLfk_l9I

nogueirasa commented 3 years ago

Works for e with Dafang on 5.5.1.4xx version and using 8GB SD Card

undertherainITA commented 3 years ago

Who gives me a hand? I tried with a Dafang DF3 with firmware 5.5.1_0426 with the result that it no longer works. I copied firmware demo_5.5.1.194.bin renaming it to demo.bin on 32GB SD but with 512MB partition in FAT32. I insert the SD, hold down the reset button, connect the power supply, I keep it for 20 sec., The camera first turns blue, it usually turns around and then stops in the central position with the LED that remains yellow flashing forever. Who gives me a hand? I wanted to make it work on ITA server but at least before with China server it worked perfectly. Thanks.

undertherainITA commented 3 years ago

Works for e with Dafang on 5.5.1.4xx version and using 8GB SD Card Which exact version? I'm trying with the 5.5.1_0426 but I still have a flashing yellow LED and the camera doesn't respond anymore.

nogueirasa commented 3 years ago

Works for e with Dafang on 5.5.1.4xx version and using 8GB SD Card Which exact version? I'm trying with the 5.5.1_0426 but I still have a flashing yellow LED and the camera doesn't respond anymore.

Sorry, I cant remember, but should be the same as your because my camera was updated with Mi Home and I did it last week.

undertherainITA commented 3 years ago

Guys, can someone help me out that I'm going crazy? I have a Dafang DF3 which had firmware 5.5.1_0426. I upgraded to mod firmware and it stopped working (always blinks yellow). Now I would like to put back the original firmware but I can't. I did the procedure with 2 different 32 GB microSD cards (either with a smooth partition or by creating a 4 GB, 512 MB, etc.), but nothing to do. I copy the original firmware demo_5.5.1.194.bin to the microSD, renaming it demo.bin, by holding down the reset I connect the power supply and keep it pressed for 20 sec .. The cam emits solid blue, then solid yellow, then flashing yellow starting to spin and then flashing yellow forever ... what should I do to put it back in place? Help me, I don't want to use it as a paperweight ...

undertherainITA commented 3 years ago

Works for e with Dafang on 5.5.1.4xx version and using 8GB SD Card Which exact version? I'm trying with the 5.5.1_0426 but I still have a flashing yellow LED and the camera doesn't respond anymore.

Sorry, I cant remember, but should be the same as your because my camera was updated with Mi Home and I did it last week.

Can you tell me exactly what you did and what do you use? Read below what I did. Give me a hand, I'm desperate ...

nogueirasa commented 3 years ago

Very important. Check if the sd card has only the demo.bin. Delete the "System Volume Information" hidden folder. Exemplo: https://www.getusb.info/how-to-delete-and-keep-system-volume-information-folder-off-flash-drives/

undertherainITA commented 3 years ago

Very important. Check if the sd card has only the demo.bin. Delete the "System Volume Information" hidden folder. Exemplo: https://www.getusb.info/how-to-delete-and-keep-system-volume-information-folder-off-flash-drives/ I tried to follow your advice by deleting the folder but I just did a test on the fly and I still couldn't update the firmware. In the end I got bored and did an "imaginative" Amazon return ...;)

rogodra commented 3 years ago

Hi, I have two Dafang, which were all with firmware 5.5.1.426. I tested the process with a very old 128Mb microSD and the cfw-1.3.bin file and it worked at first on both. Once upgraded the two have downgraded to version 5.5.1.243, and if it boots with the files on the microSD, it runs the custom firmware correctly. Therefore I confirm that the hack works with firmware 5.5.1.426.

undertherainITA commented 3 years ago

Hi, I have two Dafang, which were all with firmware 5.5.1.426. I tested the process with a very old 128Mb microSD and the cfw-1.3.bin file and it worked at first on both. Once upgraded the two have downgraded to version 5.5.1.243, and if it boots with the files on the microSD, it runs the custom firmware correctly. Therefore I confirm that the hack works with firmware 5.5.1.426.

I honestly had not succeeded but after a while I had given up and I preferred to make the 2 Dafangs that I had disappeared by replacing them with 2 new IMILAB basic... ;)

rogodra commented 3 years ago

Mine are two years old, they can't be returned. I did the process with a 128Mb microSD, it worked with both in the first, surely your problem was the microSD. In fact, to boot with the hack on a microSD HC class 10 does not detect it, I think you need to use older SD. The final control is total, very happy with the hack.

undertherainITA commented 3 years ago

Mine are two years old, they can't be returned. I did the process with a 128Mb microSD, it worked with both in the first, surely your problem was the microSD. In fact, to boot with the hack on a microSD HC class 10 does not detect it, I think you need to use older SD. The final control is total, very happy with the hack.

I had run out of old SD ... anyway thanks! So were you able to connect them to Mi Home apps on a NON China server? But the cloud doesn't work right?

rogodra commented 3 years ago

I had run out of old SD ... anyway thanks! So were you able to connect them to Mi Home apps on a NON China server? But the cloud doesn't work right?

I don't know if it goes outside of china, I use china server because I have devices that only work on this one. If everything works, if you put the files in the SD with the custom firm it starts with it, if you remove the files or the SD starts normally and is controllable from mi home.

undertherainITA commented 3 years ago

I don't know if it goes outside of china, I use china server because I have devices that only work on this one. If everything works, if you put the files in the SD with the custom firm it starts with it, if you remove the files or the SD starts normally and is controllable from mi home.

I see. I'm Italian and to have realtime cameras I put everything on Xiaomi Italia servers, that's why I made the Dafang disappear since I couldn't fix them, but that's okay ...;) I only have the Xiaomi Rubik's Cube now that it only goes to China server but with Mi Home mod app ... all right ...;) Thanks again friend!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

reenberg commented 3 years ago

Just for reference. I had a Dafang DF3 with firmware 5.5.1_0426, and I could also not get the camera to flash the cfw-1.3.bin. Every time I inserted the SD card and started the camera, it would start spinning instantly, and when looking at the SD card afterwards, it had placed logs files and a few folders. aka it started up normally.

I downloaded the 5.5.1.194 firmware, and downgraded, which worked. I confirmed the downgraded firmware version in the Mi Home app, through profile -> settings -> check for updates.

Then I downloaded the cfw-1.3.bin again, and now it flashed without any problems. Formatted the SD to its full 32G capacity, added the firmware_mod files and fixed the wpa_supplicant, works like charm.

Great work. Now all the fun begins :)

Note. I did this on a windows machine, and thus I made sure to delete the "system volume information" folder as described in an earlier comment. Also I was using a 32G card, so it ended up being a 508.88M partition when trying to flash with the demo.bin files.