-
Notifications
You must be signed in to change notification settings - Fork 154
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
[yi-hack-v4] Support and continue the development - Trying to contact shadow-1 #241
Comments
Hey @TheCrypt0 I am pointing @shadow-1 to this thread, let's see if he has some time to help us out. Cheers. |
Hi @batrarobin, thanks for the quick reply, looking forward to hearing from him. |
@TheCrypt0 I stumbled upon this repo today, hope you find it useful - https://github.com/Necromix/yi-vencrtsp |
Hi @TheCrypt0 It is good to see that others have picked up what I have worked on and started extending the functionality further. Please feel free to ask any questions. The last time I played around getting the RTSP working, I was disassembling the custom Xiaomi applications and examining how they work. There are several applications running on the camera which share information between each other. I believe it is likely that Memory Mapped File(s) are being used to exchange information between the various processes. The '/tmp/view' file is being utilised by the Xiaomi applications and I was looking at how the file is being read by the official applications so this can be replicated for our own purposes (namely RTSP). I wanted to go down this path because I envisaged this firmware allowing to make use of the Xiaomi smartphone app and/or RTSP concurrently. There are other approaches which can be investigated (which some other custom firmwares have followed). However this inevidently means ditching the Xiaomi applications altogether (killing Xiaomi smartphone app support). It also means an alternative method for setting up WiFi is required. |
Awesome! I hope you guys will be able to get this up and running on the Outdoor 1080p too since that's the one I'd love to use for use with Blue Iris. All it really has to do is provide a stable RTSP stream, nothing more, and I'd be happy already ;) Btw. wouldn't it be better to make a fork for your project now? I don't think that "hiding" something new and way better in just a normal issue would be good, have seen way too many project getting far too cluttered that way. |
Hi @shadow-1!
Some questions:
Sorry for the wall of text, I just came home and surely there are some other questions, but I currently don't remember them. The RTSP server I'm currently working on reads directly from Btw, Happy New Year! @imthebossofme However I created a daemon to allow the buffer to be parsed and checked (#126 (comment)) and managed to get a pretty consistent image with some tweaks to @andy2301's rtsp2303 server. @EpicLPer
Do you mean the v4 or the current version? If you meant mine, I'm waiting to make the repo public because I want to make sure that everything works fine. |
I own few Yi Home cameras US47 and 1 old chinese - I'm available if you need some testing or some other way I can help (donation also) for real RTSP support in this cameras. |
Hi @TheCrypt0 Best regards and good job |
Hi @lupo-ch, Hey @BlueBlueBlob, I'm looking for another more direct way to communicate (slack? discord?) to provide you the beta versions of the firmware. Greetings |
@TheCrypt0 Well, a Discord Server definitely would help :) Or even just a Discord group DM would do, you can add me if you want: EpicLPer#0001 |
maybe just a telegram group / channel? |
@TheCrypt0 Answers to your questions are as follows:
Keep in mind that whilst the open source programs I cross-compile along with my own custom plugins work on all cameras. Each camera is unique with differing WiFi chipsets, different image sensors, different Xiaomi binaries etc. So it is not possible to create a single universal firmware that will work on all cameras. That is why I decided to start with an initial sysroot which is unique for each type of camera and have the modifications I make universal.
|
@shadow-1 Do you know how to escape the running command when viewing the serial output? I can't Ctrl - C out of it neither does spamming it at boot work. At least on 3.0.0.0D, I hope they didn't just fix that... |
Maybe your RX wire is connected correctly but not the TX wire so not taking any commands from keyboard? Generally pressing Enter key brings you to the command prompt. |
@batrarobin I made sure it's actually sending commands by disconnecting it and then pressing buttons, once that happens I don't see any additional letters/Ctrl-C command appearing in the terminal anymore so it's indeed working and sending everything over. Except if I have to set something inside of Putty for that to work but I don't think so? |
@EpicLPer If so, I do not have this camera, so I can not know for sure. However others have said that they have experienced exactly the same issue. I believe Xiaomi disabled access to the terminal over serial. This is probably achieved by deleting or commenting out a line in one of the init scripts (I did not investigate). Some brave people have tried flashing yi-hack-v3 designed for the Yi 1080p Home on their Yi 1080p Outdoor (by simply renaming the firmware file). Apparently flashing the rootfs partition is successful and results in having access to the terminal. However does not always boot successfully. Check out this thread which has a LOT of detail: #82 If you decide to go down this path, it is high risk as we do not have a backup of the stock firmware. It is possible to soft brick the camera and have no way of restoring the stock firmware at this stage. |
@shadow-1 Well that's the thing, I don't want to flash any custom stuff to it before I don't have a backup of the stock firmware. I tried getting those files but yeah, these Chinese sh... disabled the terminal it seems :( Any other way you can think of to get a backup without desoldering the flash? Cause I'm definitely too unskilled to do that, yet alone dump it afterwards... |
@EpicLPer From the huge thread, it appears that perhaps the boot script may look to execute a shell script off the microSD card. If this is the case, it may be possible to dump the stock firmware to microSD card by writing a shell script which is automatically executed on boot. |
Discord ServerI've just created a Discord server with a couple of channels. Invite link. Thanks for your time, I see that this new version is beginning to take shape. I'm now almost ready to publish a beta version of it. Thanks for the license too! I'm having some troubles compiling libwebsockets. When the patch file you created is applied I can't find the correct config file to patch. May I ask you which version or repo you used to generate lwsws and the required shared-libraries? Greetings The serial console looks completely locked on the Yi Outdoor 1080p camera. Yesterday I was in a discord call with @EpicLPer for like 1 hour trying to figure out a way to stop the boot process or to get the shell access whout luck. We tried a bunch of different keys, including the magic sysrq, but without luck. The RX pin was correctly soldered since when pressing a key the result was echoed in the serial terminal. Anyway, let's continue this discussion here #242 or here #228 |
@TheCrypt0 The patch I created for lwsws fixes a bug in their source code. Probably doesn't affect most people. However I was squeezing the application to a minimum file size and minimum memory footprint and disabled absolutely every feature which is not necessary via their init script. From memory, after removing a a whole lot of features (which had their own library dependencies) with their init script, the source code still referenced libraries which were removed from the build process. Hence I could not cross-compile lwsws. This issue may have been resolved in lwsws by now. The patch may not be necessary. |
@TheCrypt0 Link: https://github.com/warmcat/libwebsockets/tree/d383b94dbf16026478c26f9ba2d2fc15dcfd0127 |
Thank you. Since I'm not familiar with libwebsockets my plan was to just compile and place the files in the firmware, just to make the webserver work without creating another from scratch. I'll learn how to use the library when everything will be stable. Greetings |
@TheCrypt0 I found making use of WebSockets much more powerful for server side processing compared to CGI which can be utilised with httpd included in busybox. |
Hi, awesome project! Would this hack work with the Yi Home 1080p that I just got from Amazon with firmware version 4.5 ? |
Hi, Same problem here, anybody could hack with firmware version 4.5? |
Me too, firmware 4.5.0.0A, hope to see a working custom firmware for this version |
To the last 3 guys here go check https://github.com/TheCrypt0/yi-hack-v4 instead of this outdated one here. |
Hi everyone,
first of all I'd like to say thanks to @shadow-1 and to all of the contributors for the effort and the work that has been put into this project. That said, I'd like to create an updated version of the firmware called
yi-hack-v4
.Long story short, I started to work on the RTSP implementation (previously developed by @andy2301) for my Yi Home camera and I created a daemon called
viewd
to get/tmp/view
circular buffer information. Meanwhile, I started to dig into the open and closed issues of the various yi-hack projects and I noticed that there are a some cool tweaks and scripts that could be implemented directly in the firmware (like @frekel's Telegram alarm system).I tired to deploy my custom version of the firmware following the fragmentary informations I could find in the issues and I managed to:
viewd
(Streaming ideas #126 (comment))As shadow pointed out, he hasn't been able to continue the development of the firmware for some time and it's been almost a year after the last release. Since my daily job is related to this field (development hardware/software and adaptation of the Linux Kernel for our company's ARM embedded systems) I'd happily contribute!
I'm now trying to contact him or @batrarobin (which said that he personally knows shadow #15 (comment)) to give me a couple of hints about the firmware, especially on the BusyBox stuff.
If someone have any contacts (or hints about the firmware) please reply to this issue.
Thanks
Edit: corrected typo.
The text was updated successfully, but these errors were encountered: