-
Notifications
You must be signed in to change notification settings - Fork 0
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
Only 1 video upload for YFUS #12
Comments
I think the busy box version is 1.2 something as I don't have the laptop with me on my trip.. |
Probably you'd better re-hack and upgrade your camera firmware with all winner v2 to the supported latest version first, the busybox utils will upgrade as well. I am not sure if you are using this one, the latest version is v0.3.2: yi-hack-Allwinner-v2 0.3.2 |
Yes I think I use that one. I'll do a proper recheck on busybox version and grep command and report once I get home. |
Hello attach is the busy box version, and the all winer version. I think it's the latest hack |
You can create a file in current path and test if your grep support s the -A option. |
I checked all winner v2 repo, its busybox has been updated to v1.36.1, but your busy box shows version. Can you confirm you've completely upgraded your firmware components without using existing data (cached)? |
That's really weird, because it's a brand new camera I just unbox. I followed the guide on all winner v2 |
so theres no way to update busybox? |
I would say that, for most cases the -A option should be enabled and supported by default even you are on version 1.27.2. Can you run and check the output? |
Right now, from your output, I don't think your busybox provides the grep application, I checked the file .config and found it is not included. You can check if the below has any output And check your grep version info: Probably your firmware provides the gnu grep application for you. Since your current grep doesn't provide -A option, there are two ways to solve this issue:
for the 2nd way:
if the downloaded grep provides -A option, you can clean up your |
hello, thank you for your help in the end i copy the grep from linux static libraries link above to yi-hack/bin in order for the code to work 2024-06-19 08:26:48 Start to upload /tmp/sd/record/2024Y06M15D07H/E724M00S60.mp4 Edit: it seem the user from this issue also encountered this error : #11 (comment) Edit 2: i think something is wrong with the code regarding chunk size |
hello, after copying the api.sh you provide from #11 (comment), here is the result: Edit 2: i seem to fix the issue, by removing the spare ":" at line 219 of api.sh. I dont know if this is intentional spare ":" for coding or just mistyped Edit 3: it seem the script stop when i exit ssh, also, didnt run on reboot terminal file in ./log showed: But execute the init.sh file manually give no error for grep unrecognize option A. Checking grep file already -rwxr-xr-x . |
resp_json=${1:0:${#1}-3}
export PATH=$PATH:/tmp/sd/yi-hack/onedrive/bin
# add the below line
alias grep='/tmp/sd/yi-hack/onedrive/bin/grep' |
The link file is a debug source file for locating issues. Good thing is you tried and found something. The extra |
|
It seems you are close to success, what's is your onedrive path? |
Is the error reported from a reboot? |
Yes. If I reboot, init.sh terminal log show the mentioned error. If I manually run init.ah no error occur Anyway as a reference from this link https://stackoverflow.com/questions/7451423/how-to-show-only-next-line-after-the-matched-one Do you think you can change the Grep -A1 to awk? |
Maybe I can do that later. How about put I will find a time to use an alternative way to fix the grep compatibility issue. Just try the temporary way first. |
This works ! thanks a lot for your help |
@mrxyzl Please share your camera Model and firmware version, I will update it to the Readme file for people to check. |
Model: Yi Home Pro 2K |
You can test the latest code I submitted today (without using an extra downloaded grep) |
|
that is weird since this error has been fixed and it's the same code as the previous discussed here. is it reported from the reboot execution or your manual?check the other ticket you created. have you tried the code from the new branch,it contains all the latest changes. |
OK. I ll give you some new code to test, both old and current code are working on my camera. |
Please replace the current code line resp_len=$((${#1}-3))
resp_json=${1:0:resp_len} resp_len=$((${#1}-3))
resp_json=${1:0:${resp_len}} resp_len=$((${#1}-3))
resp_json=$(echo "$1" | cut -c1-${resp_len}) length=${#1}
resp_len=$(($length-3))
resp_json=${1:0:${resp_len}} length=${#1}
resp_len=$(($length-3))
resp_json=$(echo "$1" | cut -c1-${resp_len}) I provide several different alternative code lines above, however, I don't know which code snippet will work on your device. Please test them one by one and let me know the result. Hope one or more of them can work. |
Hello, im happy to announce that this: works, i didnt test the others tho |
Hi, i try to hack sucessfully the Yi Home Pro 2K with Yi hack all winner v2
I successfully follow your OneDrive upload integration but only first video is uploaded
The next_file in logs say:
Last uploaded file: /tmp/sd/record/2024Y06M15D07H/E718M31S29.mp4
Search next file to upload...
Search in directory: '2024Y06M15D07H'
No newer file found from directory last uploaded file located
No more newer direcotries found
No available newer file to upload for now
Output on SSH shows:
Start the auto-clean monitor...
2024-06-15 08:04:54 Success: check_drive_space
Start to check camera video and image files for uploading...
grep: unrecognized option: A
grep: unrecognized option: A
All files were uploaded, wait for a new recorded video or image file.
Meanwhile, files_index show :
/tmp/sd/record/2024Y06M15D07H/E718M31S29.mp4
/tmp/sd/record/2024Y06M15D07H/E723M37S23.mp4
/tmp/sd/record/2024Y06M15D07H/E724M00S60.mp4
/tmp/sd/record/2024Y06M15D07H/E731M25S35.mp4
/tmp/sd/record/2024Y06M15D07H/E732M00S60.mp4
/tmp/sd/record/2024Y06M15D07H/E733M00S60.mp4
Can you help with the reason why the upload stop?
Edit: it seem to me the current grep is missing -A option
The text was updated successfully, but these errors were encountered: