Skip to content
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

IFUSY65 - y211ga - infinite boot loop #143

Closed
Dlinny opened this issue Apr 22, 2021 · 28 comments · May be fixed by cretep/yi-hack-Allwinner-v2#1
Closed

IFUSY65 - y211ga - infinite boot loop #143

Dlinny opened this issue Apr 22, 2021 · 28 comments · May be fixed by cretep/yi-hack-Allwinner-v2#1
Labels

Comments

@Dlinny
Copy link

Dlinny commented Apr 22, 2021

Camera: IFUSY65
FW: 9.0.36.00_202011101611
Hack: y211ga_0.1.6

Infinite boot loop: orange led -> shutter sound -> blue led blinking (about 12 times) -> restart.
Have 2 cameras, one with FW updated to 9.0.36.01_202103231716 - same behaviour.
Any suggestions on what can I try to do to successfully hack them?

Logs from SD card attached.
df.txt
file.txt
lsmod.txt
ps1.txt

@roleoroleo
Copy link
Owner

Probably the same problem described here:
#119

@Dlinny
Copy link
Author

Dlinny commented Apr 22, 2021

Yes, seems similar to @emnatsak issue.

Whilst waiting for solution, as its suits my requirements, I did the following:

  • Removed Factory.done from SD.
  • Removed lower_half_init.sh from SD.
  • Put debug.sh which just do chmod & sh of system.sh from yi-hack.
    This seems to work so I can see web ui and rtsp server is running (I do not need to disable cloud, as can do filter on the network level).

I do not have access to serial, but telnet/ssh is working so can provide any details available via telnet/ssh if anything can be useful for resolving boot loop.

@roleoroleo
Copy link
Owner

I think the problem is rmm.
The scripts starts rmm too late and the watchdog is triggered.

@dzianiwonsacze
Copy link

@Dlinny

  • Put debug.sh which just do chmod & sh of system.sh from yi-hack.

Could you please post the contents of the file for me to check if this will do the job in my case? I'm in the same boat and will also do with rtsp for now...

@roleoroleo
Copy link
Owner

Could you please try this chages?
Comment dispatch in /tmp/sd/lower_half_init.sh

mount --bind /backup/tools/wifidhcp.sh /home/app/script/wifidhcp.sh

#./dispatch &
#sleep 2
#./rmm &

And add it before rmm in /tmp/sd/yi-hack/script/system.sh
Pay attention: rmm is called twice.

        if [ $(get_config SPEAKER_AUDIO) != "no" ]; then
            touch /tmp/audio_in_fifo.requested
        fi
        cd /home/app
        ./dispatch &
        LD_LIBRARY_PATH="/tmp/sd/yi-hack/lib:/lib:/usr/lib:/home/lib:/home/qigan/lib:/home/app/locallib:/tmp/sd:/tmp/sd/gdb" ./rmm &
        sleep 6

@dzianiwonsacze
Copy link

I don't understand the "rmm is called twice"part, but I did comment out dispatch and added it in the other place, and now camera is showing yellow light for about 27 seconds, then the light goes off for split second and yellow light turn on again, in an infinite loop. The camera does not work in neither yi app nor web interface.

@dzianiwonsacze
Copy link

FYI, after removing the card camera goes back to non-hacked operation smoothly.

@roleoroleo
Copy link
Owner

rmm is called twice because there is an "if-else" statement.
So it's called for the if and for the else.

@cretep
Copy link

cretep commented Apr 25, 2021

Reboot cycle also persists for my new IFUS y211ga/9.0.36.01 camera after suggested move of ./dispatch.

In case it helps, I added logging to the executables in question (ie. ./dispatch 2>&1 >> /tmp/sd/debug/dispatch.log &) and redacted credentials:

Moving ./dispatch has no effect on the log output.

Main script continues with last output during ./yi-hack/script/mqtt_advertise/check_conf.sh, a non-suspect script so likely just coincidental timing with system reset.

@cretep
Copy link

cretep commented Apr 25, 2021

New wifi device driver:

root@(none):~# ls -l /sys/class/net/wlan0/device/driver/module
lrwxrwxrwx    1 root     root             0 Apr 25 13:06 /sys/class/net/wlan0/device/driver/module -> ../../../../module/atbm603x_wifi_usb

@roleoroleo
Copy link
Owner

You are right.
I copied as a template the wrong lower_half_init.sh
The file is both in /backup and in /home/app
And the 2 copies are different.
I will release a new beta in 1 hour.

Thanks.

@roleoroleo
Copy link
Owner

Here it is:
y211ga_0.1.6.tar.gz

Please, let me know if it works.

@dzianiwonsacze
Copy link

First pass success, thanks!

@roleoroleo
Copy link
Owner

Please, check if rtsp and snapshot are working.
High and low res.

@a20691
Copy link

a20691 commented Apr 25, 2021

Yes it's all working.

@tulkas84
Copy link

I had the same problem, and is fixed with the beta :)

Some info, just in case it's ussefull:
-The wifi Strength from the main page shows 0%
-Dont show de Serial Number
-rtsp audio not working

rtsp for video, ftp upload, mqtt and snapshoots, working well :)

@roleoroleo
Copy link
Owner

-The wifi Strength from the main page shows 0%

Please post the output of the command cat /proc/net/wireless

-Dont show de Serial Number

dd bs=1 count=20 skip=656 if=/tmp/mmap.info 2>/dev/null

-rtsp audio not working

Check if it works with aac codec.

@tulkas84
Copy link

tulkas84 commented Apr 27, 2021

cat /proc/net/wireless

Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
wlan0: 0000 70. -22. -256 0 0 0 0 35 0
p2p0: 0000 0 0 0 0 0 0 0 0 0

dd bs=1 count=20 skip=656 if=/tmp/mmap.info 2>/dev/null

Not fixed. Rebooted, and still no serial number on the main webpage

Check if it works with aac codec.

Works for 2 seconds, and then crash

@roleoroleo
Copy link
Owner

Post the output of the command
dd bs=1 count=20 skip=656 if=/tmp/mmap.info 2>/dev/null

@roleoroleo
Copy link
Owner

About signal strength, please try to change this line in /tmp/sd/yi-hack/www/cgi-bin/status.json
WLAN_STRENGTH=$(cat /proc/net/wireless | grep wlan0 | awk '{ print $3 }' | sed 's/\.$//')

@tulkas84
Copy link

there is no output for dd bs=1 count=20 skip=656 if=/tmp/mmap.info 2>/dev/null
Without the redirection:
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.007397 seconds, 2.6KB/s

WLAN_STRENGTH=$(cat /proc/net/wireless | grep wlan0 | awk '{ print $3 }' | sed 's/.$//')

Works!

@roleoroleo
Copy link
Owner

Try this
dd bs=1 count=20 skip=656 if=/tmp/mmap.info of=/tmp/out.bin 2>/dev/null
and check the content of the file /tmp/out.bin

@tulkas84
Copy link

tulkas84 commented Apr 27, 2021

root@yi:# dd bs=1 count=20 skip=656 if=/tmp/mmap.info of=/tmp/out.bin 2>/dev/null
root@yi:
# cat /tmp/out.bin
root@yi:~#

Nothing

@roleoroleo
Copy link
Owner

roleoroleo commented Apr 28, 2021

Could you send me a copy ot the mmap.info?
Pay attention: the file contains personal info.

@roleoroleo
Copy link
Owner

Please change 656 with 784.
It should work.
Il will fix in the next release.

@BobMiles
Copy link

BobMiles commented Oct 30, 2021

Hi,

I have a:

Firmware Version | 0.1.9
Base Version | 9.0.36.00_202011101611
Model Suffix | y211ga
Serial Number | IFUSY65GAUJWFP

And my problem is similar. The camera comes on, I can access Yi-Hack webinterface just fine and configure the camera. But after some minutes it reboots - I see the Uptime timer restart.

I already tried different SD Cards, but to no avail.

Is there any debugging I can do?

Thank you so much!

Edit: I think I found the problem - my OpenHAB polled the snapshot URL at a 3-seconds interval and that was too much for the camera and backed it up until it crashes...

@roleoroleo
Copy link
Owner

Enable swap space.

@stale
Copy link

stale bot commented Dec 9, 2022

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.

@stale stale bot added the stale label Dec 9, 2022
@stale stale bot closed this as completed Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants