yi-hack_ha_integration icon indicating copy to clipboard operation
yi-hack_ha_integration copied to clipboard

Another one YI CAM

Open Brokly opened this issue 3 years ago • 26 comments

Hello ! Thanks a lot for your work! I tried to hack a camera very similar to https://github.com/roleoroleo/yi-hack_ha_integration/issues/84 . For the hack I used kit 9.0.41* - b091qp. As a result, the hack was installed successfully, but RTSP and High res snapshot do not work. Can you help me? There is a photo and a backup of the original firmware https://github.com/Brokly/YI-CAM/tree/main/Files . Thank you !

Brokly avatar Aug 04 '22 09:08 Brokly

I will check it asap.

roleoroleo avatar Aug 16 '22 14:08 roleoroleo

Your cam is a different b091qp. Please send me 3-4 copies of the file /dev/shm/fshare_frame_buf.

roleoroleo avatar Aug 16 '22 14:08 roleoroleo

Thanks for the feedback. As it turned out, FTP does not work either :( . When reading the SD card directly, I did not find such a way ( /dev/shm/fshare_frame_buf) . Maybe I misunderstood something ?

Brokly avatar Aug 17 '22 14:08 Brokly

You should be able to use ftp to login to the cam. Or you should try scp. The file is not available inside the sd card.

roleoroleo avatar Aug 18 '22 17:08 roleoroleo

That's all that was in this catalog https://github.com/Brokly/YI-CAM/upload/main/dev/shm . I didn't notice before that I need a "root" login to access FTP. So there is access to FTP.

Brokly avatar Aug 19 '22 21:08 Brokly

Your frame buffer file is the same as other versions of b091qp. So, the released version should work.

roleoroleo avatar Aug 20 '22 14:08 roleoroleo

Unfortunately it doesn't work. Even using the link from the web interface, I can't see the video stream (rtsp://192.168.1.246/ch0_1.h264).

Brokly avatar Aug 20 '22 18:08 Brokly

Please, post your config hiding personal data. cat /tmp/sd/yi-hack/etc/system.conf

roleoroleo avatar Aug 21 '22 09:08 roleoroleo

HTTPD=yes TELNETD=no SSHD=yes FTPD=yes BUSYBOX_FTPD=no DISABLE_CLOUD=no REC_WITHOUT_CLOUD=yes MQTT=no RTSP=yes RTSP_ALT=no RTSP_STREAM=low RTSP_AUDIO=no SPEAKER_AUDIO=yes SNAPSHOT=yes ONVIF=yes ONVIF_WSDD=yes ONVIF_PROFILE=low ONVIF_NETIF=wlan0 ONVIF_WM_SNAPSHOT=yes NTPD=yes NTP_SERVER=pool.ntp.org PROXYCHAINSNG=no SWAP_FILE=yes RTSP_PORT=554 ONVIF_PORT=80 HTTPD_PORT=8080 USERNAME=brokly PASSWORD=123 TIMEZONE= FREE_SPACE=0 FTP_UPLOAD=no FTP_HOST= FTP_DIR= FTP_DIR_TREE=no FTP_USERNAME= FTP_PASSWORD= FTP_FILE_DELETE_AFTER_UPLOAD=yes SSH_PASSWORD=123 CRONTAB=

Brokly avatar Aug 21 '22 09:08 Brokly

Did you configure authentication? If you set it, you need to add to the rtsp address.

Otherwise we need to debug the process.

roleoroleo avatar Aug 21 '22 10:08 roleoroleo

I set the login and password in the web interface. Do you need any other actions to configure authentication ?

Brokly avatar Aug 21 '22 11:08 Brokly

I set the login and password in the web interface. Do you need any other actions to configure authentication ?

No. These credentials are used by http, rtsp and onvif daemons. So the rtsp client must use them.

roleoroleo avatar Aug 21 '22 19:08 roleoroleo

Are there any other actions that can help me?

Brokly avatar Aug 22 '22 06:08 Brokly

Try to select the "Alternative RTSP server" and check if it works.

roleoroleo avatar Aug 22 '22 06:08 roleoroleo

Yes, I tried to turn on the alternative RSTP. It was not possible to connect to the video stream. All my camera can do is a low-resolution snapshot, everything else doesn't work.

Brokly avatar Aug 24 '22 05:08 Brokly

We need to debug the process. Please follow these steps:

  • restore the default rtsp server
  • login with ssh
  • run the following commands:
. /tmp/sd/yi-hack/script/env.sh
killall wd_rtsp.sh
killall rRTSPServer
rRTSPServer -d 3 -m b091qp -r high -a no -p 554 2>&1
  • run vlc and connect to the cam at rtsp://192.168.1.246/ch0_0.h264
  • post the log

Then try again with low res:

  • login with ssh
  • run the following commands:
. /tmp/sd/yi-hack/script/env.sh
killall wd_rtsp.sh
killall rRTSPServer
rRTSPServer -d 3 -m b091qp -r low -a no -p 554 2>&1
  • run vlc and connect to the cam at rtsp://192.168.1.246/ch0_1.h264
  • post the log

roleoroleo avatar Aug 24 '22 10:08 roleoroleo

I apologize for the long silence. This is what happens already at the first stage of debugging:

login as: root [email protected]'s password:

BusyBox v1.27.2 () built-in shell (ash)

mount: mounting none on /sys/kernel/debug failed: Resource busy

        __    __   _
        \ \  / /  | |
         \ \/ /   | |
          \  /    | |
          / /     | |
         /_/      |_|

Welcome to XiaoYi Linux.

root@yi-b7cc:~# login as: root [email protected]'s password:

BusyBox v1.27.2 () built-in shell (ash)

mount: mounting none on /sys/kernel/debug failed: Resource busy

        __    __   _
        \ \  / /  | |
         \ \/ /   | |
          \  /    | |
          / /     | |
         /_/      |_|

Welcome to XiaoYi Linux.

root@yi-b7cc:~# Password:

root@yi-b7cc:~# /tmp/sd/yi-hack/script/env.sh root@yi-b7cc:~# killall wd_rtsp.sh root@yi-b7cc:~# killall rRTSPServer root@yi-b7cc:~# rRTSPServer -d 3 -m b091qp -r high -a no -p 554 2>&1 -ash: rRTSPServer: not found root@yi-b7cc:~#

Maybe need to specify the path to the rRTSPServer, but I didn't find it: (And I was also alerted by the warning: "mounting: failed to mount in /sys/kernel/debug: resource is busy." Maybe that's the problem?

Brokly avatar Aug 31 '22 08:08 Brokly

The Github interface strangely changes the formatting, but the content is the same.

Brokly avatar Aug 31 '22 08:08 Brokly

You miss a "." at the first line.

roleoroleo avatar Sep 02 '22 09:09 roleoroleo

Yes, I really missed the dot symbol. My apologies. VLC logs are here https://github.com/Brokly/YI-CAM/blob/main/Files/log.7z

Brokly avatar Sep 05 '22 10:09 Brokly

Sorry for the misunderstanding, I need the log of the rRTSPServer process (in the console).

roleoroleo avatar Sep 06 '22 12:09 roleoroleo

OK, here are these logs https://github.com/Brokly/YI-CAM/blob/main/Files/LogrRTSPServer.7z

Brokly avatar Sep 06 '22 15:09 Brokly

The log is ok, the grabber is working properly and the frames are extracted without errors. But I can't see a network connection. The log does not contain any connection attempt. Are you sure that your connection is ok?

roleoroleo avatar Sep 07 '22 15:09 roleoroleo

Yes, the connection is normal. I connect via SSH and Telnet, I get a low-resolution snapshot. But I can't get the video : (VLC logs show that I can't connect. In addition, I used a smartphone, the result is the same.

Brokly avatar Sep 07 '22 20:09 Brokly

VLC log reports "live555 debug: connection error -10057" I found some issues about authentication. Please, try to remove user/password temporarily.

roleoroleo avatar Sep 08 '22 09:09 roleoroleo

Thanks for the advice ! I will be able to check only in a week.

Brokly avatar Sep 08 '22 17:09 Brokly

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 02 '24 02:04 github-actions[bot]