shadow-1 / yi-hack-v3

Alternative Firmware for Xiaomi Cameras based on Hi3518e Chipset
GNU General Public License v3.0
1.16k stars 154 forks source link

Yi 1080p Outdoor EUR support #228

Open fedyfausto opened 6 years ago

fedyfausto commented 6 years ago

Hello guys! I have a Yi 1080p outdoor EUR version and i'm wondering if i can help you to support this camera, can i give to you some informations?

nonick321 commented 6 years ago

There is already a thread (#82). Unfortunately rtsp is not working at the moment..

fedyfausto commented 6 years ago

yes i seen that thread and i flashed the firmware y20 reneaming to h30. The camera flashed the firmware but now the led still in yellow color

EDIT i put my old wpa_suplicant file into sd and now my cam is connected and i can access via telnet, now how can i restart the normal functionalities (like cloud service or stream via app)? Or there is a possibility to reflash the original firmware?

EDIT 2 Ok i manually launched the application dispatch e some others and then i edited the init.sh file to launch these application and now the cam works perfectly, now i'm going to investigate on rtsp

aelg305 commented 6 years ago

@fedyfausto I saw your comment on the other post about rtsp, any success getting there?

fedyfausto commented 6 years ago

unfortunately not yet but i do not know that i'm the best guy for resolve the problem :D

aelg305 commented 6 years ago

Cool. Anything I can do to help?

fedyfausto commented 6 years ago

Mmmm i am not really a rtsp expert so i do not know any technologies or software to run a rtsp server for this cam, somebody can help me in some way? (A list of rtsp server bin to test maybe? )

fedyfausto commented 6 years ago

guys i did it! and cloud features works too! If someone could teach to me how to export all of my root direcotry and make some of firmware for this camera i can publish the firmware :D

UPDATE The rtsp server that i found seems that crash after some time (using VLC) but if i restart the player i anca see again the stream (and re-crash after some time). In addiction, the stream does not seems 1080p but 360p xD

The errors provided by VLC are:

main warning: picture is too late to be displayed (missing 9984 ms) main debug: killing decoder fourcc `h264' main debug: removing module "avcodec" main debug: saving a free vout main debug: reusing provided vout main debug: removing module "h264" main debug: removing module "live555" main debug: Program doesn't contain anymore ES main debug: dead input main debug: changing item without a request (current 4/5) main debug: nothing to play main debug: destroying useless vout main debug: removing module "direct3d11" direct3d11 debug: Direct3D11 resources destroyed qt debug: IM: Deleting the input direct3d11 debug: Direct3D11 device adapter closed direct3d11 error: SetThumbNailClip failed: 0x800706f4 direct3d11 debug: Win32 Vout EventThread terminating direct3d11 debug: Win32VoutCloseWindow direct3d11 debug: WinProc WM_DESTROY main debug: removing module "inhibit" qt debug: releasing video... qt debug: Video is not needed anymore main debug: removing module "freetype" main debug: removing module "yuvp" main debug: removing module "swscale"

aelg305 commented 6 years ago

@fedyfausto did it...yaiiiii.... Now, somebody help this dude to get that code out. Lol

fedyfausto commented 6 years ago

I'm have some torubles with rtsp because after some time che client crashs :S i'm using a server built by a user @andy2301 and this binary wants some of particular settings that i'm trying to discover what are the best values. If you help me i can upload the fix and the server bin / src :0

fedyfausto commented 6 years ago

There is the link to Mega. Exctract the files into your SD and then: 1) If all of services just works copy only the rtsp2302* files and libstdc++.so.6 into /home/app/ 2) If all services does not work copy all files into the same path /home/app/

IF yourcam does not connect to your wifi connection then reset with the reset button Finally, edit the rtsp2303.sh file and play with the values and test your rtsp cam with vlc, if something does not work, edit the file, save and execure reboot from console https://mega.nz/#!9Fw0iYjZ!UmJ81DohmUpC1UetOW6JRvjR0ioHerm2qmh91XR1BGs

aelg305 commented 6 years ago

@fedyfausto Dummy here.... so: -format the SD card -drop the zip file (unziped) to the root of the SD card? -turn on and if everything works, then turn off and move the files? if not....step 2 from your post....right?

not working for me :( Do i need to telnet or ssh into it?

fedyfausto commented 6 years ago

wait do you can not login with ssh or telnet?

aelg305 commented 6 years ago

not letting me SSH or telnet! :(

I followed this steps: -format the SD card (on mac) -drop the zip file (unzipped) to the root of the SD card..all files... -then turned the camera ON with the SD card and everything with the Yi app (no telnet) -then turn off and moved the 3 files -still no telnet but yi app still works! :o

fedyfausto commented 6 years ago

Ok so let's start from the begining: First of all download this version of firmware and place the files into your SD card with a wpa_supplicant.conf file https://mega.nz/#F!s9wVzZQZ!k6F3p8HcWCoWl-jla2Cxpw Subsequently check if your camera connects to your wifi connection and then connect via telnet (root, void) Finally, download my fix https://mega.nz/#!9Fw0iYjZ!UmJ81DohmUpC1UetOW6JRvjR0ioHerm2qmh91XR1BGs and then THIS TIME copy only the files [rtsp2302, rtsp2302.sh, libstdc++.so.6, init.sh] into your /home/app/ You can access to your sd from /tmp/sd/

aelg305 commented 6 years ago

I tried different tyes of wpa_supplicant....none worked :(

router shows the 2.4 Hgz with: WPA2-PSK [AES]

sample 1: `ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 ap_scan=1

network={ ssid=“name of SSID” key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk=“password_here” priority=2 }`

sample 2: `ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 ap_scan=1

network={ ssid=“name of SSID” key_mgmt=WPA-PSK proto=RSN pairwise=CCMP psk=“password_here$” priority=2 }`

fedyfausto commented 6 years ago

this is mine: ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ ssid="[SSIDHERE]" scan_ssid=1 proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="[PASSHERE]" }

aelg305 commented 6 years ago

Perfect, that helped. I also read this https://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf(5) and it was great with the settings.... I hope it helps everyone else.

fedyfausto commented 6 years ago

remember that you must use this only to insert the fix files and then you can restart the camera and use it like normally use but with telnet service and rtsp (needs to be fixed)

aelg305 commented 6 years ago

got telnet working, then took the sd out and had to create the folders home and then app /home/app and drop the 4 files into it, then telnet into it and ran ./init.sh

fedyfausto commented 6 years ago

No now if you can access via telnet you can list on /home/app directory and you can see a list of binaries of application. So if you list on /tmp/ad you can see the sd content. Now copy/replace that files of my fix into the /home/app and then you can test if all works resetting the camera (type reboot) and then configure it with application in normal way (press the reset button until you hear the voice from camera and then reset again or plug out , subsequently configure the camera with app) From now you can try and test some value of RTSP editing the rtsp2303.sh and rebooting the camera. That server does not work properly but you can find another bin of rtsp server and try it. Anyway I can upload the source code of rtsp2303 if you want

srerick1 commented 6 years ago

I will try this weekend on my camera thanks

aelg305 commented 6 years ago

planning on comitting this to the git?

aelg305 commented 6 years ago

so, there was a firmware update which killed the hack.... so I went back: FOR THOSE THAT NEED STEP BY STEP..like me... and need to replicate.

RSTP + Xiaomi outdoor camera

-formatted the card -downloaded the files from yi-hack (roof_y20) and renamed them to h30 and included my wpa_supplicant.conf and let it boot (yellow light comes one, then flashing yellow (meaning is flashing) and then solid yellow but no connection yet -disconnected and drop the files from fedyfausto with the h30 and y30 and connected again -yellow -> flashing -> solid -> connected after a couple of turn on/off from power -telnet into it to confirm -> OK -copy the following 4 files to the home directory using telnet (rtsp2302, rtsp2302.sh, libstdc++.so.6, init.sh)...used command: cp .sh .6 rtsp* /home/app -sealed the deal with a power cycle (disconnect from wall/reconnect)

notes: -fedyfausto mentioned that we need to play around with the rtsp options and I havent been able to find one that works for me yet..(havent try any, but I will and report back). I was able to get my camera software MotionEYE to recongnize the camera but image is not coming back yet... more to come. -the Yi app does open and there is a stream, which is great! -typing in my browser http://camera_IP or http://yi-hack-v3 does nothing, however, I do see the IP from the router and when scanned for open ports, only port 23 is open.

Thanks to everyone...special thanks to fedyfausto....if there is someone that can figure out, its you! :)

nonick321 commented 6 years ago

Great work @fedyfausto.

From time to time i get a stream in tinycam which breaks after some seconds. It reminds me to my xiaomi dafang. But if you set the stream Option to "fixedqp" the stream does not break anymore.

I wonder if this Option exist in the source code of the rtsp2303?

Did you compile the source yourself? Perhaps wie could try to compile the rtsp Form the dafang hacks?

fedyfausto commented 6 years ago

no i did not compile my self i found the binary and the source code on some git topic and then i tried it, we can try such i said another rtsp server, can you share the hack/repo?

fedyfausto commented 6 years ago

so, there was a firmware update which killed the hack.... so I went back: FOR THOSE THAT NEED STEP BY STEP..like me... and need to replicate.

RSTP + Xiaomi outdoor camera

-formatted the card -downloaded the files from yi-hack (roof_y20) and renamed them to h30 and included my wpasupplicant.conf and let it boot (yellow light comes one, then flashing yellow (meaning is flashing) and then solid yellow but no connection yet -disconnected and drop the files from fedyfausto with the h30 and y30 and connected again -yellow -> flashing -> solid -> connected after a couple of turn on/off from power -telnet into it to confirm -> OK -copy the following 4 files to the home directory using telnet (rtsp2302, rtsp2302.sh, libstdc++.so.6, init.sh)...used command: cp *.sh .6 rtsp_ /home/app -sealed the deal with a power cycle (disconnect from wall/reconnect)

notes: -fedyfausto mentioned that we need to play around with the rtsp options and I havent been able to find one that works for me yet..(havent try any, but I will and report back). I was able to get my camera software MotionEYE to recongnize the camera but image is not coming back yet... more to come. -the Yi app does open and there is a stream, which is great! -typing in my browser http://camera_IP or http://yi-hack-v3 does nothing, however, I do see the IP from the router and when scanned for open ports, only port 23 is open.

Thanks to everyone...special thanks to fedyfausto....if there is someone that can figure out, its you! :)

Thx guys, yes the next step (after rtsp) is that fix the dns and then create a web server/page from witch manage the camera

hiwing15 commented 6 years ago

Will this work on the Chinese version of the camera?

aelg305 commented 6 years ago

so, there was a firmware update which killed the hack.... so I went back: FOR THOSE THAT NEED STEP BY STEP..like me... and need to replicate. RSTP + Xiaomi outdoor camera -formatted the card -downloaded the files from yi-hack (roof_y20) and renamed them to h30 and included my wpasupplicant.conf and let it boot (yellow light comes one, then flashing yellow (meaning is flashing) and then solid yellow but no connection yet -disconnected and drop the files from fedyfausto with the h30 and y30 and connected again -yellow -> flashing -> solid -> connected after a couple of turn on/off from power -telnet into it to confirm -> OK -copy the following 4 files to the home directory using telnet (rtsp2302, rtsp2302.sh, libstdc++.so.6, init.sh)...used command: cp *.sh .6 rtsp_ /home/app -sealed the deal with a power cycle (disconnect from wall/reconnect) notes: -fedyfausto mentioned that we need to play around with the rtsp options and I havent been able to find one that works for me yet..(havent try any, but I will and report back). I was able to get my camera software MotionEYE to recongnize the camera but image is not coming back yet... more to come. -the Yi app does open and there is a stream, which is great! -typing in my browser http://camera_IP or http://yi-hack-v3 does nothing, however, I do see the IP from the router and when scanned for open ports, only port 23 is open. Thanks to everyone...special thanks to fedyfausto....if there is someone that can figure out, its you! :)

Thx guys, yes the next step (after rtsp) is that fix the dns and then create a web server/page from witch manage the camera

so, the extra files you have on your fix? or thats "coming soon"? :)

fedyfausto commented 6 years ago

Will this work on the Chinese version of the camera? I think so, but i have not a Chinese Version, only EUR :(

@aelg305 Maybe when we have something that works with our cams

aelg305 commented 6 years ago

@fedyfausto Question, were you able to get any streams out? or does the stream keeps crashing? I'm able to connect with telnet and the stream gets picked up by MotionEYE a very light weight simple software to monitor cameras....but NO actual image.

Willytoons commented 6 years ago

@aelg305 mi cámara es la OUTDOOR YI 1080, el archivo no viene comprimido, y cuando lo descargas solo es uno y no 2 como en los otros modelos

Willytoons commented 6 years ago

@aelg305 , estimado Andres, el nombre del archivo q se descarga para mi camara es 3.0.0.0D_201809111054home_h30m , sabrás por casualidad, que nombre le tengo que poner para conseguir la actualizacoión. Gracias.

aelg305 commented 6 years ago

-formatted the card -descarga de https://github.com/shadow-1/yi-hack-v3/releases roof_y20 y roof_h20 y renombrar roof_h30 y y20 respectivamente -salva el nuevo archivo a tu SD -crea un archivo llamado wpa_supplicant.conf (este archivo tiene la configuracion de tu wifi, etc) -pon tel SD en la camara y dejala iniciar -cuando la luz amarilla esta titilando (quiere decir que esta flashing el software) -cuando se ponga solida es que termino -desconecta de la electricidad -ahora tinees que bajar unos archivos que fedyfausto creo y reemplazar, los archivos son: terminan con h30 and y30 y rtsp2302, rtsp2302.sh, libstdc++.so.6, init.sh (mira el post https://github.com/shadow-1/yi-hack-v3/issues/228#issuecomment-420783740) -una vez en el sd, ponlo en la camara y conectar la camara otra vez -luces: amarillo -> titilando -> solid -> conectada al wifi despues de unos minutos

-si puedes hacer telnet a la camara, el hack funciono -ahora tienes que copiar 4 archivos del SD a la camara pero desde telnet: -usa el commando en telenet: cp *.sh .6 rtsp /home/app

    * donde cp = copiar  - *.sh = los archivos a copiar los utlimos dos argumentos son la direccion de donde a donde copio.

-haz un ultimo power cycle = desconnecta y vuelve a conectar y que prenda... Hope this helps!

Willytoons commented 6 years ago

estimado @aelg305 casi todo lo del paso a paso lo puedo hacer, pero no tengo ni idea de como crear el archivo supliccant.conf :( :(

aelg305 commented 6 years ago

ok, el wpa_su varia dependiendo de tu configuracion. Te toca leer un poco aqui: https://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf(5) Mi configuracion del router usa WPA2-PSK [AES] y se conecta solo en el 2.4Ghz bandwidth

cambia los valores abajo para el ssid y el password... deja las comillas "..."

`ctrl_interface=/var/run/wpa_supplicant ap_scan=1

network={ ssid="nombre de la red" scan_ssid=1 proto=WPA2 key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk="password de la red" }`

mikfaina commented 6 years ago

English please

skywluke commented 6 years ago

I try, but not clear for me, please help me:

I made it, but nothing happend! No telnet, no ssh. :-( Please help me.

skywluke commented 6 years ago

Dear Guys! @fedyfausto @aelg305 First of all i installed to the camera newest official version. With filename home_h30m. I downloaded and renamed (from here https://github.com/shadow-1/yi-hack-v3/releases ) and put the sd card. home_h30 home_y30 rootfs_h30 rootfs_y30

Downladed and replaced (on the sd card) @fedyfausto files home_h30 and rootfs_h30. Boot the camera. No telnet, no ssh. And then copy the files [rtsp2302, rtsp2302.sh, libstdc++.so.6, init.sh] into /home/app/ (what i have to create) Result is same, no telnet, no ssh. What i did wrong?

fedyfausto commented 6 years ago

first of all preapre a wpa_supplicant file like this one: ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ ssid="[SSIDHERE]" scan_ssid=1 proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="[PASSHERE]" }

prepare your SD card:

  1. format to fat32
  2. put these files into it https://mega.nz/#F!s9wVzZQZ!k6F3p8HcWCoWl-jla2Cxpw
  3. put the wpa_supplicanti nto the rrot of sd card

then, put the sdcard into your cam and then wait until the led stops to blink (so fixed yellow color) After that, search on your local network the camera and test to telnet it

skywluke commented 6 years ago

No, it doesn't start firmware update. Normal start, with original configuration.

aelg305 commented 6 years ago

English please

English there: https://github.com/shadow-1/yi-hack-v3/issues/228#issuecomment-421429340

skywluke commented 6 years ago

Dear Guys! @fedyfausto @aelg305 ! Thanks, it's work! but now, the question is, how to use ftp server? Is it possible to use? Or how else to possible to download files from camera?

skywluke commented 6 years ago

The answer for myself is: busybox tcpsvd -vE 0.0.0.0 21 busybox ftpd -w /tmp

Sygu00 commented 6 years ago

Hi!

@feyfausto @aelg305!! Thanks 4 the work! I understand this works for Yi 1080p Outdoor but, does it for 27US/47US model? Is the same process? I have two yi ANTS cam with yi-hack-v3 working but I need RTSP too.

Thanks in advance!

aelg305 commented 6 years ago

first of all preapre a wpa_supplicant file like this one: ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ ssid="[SSIDHERE]" scan_ssid=1 proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="[PASSHERE]" }

prepare your SD card:

  1. format to fat32
  2. put these files into it https://mega.nz/#F!s9wVzZQZ!k6F3p8HcWCoWl-jla2Cxpw
  3. put the wpa_supplicanti nto the rrot of sd card

then, put the sdcard into your cam and then wait until the led stops to blink (so fixed yellow color) After that, search on your local network the camera and test to telnet it

any updates on getting the rtsp working?

arunsmu commented 6 years ago

Hi i am having YI outdoor camera and i bought it from china. When i try to connect the camera with the wifi it's saying this camera can only be used within china. Now after seeing the above posts it appears that some have solved this issue successfully. But the problem is i can't seem to understand lot of the technical stuff mentioned over here. It will be extremely helpful if someone can explain all the steps briefly step by step. It will be helpful if i can connect it to the wifi and make it record and also see it through live-stream.

akbaryahya commented 6 years ago

any update this, about rtsp , how to get it?

rdiver commented 5 years ago

Dear Guys! @fedyfausto @aelg305 ! Thanks, it's work! but now, the question is, how to use ftp server? Is it possible to use? Or how else to possible to download files from camera?

Hi @skywluke how did you manage it in the end? I have been tearing my hair out for 2 days.

skywluke commented 5 years ago

@rdiver : Telnet to camera. After that you have to start ftp server with the following command: "busybox tcpsvd -vE 0.0.0.0 21 busybox ftpd -w / " Voila ftp is working. Now, if you would like to start ftp automaticaly with the camera boot, you have to find and open "/home/app/init.sh" file. Find "busybox telnetd &" Below this line put the ftp start command: "busybox tcpsvd -vE 0.0.0.0 21 busybox ftpd -w / " Save & close & restart the camera and enjoy ftp server. That's all! ;)

rdiver commented 5 years ago

@rdiver : Telnet to camera. After that you have to start ftp server with the following command: "busybox tcpsvd -vE 0.0.0.0 21 busybox ftpd -w / " Voila ftp is working. Now, if you would like to start ftp automaticaly with the camera boot, you have to find and open "/home/app/init.sh" file. Find "busybox telnetd &" Below this line put the ftp start command: "busybox tcpsvd -vE 0.0.0.0 21 busybox ftpd -w / " Save & close & restart the camera and enjoy ftp server. That's all! ;)

Cheers @skywluke I'm more struggling with getting to that step. I have loaded multiple combinations of firmware. renamed rootfs_h20, rootfs_y20 to 30. All variations of ones above from the mega site.

My understanding was, download yi-hack-v3 rootfs_y20 renamed to rootfs_h30 and home_y20 renamed to home_h30. Load onto camera, blinking yellow to solid yellow. Then load on the files from the mega link above. Replace the 2 files already on the SD and add the wpa config. After doing this, I cannot get the camera to work. I actually have managed to brick the camera a couple of times. Then through what I can only call button bashing with the reset button and various firmware I managed to get it back to normal.