samtap / fang-hacks

Collection of modifications for the XiaoFang WiFi Camera
1.68k stars 340 forks source link

New firmware versions 3.0.4.9 / 3.0.4.20 #122

Open samtap opened 7 years ago

samtap commented 7 years ago

Apparently a new firmware version is available. Please report any info or issues here.

gmruiz commented 7 years ago

Seem to be a problem with the new firmware and Mi Home app for users outside of China. When you connect the app show a message of not possible to use outside of mainland China.

samtap commented 7 years ago

@gmruiz According to other reports, that seems to be the case on older firmware already, if you have one of the newer cameras (that have a qr code on the base).

poom commented 7 years ago

I'm outside China. I cannot connect to camera but can access setting/recorded video

Now It cannot monitor anything...

@samtap Can I downgrade firmware to 3.0.3.56?

samtap commented 7 years ago

@poom Should be possible, let me know how it works out you're in uncharted territory: https://github.com/samtap/fang-hacks/wiki/HowTo:-Flash-original-Xiaomi-firmware-from-sdcard-(factory-reset)#via-sdcard

BluPix commented 7 years ago

3.0.3.56 already don't work outside mainland china, i have tested this procedure. It's possible to find somewhere little older firmware?

yuyat commented 7 years ago

3.0.4.9 (info) screenshot 2017-05-12_09-17-57 screenshot 2017-05-12_09-18-10

EmilioBravo commented 7 years ago

Hi, I'm about to buy a couple of this cameras, but I'll be using them outside mainland China. Should I wait? @yuyat 3.0.4.9 works outside China? Where can I download it?

BluPix commented 7 years ago

No, 3.0.4.9 doesn't work outside china, 3.0.3.56 doesn't work too.

EmilioBravo commented 7 years ago

@BluPix so if I buy one now I wont be able to use it? Is there any firmware that I can flash to make it work? Thanks again!

guerrierodipace commented 7 years ago

Italy 3.0.4.9 works normally with original firmware and mi home , camera without qr code

BluPix commented 7 years ago

New model with MAC address starting 34 don't work and it looks like critical factor is camera ip address when it's registered to mi home app. Look at https://xiaomi.eu/community/threads/xiaomi-xiao-fang-lincam-1080p-security-camera.37129/ or on 4pda.

jak0lantash commented 7 years ago

Anyway a firmware downgrade could be done to work around this issue? I can't use the camera... http://imgur.com/a/iSYzy

st3venhall commented 7 years ago

Cant you just set your region to mainland china within settings and get it to work (even if youre not in china)? I'm on 3.0.3.56 and live in the US, and couldn't get the camera to work with the region set to United States, but then I set the region back to mainland china and all was well. I set the language to english so i could relatively navigate the menus without to much chinese craziness.

jak0lantash commented 7 years ago

Doesn't work. Both my mi account and mi home app are set to Mainland China, still the same error, on iOS and Android. My camera has a QR code at the bottom and the MAC address starts with 34.

https://xiaomi.eu/community/threads/xiaomi-xiao-fang-lincam-1080p-security-camera.37129/page-4#post-367754

st3venhall commented 7 years ago

This article helped me out quite a bit http://bobbyromeo.com/technology/xiaomi-smart-1080p-wifi-ip-camera-rtsp-streaming-hack/

"For some reason, I wasn’t able to install Mi Home through Google Play as it prompted me that none of my devices were compatible. OK then, whatevers… For this reason, I decided to sideload the app via ADB. I went to apkpure and downloaded the app manually, then installed it via ADB. I won’t get too much into detail about ADB, google if unfamiliar.

adb install MiHome_v4.0.11_apkpure.com.apk Next, we shall set up the camera.

Open the app with whichever finger you’re most comfortable with and select Mainland China, if you select another region you may run into install problems later.

Power on the camera.

Use the included “paperclip poking device” to depress the setup pin on the bottom of the camera. The camera will make an audible sound and you’ll hear a voice speaking a foreign language that I don’t quite understand.

After a few seconds, a pop up will appear on your phone or tablet, click on OK to begin the pairing process, however, you’ll need to sign in first with a valid Xiaomi account. Create a Xiaomi account and sign in and click next.

Select your WiFi network and fill in your WiFi password.

You’ll see a QR Code on your screen, slowly point it in the vicinity of the camera’s field of view so it can read the code. If successful, you’ll hear some more audible words – probably telling you that you’re about to do something bad, really bad, so stop it, damn it!

Wait a little while to finish the setup. If you get a timeout while you see the percentage, hit “try again”.

Now click on the your camera, it should say “online”. In the top right corner you’ll see an ellipse icon, click it and go into “General Settings” and “Check for updates”.

Begin upgrade and wait some more."

jak0lantash commented 7 years ago

Doesn't work. Still can't be used outside of mainland China.

TDPFlorida commented 7 years ago

I'm a little confused...will the hacks work if the firmware is updated? I'm currently at 3.0.3.56, living in the US and have my (mi home) account set up to be mainland China (and the hacks work fine)...can and how do you upgrade/change/load a firmware to any given revision? If you can, where do you find these files/firmware revisions? Thanks

rsenn1 commented 7 years ago

I tried using a location spoofing app, but I'm still getting the error about not being in China.

TDPFlorida commented 7 years ago

If I can't upgrade the firmware (because the hack will no longer work) is there a way I can disable the annoying popup to upgrade the firmware every time I select the camera?

samtap commented 7 years ago

The hack will work fine regardless of the firmware version.

TDPFlorida commented 7 years ago

Thanks...the hacks seem to work fine with Firmware 3.0.4.9 but I'm trying... Change firmware Via SDCard

1.Download firmware file "upd_isa.camera.isc5.bin.extracted" from: firmware v3.0.3.56 2.Extract the file and place the files in the root of your SDCard on the first partition "mmcblk0p1" 3.Rename "0.elf" to "FIRMWARE_660R.bin" 4.Push setup button while powering up the device. The device should auto reboot after flashing.

I open "upd_isa.camera.isc5.bin.extracted" and extract ALL files to a FORMATED (FAT32 and tried EzFAT) SDCARD. Then rename the "0.elf" to "FIRMWARE_660R.bin" and have tried BOTH holding down the setup button AND toggling it while it reboots.

When the camera comes on the status is a SOLID yellow for a few minutes (I think its SOLID yellow when the firmware is upgrading) but when I look on my phone the firmware is still 3.0.4.9...What am I doing wrong?

Thanks

aropunto commented 7 years ago

I have the new model of the camera, with the button setup (without hole), and the mac is 34:XX:XX:XX... with the bidicode. I put the firmware v3.0.3.56...., like you say and i press the setup until 20 seg. and i format the SD in FAT mode, not FAT32 and i can do it. But the Fang Hacks doesnt work in my camera. I follow the instructions and i make the SD with the 0.2.0.img and win32Diskimager. I read that is due be the new model. The light is always flashing blue but doesnt stop. The camera is in my wifi network (the blue light is flashing) but when i put http://device-ip/cgi-bin/status my webbrowers says that cant access to that page by a DNS adress error. Any solution? Someone has the firmware 2.8..... ? and the camera maybe work with mi home. Please help.

jak0lantash commented 7 years ago

I have the new model too, with the button (not hole), MAC is 34: and QR code on the bottom and the hack worked without difficulty. The F/W is 3.0.4.9. I connected the camera to mi home as normal, then was prompted with the message that the camera cannot be used outside of China. After that, I used Win32DiskImager to write the img file onto an SD card. And the hack worked.

aropunto commented 7 years ago

Opps. Your led is solid blue or it is flashing blue all the time? when you insert the SD?

TDPFlorida commented 7 years ago

aropunto...I am unable to format a SDCard in FAT, only FAT32, ezFAT and a few others. So you were able to change the FIRMARE?

aropunto commented 7 years ago

I changed from version 3.0.4.... to 3.0.3... because i thought that it was the reason that the Hacks doesnt work but i read that the hack works with that firmware version too. Maybe FAT32 works to downgrade the firmware but in my camera not and I tried with FAT and works. put the sd and turn on with the setup button near 20s. the orange led is solid all time and wait about 5 min and the camera restart and the orange led is flashing.

TDPFlorida commented 7 years ago

Thanks aropunto...what software did you use to format the SDCard in FAT (not FAT32?) The hack words in both versions for me too but I just want to be able to change the firmware with possible future issues.

oberlon commented 7 years ago

I got my camera today (mac 34:... and QR Code on the bottom side). Initialized it via Mi Home, updated to 3.0.4.9 and got the same message in Mi Home app (outside of China). After this I prepared the SD Card (wrote img via linux) and inserted the card while camera was on. After the click sound I can run http://camera/cgi-bin/status and install fang-hacks. Had some trouble resizing the SD Card but rtsp is working.

Disabled ftpd and telnetd:

PID USER VSZ STAT COMMAND 1 root 1164 S init 2 root 0 SW [kthreadd] 3 root 0 SW [ksoftirqd/0] 4 root 0 SW [events/0] 5 root 0 SW [khelper] 8 root 0 SW [async/mgr] 209 root 0 SW [sync_supers] 211 root 0 SW [bdi-default] 213 root 0 SW [kblockd/0] 223 root 0 SW [khubd] 226 root 0 SW [kseriod] 231 root 0 SW [kmmcd] 241 root 0 SW [cfg80211] 262 root 0 SW [rpciod/0] 269 root 0 SW [khungtaskd] 270 root 0 SW [kswapd0] 316 root 0 SW [aio/0] 323 root 0 SW [nfsiod] 332 root 0 SW [crypto/0] 399 root 0 SW [mtdblock0] 404 root 0 SW [mtdblock1] 409 root 0 SW [mtdblock2] 414 root 0 SW [mtdblock3] 419 root 0 SW [mtdblock4] 424 root 0 SW [mtdblock5] 429 root 0 SW [snx-spi.0] 438 root 0 SW [zd1211rw] 485 root 0 SW [usbhid_resumer] 518 root 0 SWN [jffs2_gcd_mtd4] 569 root 0 SW [isp] 594 root 0 SW [mmcqd] 682 root 0 SW [flush-179:0] 710 root 1160 S /sbin/getty -L ttyS0 115200 vt100 711 root 1152 S /sbin/syslogd -n -m 0 712 root 1148 S /sbin/klogd -n 824 root 0 SW [flush-mtd-unmap] 845 root 0 SW [RTW_CMD_THREAD] 898 root 1096 S wpa_supplicant -Dwext -iwlan0 -c/tmp/wpa_supplicant.conf -B 949 root 1164 S udhcpc -i wlan0 -p /var/run/udhcpc.pid -b 994 root 780 S /usr/boa/boa 1049 root 1352 S ntpd -p time.google.com 1060 root 572 S dropbear -R -P /var/run/dropbear.pid 1061 root 17780 S snx_rtsp_server -W 1920 -H 1080 -Q 10 -b 4096 -a 1063 root 1152 S {fang-ir-control} /bin/sh /media/mmcblk0p2/data/usr/bin/fang-ir-control.sh 1166 root 600 S dropbear -R -P /var/run/dropbear.pid 1173 root 1160 S -sh 1463 root 1344 S sleep 3 1464 root 1352 R ps

What is /usr/boa/boa?

~ # lsmod snx_rtc 5463 0 - Live 0xbf1a0000 8188eu 995413 0 - Live 0xbf090000 snx_vc 55545 1 - Live 0xbf07b000 snx_vb2 2067 1 snx_vc, Live 0xbf075000 snx_sd 13143 0 - Live 0xbf066000 sc2135 10044 2 - Live 0xbf05e000 snx_aud_r2r 1011 0 - Live 0xbf058000 snx_isp 147405 1 - Live 0xbf02b000 snx_aud_sigma 2168 0 - Live 0xbf025000 snx_aud_core 19325 4 snx_aud_r2r,snx_aud_sigma, Live 0xbf01a000 snx_i2s_gpio 1911 0 - Live 0xbf014000 snx_gpio 4080 5 - Live 0xbf00e000 snx_nvram 5812 0 - Live 0xbf007000 snx_crypto 6011 1 snx_nvram, Live 0xbf000000

samtap commented 7 years ago

Boa is a lightweight webserver: http://www.boa.org/

oberlon commented 7 years ago

Thx. Was too lasy to google it, sry:) Updated my first comment. Seems that everything is working well.

VolaLazioVola commented 7 years ago

I have done the hack on a camera with Mac 34: and QR code at the bottom and firmware 3.4.9. It did work well. I see services up. I need to test RTSP. I have only a question. When I do create the microsd with Win32DiskImager I get a very small partition (like couple of hundreds of mb). I tried to use the button to increase the second partition but failed. I get a message on the status page. The problem is that camera might be able to save files on the microsd but if the partition is too small then there is not much space.

Sixerito commented 7 years ago

Can you do step by step tutorial for a normal users please?

Thank you so much!!!

VolaLazioVola commented 7 years ago

here the one I did follow... very easy...

http://bobbyromeo.com/technology/xiaomi-smart-1080p-wifi-ip-camera-rtsp-streaming-hack

rsenn1 commented 7 years ago

The problem is the LED never turns solid blue.

augstenk commented 7 years ago

I have the same issue - firmware version 3.0.4.9 (new camera with code on the bottom) and Mi Home cannot work with the camera (although recording to SD card works and camera can connect to internet) - it says I'm not in China. Seller is totally unhelpful. Pretty annoying. I do not like the Mi Home app or the fact that everything goes through China server, but still, it would be nice to try it and then maybe go for the hacks.

Unfortunately, I cannot even do the downgrade of the firmware - can someone help? I put the files on SD card (unzipped), but when I power the device and push the setup button, nothing happens. For the ssh/serial... I have putty, but I do not understand how to connect to the camera with serial (I cannot use ssh as it is not yet hacked). Does anyone have a serial port these days? Lats time I used this, it was in 2007. Also, the camera does not have serial port... and if I use usb to microusb, nothing happens, obviously.

joemilan67 commented 7 years ago

For hacking RTSP looking here: https://www.youtube.com/watch?v=eiUdSjby57M For find serial port look here: https://www.youtube.com/watch?v=TsuCepL7b5U

aropunto commented 7 years ago

Finally i can do the hack. I think that the FAT partition only you can do it in a small SD (8Gb) with windows.

If you install Mi Home version 4.0.11 the messange of mainland china disapears and works.

Resabiao commented 7 years ago

@aropunto Could you please specify the steps you followed to get the "mainland china" message disappeared? Which firmware/MiHome versions did you used? Thanks in advance.

augstenk commented 7 years ago

Thanks for the guidance, joemilan67.

Resabiao - Actually he is right - I do not get the message in Mi Home version 4.0.11 and earlier (even with the new firmware), but also the video is not shown - it is stuck at step 1/3 of setting. I can see all the information from camera (IP address for example), but not the video. I assume the issue is the same- the camera cannot connect to Xiaomi server where the app is taking stream from.

Force2611 commented 7 years ago

I also have the new version of the camera. I downgraded the cam to 3.0.4.9 via SD Card. I also used the older version of MiHome which is available via .apk. But I am not able to connect to the camera after the final set up. The camera is shown as "online", but if i want to check Live-Picture.. it stuck in the monitor screen at step 1/3 "Connecting". Is there a solution for it? P.S. With the newest updated version i also have the "outside china" problem. Thank you.

augstenk commented 7 years ago

"I downgraded the cam to 3.0.4.9 via SD Card."

3.0.4.9 is actually the latest firmware - the one that is causing all the issues. You should downgrade to v3.0.3.56 or lower. I have the same issue (I haven't managed the downgrade yet) - next time I have some time, I will try the hack, then downgrade firmware and I will try to use both Mi Home and RTSP running. I wonder did someone used this camera with Synology NAS? I know there are 2 IP camera licences free, but I was under impression those cams have to be supported by Synology, which I think this one won't be (as it is designed only for chinese server streaming).

Force2611 commented 7 years ago

Sry. My fault. The current firmware on my camera is 3.0.3.56. Synology: I think so, but there is already a workaround. https://ahkhai.com/tag/surveillance-station/

gielk commented 7 years ago

I have Version 3.0.3.56 on my xiaofang but also here not able to use outside of china. Just received it. why did the block is ?

TDPFlorida commented 7 years ago

augstenk OR anyone, how do you downgrade the firmware? I am on F/W 3.0.3.56 and F/W 3.0.4.9 and the hacks work on BOTH (I'm in US, running MiHome iOS v3.16.0 set for mainland China) but I like some of the features on F/W 3.0.3.56 and would like to downgrade the one I have on F/W 3.0.4.9 not to mention in the future I might need to downgrade. I have tried all the things on this thread at different times and including: https://github.com/samtap/fang-hacks/wiki/HowTo:-Flash-original-Xiaomi-firmware-from-sdcard-(factory-reset)#via-sdcard via the SDCard and none seem to work (EXAMPLES include FAT/FAT32/exFAT 4GB SDCard. Can someone POST a complete procedure to do this using the SDCard? Thanks

Sagonips commented 7 years ago

Hi everyone,

The cameras do work on the latest firmwares outside of China. I have just received my first 4 xiaofang cameras and I updated one of them to 3.0.4.9 and the other three are still on 3.0.3.56. I noticed everyone saying the latest firmware and even the previous one doesn't work outside of China but I am in Australia and all of these cameras including the one with the latest firmware work perfectly for me. You just have to change your location to China in the Mi App.. I don't know if this only works for Australia or not but give it a go. I was unable to connect to the cameras at all until I changed my location.

Let me know

Resabiao commented 7 years ago

@Sagonips. Which are the 2 first digits of the mac address?

Sagonips commented 7 years ago

@Resabiao 34

Sagonips commented 7 years ago

I've just realise someone else already mentioned changing region to China before sorry I didn't read the entire thread. It's weird that it doesn't seem to be working for others.

bussekas commented 7 years ago

i get also this camera.

with fw 3.0.3.56 it connecting 1 and blue is blinking. nothing more do. with fw 3.0.4.9 still same state in Europa Estonia.

What i should try more?

Liorkatz commented 7 years ago

same here, i got the camera with the new version ( 34, and push button ). In the app ( IOS ) theres 2 camers one with ( ) and one without .. first i installed the one with the ( ) the camera worked !!

then i install the other type witout the ( ), enter the wifi password scan the barcode with the camera then it ask me to update , and then BOOM the camera not working ..

i tried to downgrade .. not helping i tried to install the first camera in the app ... not helping

plz help...