-
Notifications
You must be signed in to change notification settings - Fork 18
lost telnet & ftp upon upgrade to 2.1.0.0A_201703071456 firmware #5
Comments
I did not even dare to upgrade myself. :D So I have no idea what has been changed in the newer upgrade. But feel free to use my copy, or other copies provided in that thread. |
@xmflsct I tried to restore your copy through the "manual firmware upgrade" approach, but it didn't do anything. I'm still with the upgraded 2.1 version. Do you know another way to apply/use your copy? My guess is that the new firmware gets rid of the factory_test.sh hole in its init.sh file. I tried to look into the firmware through binwalk but it appears the firmware is encrypted (binwalk returns nothing). |
@andy2301 I can create a version of my custom firmware for this camera. However I can't test it as I don't have this camera. You MUST have access to the terminal through the serial port for troubleshooting. As mentioned elsewhere. Official firmware upgrade file is not really a firmware file. It is an encrypted archive. Explanation and instructions on how to unpack below. |
Great explanation of the firmware! @shadow-1 |
Hello again guys. I tried to reflash my home partition with @shadow-1's copy and my copy, both doesn't work somehow. I remember I used it when I restored my camera last time when I bricked it.. Now I have detached the serial connection just today... Tomorrow I will attach them again and see what happened, and try to produce a new flashable image. |
Oops, my copy is actually working again somehow. @andy2301 Do you still have it, and would you like to try again? |
How did you flash it? When I tried it this morning, I did the following: |
@andy2301 |
@andy2301 Aha, that's why. Because both @shadow-1's and mine copy are for uboot to use, which means that it differs from the official way of updating it. So as said, you should keep it as home_y20. Very interesting thing is that. With just @shadow-1's copy, it does not work (I have no serial output to examine the problem now). After using @shadow-1's copy, I use mine again which gives a bit different yellow led flashing pattern and that worked - at least to bring the brick device back. |
@xmflsct From experimentation (I have flashed my camera probably over 50 times debricking and getting the region ban workaround working), it appears that the check to see whether the firmware on the system matches the recovery image is based on the embedded name within the image and the timestamp. So most likely, your current recovery image will no longer work as it matches what is currently on the system. However my one will work now because (most likely) the embedded name is different and the timestamp is definitely different. |
@shadow-1 So I assume U-Boot thinks your image should be flashed, though it (might?) contain some error. After then I use my long-ago image, U-Boot now believes my image should be flashed. |
@xmflsct |
@shadow-1 Yes, I fully understand this part. :) Will first follow your approach and update this project, then see how far I can go with RTSP support as this is the function that I need - I don't care if I can use it with app or not. I have another 720p one working right now as a security cam, and would like to have another one. :) |
@xmflsct I am confident that you will be able to restore your rootfs partition in case the camera gets bricked. The recovery method is exactly the same as for the home partition. |
Thank you so much in advance! I will have a try of your ones and let you know if it is working. Saying that, I have a 040 version of SDK. I think they should have 050 by now. I will share it if I can find it and download it from somewhere. |
Thanks for the updated SDK. I knew the 040 version has been released, however I didn't find a download link for it yet. When I got the 030 version, I don't think the 040 version was released (perhaps it was very new). I haven't heard anything about a 050 version yet. With a little luck HiSilicon may have provided an example RTSP server with the SDK. Unlikely...but we can always be hopeful. |
You are welcome. :) Not sure what had been updated though. Hope it would be a bit useful to you. 050 is not released yet, at least not on the forum where I downloaded 040. While browsing, I found a post with an updated sample code that claims to support RTSP for Hi3518EV200. I will have a try tomorrow, see if I can compile it correctly. Otherwise I might need your help again. :) |
@xmflsct Using your copy of home_y20, I've got my camera back to version 2.0.0.1A_201612051401. That's awesome! Just extract it under the root directory of sd card and reboot. Make sure the name is "home_y20". |
@andy2301 Glad that it works! Do you happen to have serial connection as well? If so, can you try to change the boot delay and see if you can enter U-Boot fritz-smh#141 (comment) My camera doesn't respond to any key press signal, so I was wondering whether they tweak the hardware or just a faulty part in my camera. If you succeed in doing so, it would be nice if you could upgrade to the newest version again, and dump out the entire system in U-Boot. That provides an overview of what has been updated, and could be a base for the next step of this project. Let me know if this is feasible for you. :) |
@xmflsct There is no need to upgrade the firmware to the newest version and dump the entire filesystem. I have provided instructions on how to extract the firmware and the upgrade is simply a replacement of the files on the camera within the /home directory. Even so, if you want to make a backup of the camera and have serial access. It is easiest to use dd once booted rather than mucking around with U-Boot. |
@shadow-1 |
@xmflsct Creating the home partition took longer than what I thought it would. I need to create some more build scripts to make it fully automated. To make the upgrade more controlled and to make it easier for issues to be identified and rectified, what I recommend to do is follow the following steps:
For others that may want to try the firmware, please ensure you have access to the terminal through the serial port for debugging purposes. I do not have this particular camera so the firmware is completely untested. |
@shadow-1 By the way, the code I mentioned yesterday, I tried to compile it again, and still get the annoying |
@shadow-1 I tried the rootfs, it revived the cam! When I tried to pair it with the phone it told me "This camera can only used within China", then I tried the other fine, home_y20, but unfortunately it didn't work and once again the status is still yellow. |
@maysamsh This is completely experimental firmware and I have done quite a lot of changes to the home partition. I may have made a mistake with it because of all the changes I made without testing. You can restore the original home partition. You can use @xmflsct copy or my one and your camera will be back to how it was. |
@maysamsh Yes, with my own copy of home_y20, I get my cam back and I can use it as before. @shadow-1 Same happened to me. Flashing rootfs is fine, but bricked after home_y20. Still, I cannot run the proxychains4 from your home_h20 extract. I copy both the executable and the .so to exact the same location on my cam, I get |
@shadow-1 Unfortunately it does not work anymore, even I have tried restoring images you already provided. What was the magic?! |
@xmflsct I manually updated the firmware to 2.1.0.0A_201703071456. Yes I updated ld-uClibc-0.9.33.2.so already from a previous compile. You will also notice that Busybox on rootfs has also updated to include a few extra but useful utilities. |
@xmflsct |
@shadow-1 |
@andy2301 |
Thanks for providing the firmware @vaidyasr . Guys, i cooked another version of rtsp server that streams from /tmp/view continuously. This one should work side by side with the existing stock features. So far it's only tested on the original 2.0.0.1A firmware. |
Remember that my prior streaming solution rtsp2301 requires to shut down the stock streaming process Thanks to @shadow-1, who mentioned that the Think of the /tmp/view as a loop file that the
In summary:
Cons:
Let me know if anybody has better approaches to solve the 2 problems:
|
There are some of the variables used in rtsp2303. You can change these default values from the command line by setting env variables (as demonstrated in rtsp2303.sh script).
The following is the logic of the Monitor which part of file /tmp/view just got changed, so that we can read from there to get the latest video stream. The purpose is to make sure we stream the latest video segments rather than possibly 10 seconds lagging behind (file /tmp/view stores roughly 10 sec of video).
|
@andy2301 Are you sure Unfortunately I do not know the offset between the 1080p and the 360p streams. |
@shadow-1 I think it's a circular buffer.
|
@andy2301 With regards to the offsets, I have a suspicion that it will be either located somewhere within When I get more free time, I can disassemble the Xiaomi applications and trace what is being read from |
Please do when you get time. Thanks. @shadow-1 |
@andy2301 |
@andy2301 I am back, and just test a bit. Indeed after every reboot, To provide a separate idea that might be useful. Since when streaming with live555 of |
Sorry for late reply. I went on a trip and just got back. I didn't get much useful info from mmap.info. Maybe @shadow-1 can help us there. @xmflsct yes it'll be great if you can figure out how to read the h264 headers and adapt to the file dynamically. rtsp2303 is based on live555. I'm attaching the source code. My modification involves mainly |
@andy2301 No worries. Hope you have had a great time. :) Recently I was also thinking about using live555 as a base, since the test program can stream /tmp/view without problem, and we just have to somehow tell it to restart every (UPDATE) |
@andy2301 @xmflsct I like Live555 because it is a very mature library that is actually used in many commercial applications. However what I don't like about it is that it is written in C++ which makes the file size quite large (in comparison with C programs) and of course there is a dependency on the standard C++ library libstdc++. @xmflsct @andy2301 What really put me off C++ applications on these cameras is that libstdc++ that comes with the SDK is almost 5mb in size! That is absolutely ridiculously large which makes C++ programs completely unsuitable for these cameras as they have 16mb of flash memory in total. However I noticed that libstdc++ that you included in your source file is under 1mb in size. Much more manageable. |
@shadow-1 |
The libstdc++ lib is from the Yi 720p v1 firmware. I used a stripper called upx which reduced the rtsp2303 footprint to less tha 200k. |
@andy2301 I have put my 1080p camera into production together with my other original 720p one. It runs now with your |
@shadow-1 late to the party but, looks like there are some http streaming add-ons included with the SDK |
@saundersrg could you share the final files you used and a short tutorial? I would love to use it aswell on my dome 1080p |
It really didn't work as well as I'd hoped tbh, and was really simple. I've ended up selling the Yi and buying a Foscam FI9821P. Comparable pricing with full ONVIF, RTSP and support in Zoneminder. Firstly I flashed with the firmware from @shadow-1, and made sure I could SSH. I then took the scripts from @andy2301 moved them (WinSCP/PuTTY) into a folder under /home/ and tested that I could launch manually. The feed would work for about 10s and then the client device would disconnect (be it VLC or ZM), and I'd have to keep enabling and disabling the monitor in ZM. For some reason I couldn't get Andy's script to launch automatically at any stage, using rc or the init scripts. |
@saundersrg the client device disconnecting issue is expected, as I mentioned in my previous comment when I published |
Hey @andy2301! Thanks for sharing your work with everyone. It seems that, between your contributions and those of the several base images (like this one and @shadow-1) many have nearly managed to get a working rtsp solution on these puppies. I wanted to see if you'd managed to incorporate the latest changes you referred to in your last note. If so, any chance you'd be willing to share? If not, would you be willing to point others to the same advice and to publish your current work to a public repo so others can fork and/or create pull requests? Thanks, |
#My 1080p v1 comes with firmware 2.0 (2.0.0.1A_201612051401). I was able to apply this hack to get telnet and ftp. Thanks to @xmflsct!
However, yesterday I upgraded (through the YiHome app) to the latest 2.1 (2.1.0.0A_201703071456) firmware, and the hack doesn't work any more. Yes i tried to reapply the hack from scratch. I lost telnet & ftp.
Also tried to store the firmware using the home_y20m dump generated by @xmflsct as posted here, but it didn't restore at all (renamed it to "home" and put at root of sd card). I suspect it's a generated home partition dump, not an official firmware.
I'd appreciate if anybody can share a copy of the official firmware 2.0.0.1A_201612051401 for 1080p v1.
Btw, you can also download the latest firmware 2.1.0.0A_201703071456 here.
http://www.xiaoyi.com/home/firmware/download/?version=4
Click on "download" of the "2.1.0.0A_201703071456" firmware
The text was updated successfully, but these errors were encountered: