-
Notifications
You must be signed in to change notification settings - Fork 18
cannot use on yi v1 upgrade 1080p #2
Comments
I am sorry, but I haven't figured out RTSP server yet. So only FTP and Telnet are working. |
@xmflsct I saw your comments in the fritz-smh repository (issue #141) - I haven't had a chance to look into the details of the RTSP server myself, but I am looking forward to any progress that is made! |
@iamcanadian2222 Should you have any suggestions of how to proceed, please let me know. I do have some difficulties in cross-compiling from official SDK. |
How is the RTSP server going? Could you write down some cross-compiling errors here? |
@ilzc I can successfully cross-compile the official SDK samples, but when I run the exec on the camera, it is either segmentation fault or "line 1: syntax error: unexpected word (expecting ')')". And I try to cross-compile a simple hello world, then same problem... |
@xmflsct It's probably the file is not executable. try command "file $YourFile" or "readelf -h hello_qt" to see if it's executable or not. example(excutable): |
@xmflsct try to remove gcc compile args '-c'. |
@ilzc Thanks. Yes I tried to use 'file' to see if the output is really an executable. And they were perfect executables but just cannot run properly. Tomorrow I will try to use some extra arguments to see if that helps. I am not an expert in compiling, therefore I have little knowledge about how to debug stuff... If you would like to try a bit as well, herewith a link to the official SDK that I found online. 040 is a newer version than 030. |
@ilzc Just to update. My hello world test has such output: |
@xmflsct I don't have a yi-1080 to test right now. |
@xmflsct I was able to compile and run some programs for the old 720p camera, using the arm-hisiv100nptl-linux compiler. The same binary works on 1080p camera as well. I used the following to configure and make. CXX=arm-hisiv100nptl-linux-c++ CC=arm-hisiv100nptl-linux-gcc RANLIB=arm-hisiv100nptl-linux-ranlib STRIP=arm-hisiv100nptl-linux-strip ./configure --host=arm-linux && make Note: don't use the arm-hisiv200-linux one. The compiled binary is not compatible. |
@xmflsct Also, I was able to make rtspsrv run on the 1080p with the following trick (copied all settings and libraries from 720p). It runs but couldn't serve the 1080p stream to VLC client (segment fault). 1. add the following to /etc/fstab, and then run "mount -a"echo "tmpfs /dev/shm tmpfs defaults 0 0 2. create symbolic linksln -s /tmp/mmap.info /home/mmap_tmpfs/mmap.info 3. extract all libraries required by rtspsvrlibusr.zip 4. run the rtspsrvexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/app/libusr rtspsvr runs at a different prot 19761 (default 554). If you bring up a VLC client,rtsp://mycamIPAddress:19761/ch0.h264the program will segment fault while struggling to serve the VLC client. |
It appears to me that the rtspsvr approach simply can't handle 1080p streaming. Is there an open source verison of the rtspsvr that we can modify and compile? I also noticed that the new /home/app/p2p_tnp binary can stream to my YiSmart iOS app in 1080p. It's pretty nice! Wish they open source it (daydreaming...) |
@andy2301 Still I have to run a terminal to fix my problem? anyway to avoid it? |
@maysamsh avoid what problem? Please elaborate more so that we save time understanding each other. |
@andy2301 Oh sorry, I thought it was in this topic. Anyway, I restored an image #3 (comment) and now when I turn on the camaera it blinks 3 times and turns into a still yellow color. Is it possible to for you to create an image from your camera and I restore it? |
@maysamsh sorry, i don't know how to create an image. If you know how to, let me know and I can give it a try. Also, try a google search, I vaguely remember that I saw somebody posted an image online somewhere (can't remember where, and i'm not 100% sure). |
@maysamsh I found a firmware for you. |
@andy2301 Thank you so much for the information! It seems that I have another version (that I forgot where I found it) of rtspsvr which listens on port 8554. It runs smoothly until a connection comes in. My version won't get segmentation fault, but instead, Concerning p2p_tnp, I can run it, but it seems that I haven't been able to bypass region ban still. Do you have any suggestion there? I tried to change the api call address, which will result in null response. But then, I also cannot use my app to connect to the camera. @maysamsh Yes, I had done it before. But for now, I would focus on getting rtsp to work. Attached is the home_y20 I used before. Let me know if it is working. Without terminal output, it is difficult to tell whether rootfs of home goes wrong though... |
@xmflsct Thanks for the file, it flash and at the end blinked in some weird ways, but the result is the same, still yellow. I'm getting a serial-USB connector today and connect it to the cam today or tomorrow. |
@maysamsh Then we definitely need serial output to understand better things inside... Once we sort that out, we are free. Now I have detached the serial cables and simply use telnet to play with it. :) |
@xmflsct I have created my own firmware for the Xiaomi 1080p Dome camera and I have gotten around the region ban on the camera. The same implementation will work for the Yi 1080p Home. With regards to issues in compiling. You really need to use arm-hisiv300-linux compiler. Other compilers will not work properly with the chipset used on this camera. I have successfully compiled live555 rtsp library among other libraries. However I have been having trouble getting the library to stream from a continuously changing file. I can stream video files from the camera without issues. I have read numerous threads on the live555 mailing list with issues streaming live media using unicast protocol. However with no real solutions. Apparently live streaming using live555 library using multicast protocol works without issues, however IP multicast communications doesn't appear to work with this camera when I tested it with iperf. I haven't had enough free time to really develop a proper opensource RTSP application for these cameras. |
@shadow-1 Great! I will take a look how you handle region ban issue in your project. :) I have little knowledge to C, so I am very slow in resolving compiling and running issues... I do have arm-hisiv300-linux installed. And I can (seems to) compile official mpp sample programs without problem, but they won't run as well. :( If you are familiar with this process, can you try to compile RTSP_stream_server project? People seem to get it working with other versions of Yi camera, yi-hack/issues/118. I tried with their build, but I get |
I am familiar with the process. I had a quick read through the thread. Unfortunately that thread is is for a completely different camera, the XiaoFang based on a Sonix chipset. The big advantage for this chipset is that the Sonix SDK includes an sample RTSP server implementation based on live555 library. So simply compiling the sample allowed RTSP to work, then you just need to tweak the sample to introduce extra features. HiSilicon does not provide a sample RTSP server with their SDK as far as I can tell, so it will take a little more effort to get it working. |
@shadow-1 Very clear answer! Thank you so much! Then I won't spend time on that. By the way, I am trying to run the proxychains4 in your project, but I get |
@xmflsct However it should compile properly and run without errors (even without upgrading uClibc). However it will only actually work when you upgrade uClibc. I have provided the .config required to make it compile properly without breaking anything on the system when you upgrade. The filesystem structure could be slightly different between the Yi Dome and the Yi 1080p Home, so the config.mak file may need to be slightly tweaked. Specifically the libdir parameter. |
@shadow-1 Hmm.. That's pretty annoying though. I was assuming those uClibc were the same, as they appeared to have same version number.. That probably explains why some program I tried also broke with illegal instruction. Thanks again! With my building embedded system knowledge, I will see what I can try next. And hope @andy2301 might come up with something. |
@shadow-1 thanks for the additional info! Can you confirm if the arm-hisiv300-linux compiled binary would work on this 1080p v1 camera? I'm downloading the SDK. I confirm that arm-hisiv200-linux compiled binary does NOT run, not even the simplest hello world program. As I said before, arm-hisiv100nptl-linux compiled binary runs very well on both the 720p v1 and the 1080p v1 cameras. |
@shadow-1 also, proxychain is an excellent idea! I'd love to try it out to get rid of the region ban. Currently I'm using a split brain VPN tunnel in DD-WRT router to work around the region ban. I tried to play around with shadowsocks + torsocks but apparently LD_PRELOAD doesn't work on this camera (torsocks uses LD_PRELOAD). I was able to cross compile shadowsocks with arm-hisiv100nptl-linux, it runs on 720p v1 but throws a runtime error on 1080p v1. |
@andy2301 arm-hisiv300-linux should work, as the comprehensive documentation suggests. Though I cannot get it working myself, either As I described above, our system cannot handle proxychains natively, thus I have tried the methods suggested by other people which works quite well. But please note that, in our system, instead replace |
@xmflsct Thanks for confirming that arm-hisiv300-linux works. Yes the check_did hack does work to get rid of the region ban, however, it also prevents the YiHome app from connecting/viewing the 1080p v1 camera remotely. Note that the same check_did hack works with the 720p v1 cameras (with YiHome app works flawlessly). The difference lies in an upgraded p2p_tnp in 1080p v1. I compared the p2p_tnp output in /tmp/log.txt between 720p and 1080p v1. It seems that they added another layer of secKey verification in p2p_tnp when YiHome app tries to connect to the camera. What happens is that, the api/xiaoyi.com/check_did call initiated from p2p_tnp at startup time sends a secKey to the server. If the secKey were not passed to the server (basically what our check_did hack did), the p2p_tnp process would simply throw an WRONGPWD error when the YiHome app tries to connect. |
@xmflsct Something doesn't seem right with your build environment. I can only guess that your compiler is linking against incompatible libraries if you are having so many issues compiling applications to run on the camera. All the simple region ban hacks no longer work. @andy2301 From the startup of the camera (from others), I see the following: I know that you need to compile against arm-hisiv300-linux or arm-hisiv400-linux for HiSilicon hi3518ev200 chipset. arm-hisiv-300-linux is compiled against uClibc whilst arm-hisiv400-linux is compiled against glibc. I can confirm that the kernel and all software on this camera has been compiled against uClibc. Therefore the correct compiler to use is arm-hisiv300-linux. To save time downloading the SDK from super slow sources. I have already hosted the SDK on my personal box account below: |
@shadow-1 Awesome! Thanks for sharing the SDK and confirm my theory! I thought I'm going to wait for another day before the SDK download is complete but now I'm already done. Need to get my serial port connected tonight before I can do anything though. Thanks again! |
Just for your benefit and for everyone elses. The latest SDK I have to download is Hi3518E_V200R001C01SPC030. The free Box account has a file size limit of 250mb per file, so I had to split the SDK into 6 pieces. You need to download all 6 files starting with Hi3518E_V200R001C01SPC030 to be able to extract the ZIP archive. I didn't want to delete the other SDKs as they take soooo long to download and they are valid SDKs. However not necessarily for the Hi3518eV200 chipset. |
@andy2301 Could you manage to create an image of your camera? |
@shadow-1 thanks! Yes, I downloaded all the zip splits of Hi3518E_V200R001C01SPC030 and extracted. @maysamsh Unfortunately I lost my telnet access to my camera, after I upgraded to 2.1.0.0A_201703071456.
|
@andy2301 Seems the default framework does not work, nothing happens when I boot the cam with the SD which contains the firmware. I have tried all possible names, "home", "home_y20", "home_y20m" and none of them worked. |
@maysamsh I upgraded through the YiHome app, it will be a big thing if the default "manual upgrade" approach doesn't work any more. It could be but I have no way to confirm as I don't have another (different) official firmware to try it on. I'd suggest you get a serial port cable and try to troubleshoot the problem in your current firmware (without upgrade or restore at all). Just see what's going on with your camera. |
@andy2301 I'll do it tomorrow [hopefully] |
@shadow-1 I compiled successfully the uClibc 0.9.33.2 using hisiv300 compiler, with source code and the uClibc ".config" file from your yi-hack-v3 repository. But I found it's the same version as used in /lib/uClibc. So I'd like to confirm a few things with you:
Thanks for your instructions! |
@andy2301
I will compile a version of my custom firmware for this camera. I already have it fully tested and working for the Yi 1080p Dome camera. It is a trivial change to make it work for the Yi 1080p Home. |
@shadow-1 thanks a lot! I was able to upgrade the uClibc library and get LD_PRELOAD working. In fact, it works even without a reboot (of course it sustains after reboots). I simply replaced the current /lib/ld-uClibc*.so with the newly cross-compiled ld-uClibc one. BOOM! LD_PRELOAD works, proxychains-ng works, torsocks works too! |
I gave this a try but no dice. I was able to cross-compile the live555 media server, but not the RTSP_stream_server. The latter requires alsa sound library support but our sdk doesn't have it. live555 media server runs on the camera, but it segment-faulted while streaming a m4e/mp4 video file. We're back to square one. I noticed that the original rtspsvr prints out sth like this: |
Is it possible to create an image which bypasses region check? |
@andy2301 And all three versions of rtspsvr in this project are based on the one from MP77V. They can run on 1080p, but does not open up port in the new version of the system. And I try to find back any source code, but sadly all links posted by MP77V on 4pda.ru returned 404. This path seems to be a dead end. The hp_ipc I provided in my project seems to start from too low level that is very difficult to get it running in the first place, and might trigger watchdog somehow. We need to find a higher level one like rtspsvr. |
@andy2301 found the source code for rtspsvr: |
i look on putty this show picture.
https://www.img.in.th/image/CoEq
https://www.img.in.th/image/ColN
The text was updated successfully, but these errors were encountered: