wz_mini_hacks
wz_mini_hacks copied to clipboard
changed timezone str to EST now not booting
am on latest 4.36.9.139 ,,, used the web gui camera config portion to change the timezone string to EDT ...
Could this brick the camera? won't boot fully now with sdcard in or out? red led comes on and nothing further ...
I have also reapplied the 4.36.9.139 and same... If anyone has any ideas LMK...
can you check the logs folder on the sd card? you can upload them here for us to find out whats going on.
@virmaior looks like the camera config script corrupts the config file, it changes it,
ex:
after update:
[SETTING]="[SETTING]"
fps=30
AST="1"
EdgeAI="1"
SASwitch="0"
CASwitch="0"
before:
[SETTING]
AALY=11
AASY=0
AALX=6
AASX=0
AMALevel=254
MMALevel=254
night_led_ex=2
NIGHT_LED_flag=1
nightVision=1
AASwitch=2
MASwitch=1
this will cause iCamera to crash forever, and prevent the user from restoring the camera without special intervention.
for some reason this didn't happen in my initial test... weird.
@gtxaspec woah, I'll look at that in the next 6 hours or so and see what I can do. That's pretty horrific. I'll test it by changing the target file it's changing. I can immediately see two issues with format assumptions from what I copy-pasted over from the settings editor for wz_mini itself:
- adding quotes to entry values
- misunderstanding the [] section headers as entries
Is it also clobbering values by not copying them? (well I'll see soon enough when I look at the code ... )
@rickgitdone that sucks.
I did warn that I was unable to test this so far ... I'll work on fixing the code; unfortunately, I can't help with the damage.
@virmaior not to worry, i can help @rickgitdone fix it.
@rickgitdone how to fix:
pull the memory card
put it in your pc
open the file wz_mini/etc/rc.d/S14nightdrop
copy and paste the following to LINE 14 ( under echo "#####$(basename "$0")#####"
)
if ! [ -f /opt/onetimerun ] ; then
rm -f /configs/.user_config
cp /configs/.user_config.old /configs/.user_config
touch /opt/onetimerun
sync
fi
save your file, put the card back in the camera, boot it.
it should be fixed, if not, try rebooting the camera again. once you confirm it has been fixed, pull the memory card and reinstall wz_mini fresh.
@gtxaspec
tried adding this to the wz_mini/etc/rc.d/S14nightdrop and rebooted a few times
if ! [ -f /opt/onetimerun ] ; then rm -f /configs/.user_config cp /configs/.user_config.old /configs/.user_config touch /opt/onetimerun sync fi
it appears now my backup copy of the .user_config must also have been corrupted since after I ran thru the RTSP firmware upgrade then back to 4.36.9.139 and it came back ...I boldly ran the camera update script again not realizing the peril... meh...
is it possible I generate a .user_config from scratch and copy that during boot overwriting what's been corrupted? or copy the corrupt .user_config over to my sdcard during boot so I can edit out the bad parts?
try
if ! [ -f /opt/onetimerun ] ; then
rm -f /configs/.user_config
cp /configs/.user_config.1 /configs/.user_config
touch /opt/onetimerun
sync
fi
also,
remove the file /opt/onetimerun
or it won't run again ( it's designed only to run once )
OK .. I am in.. here is my /configs/.user_config from it now below... still looks corrupt .. I went thru each version and found .3 looks clean pasted to bottom ... if I copy .3 ver over the current do I need to preserver the p2pid= and r_encr= section at the top? or just edit out all the quoted sections?
Thanks so far really appreciate the assistance here
[NET]="[NET]" bindOk=1 p2pid=3D3DHKNBRHG6K36U111A r_encr=TmllonsHUsxNyhJ+
[SETTING]="[SETTING]" AMALevel="2" drawBoxSwitch="2" res=1 MMALevel="2" recordType="3" AST="1" nightVision="2" NIGHT_LED_flag="2" watermark_flag="2" indicator="2" bitRate=120 telntSwitch=2 timezone=-4
.user_config.3
[NET] bindOk=1 p2pid=3D3DHKNBRHG6K36U111A r_encr=FjHyLccS0xPrXJEd
[SETTING] AMALevel=2 drawBoxSwitch=2 res=1 MMALevel=2 recordType=3 AST=1 nightVision=2 NIGHT_LED_flag=2 watermark_flag=2 indicator=2 bitRate=120 telntSwitch=2 timezone=-4
[CAMERA_INFO] TZ_STR=
use .user_config.3
preserve the entire file
@gtxaspec ... back in business ... thx again.
I did the following while active w/o incident and commented out the other edits in wz_mini/etc/rc.d/S14nightdrop then rebooted
rm -f /configs/.user_config && cp /configs/.user_config.3 /configs/.user_config
glad to hear!
glad to see it got fixed.
https://github.com/gtxaspec/wz_mini_hacks/pull/330 should make it so that this doesn't happen. I replaced the technique that wrote a completely new wz_mini.conf file (and thus borked the format for this file) with one that first makes a copy, only replaces altered single key=value pair, and then switches file names. also prettied up the interface just a tad.
editing camera configs is now blocked by https://github.com/gtxaspec/wz_mini_hacks/pull/558 due to safety concerns.