Recover an ‘assumed bricked’ Vera Secure
-
Thanks,
While I’ve got the vera3 program somewhere, although as yet I’ve not been able to get it to install/run, having built an XP machine just for that purpose..
it’s interesting you talk about a TFTP server, as I had to do a recovery with a different product, and they sent me instructions on setting up a DHCP server and a TFTP service all using tftd32/64 - http://tftpd32.jounin.net/tftpd32_download.html
I’ve also seen these..
And then for the cable/connection..
Assuming I can get to the command line via putty and the usb-tty cable on Vera; any idea what the sequence and command line(s) might be download and run the firmware update ?
-
Yup! These are the two known methods to write the flash memory of an embedded device (TFTP and TTY). I don’t have a vera secure and have only recovered vera plus and vera edge through TFTP. Sorry can’t help with the TTY USB as have taken down my veras.
-
@rafale77 said in Recover an ‘assumed bricked’ Vera Secure:
Yup! These are the two known methods to write the flash memory of an embedded device (TFTP and TTY). I don’t have a vera secure and have only recovered vera plus and vera edge through TFTP. Sorry can’t help with the TTY USB as have taken down my veras.
Hello @rafale77 , I have G550-35-1.7.4061.bin, mt7621s_Luup_ui7-1.7.5187-en-mios.squashfs and newmios-hooks.sh files. Can you tell me how can I use these files for recovery? There is no a clear tutorial about it. Is it possible to tell us how can you recover your vera plus with TFTP ? I want to apply the same stages to my vera secure. Thanks.
-
This post from Richie Digital in the old place is how I did it:
-
destinationwrote on Mar 22, 2021, 7:08 PM last edited by destination Mar 22, 2021, 3:10 PM
Is it means you use vera3_recovery_tool for recovery not TFTP? If it is yes, vera3_recovery_tool does not works at vera secure for me.
-
Under the hood, the recovery tool is using TFTP... I just used it and didn't really bother to inquire deeper as to how one would reproduce what it does.
And as far as I know it should work for the vera secure as well (I tested on both the plus and the edge) since all three are based on the same platform. I just don't have a firmware image for the secure.
-
destinationwrote on Mar 22, 2021, 7:22 PM last edited by destination Mar 22, 2021, 3:24 PM
Thanks @rafale77. After using that tool, i still have the warning at the firmware upgrade page.
cat: can't open "etc/cmh/PK_AccessPoint' No such file or directory cat: can't open "etc/cmh/PK_AccessPoint' No such file or directory. Manually upgrade the firmware to the latest release.
Do you have any idea about that warning?
-
Yes, This file may not be present in the image you just uploaded to the vera and is unique to each unit. It contains the unique ID which is used by the vera cloud server to identify vera units and normally is retained between firmware upgrades. If you can SSH into you unit, you can create a new file there and/or ask for support to give you that ID for your unit. I don't remember having had this problem myself except when I created my vera emulator in a virtual machine.
It is also that I ran my unit entirely "off the grid" for many years and never cared for the cloud service. If all you are trying to do is to run a firmware update, a dummy number in that file may be enough. You may also find that number somewhere in the logs uploaded in the vera cloud if you can find those.
-
The value is also written to NVRAM and may be still be there. Try:
nvram get serial_no
-
destinationwrote on Mar 22, 2021, 8:10 PM last edited by destination Mar 22, 2021, 4:16 PM
@rafale77 and @toggledbits ,thanks both of you for this wonderful informations. What should I get when returning this
nvram get serial_no
code? I already have another (new unit) tried that code but no return any output. Maybe tomorrow I will need to ask support for that file -
You should be getting the serial number of your unit which should also be the content of your missing file.
You can then just create that file and insert that serial number in it using a text editor. I believe the vera only has "vi" installed but I had installed "nano" on mine which I vastly prefer. -
I will ask support tomorrow I hope I get a positive feedback.
-
toggledbitswrote on Mar 22, 2021, 8:43 PM last edited by toggledbits Mar 22, 2021, 4:46 PM
If the serial number is on the label of the unit, all you need to do is create the file with that number in it.
If you scratch it down on a piece of paper, do this to avoid the editor:
cat >/etc/cmh/PK_AccessPoint
That will just sit there doing nothing waiting for you to type. Type in, carefully the serial number from the label, then hit ENTER once, then hit CTRL-D once. You should get the shell prompt again. You can then confirm the file exists and has the right content.
-
Thank you @toggledbits . I will try your advice tomorrow and see the result.
-
destinationwrote on Mar 23, 2021, 10:51 AM last edited by destination Mar 23, 2021, 6:56 AM
-
destinationwrote on Mar 23, 2021, 12:35 PM last edited by destination Mar 23, 2021, 8:40 AM
-
The error from your screenshot is pretty explicit... You are missing the libjson library for some reason. It looks like your firmware image was incomplete and was missing a lot of stuff.
run
opkg update opkg install libjson
You likely will have other errors and will have to complete installation of dependencies.
-
destinationreplied to rafale77 on Mar 24, 2021, 11:16 AM last edited by destination Mar 24, 2021, 7:18 AM
@rafale77 said in Recover an ‘assumed bricked’ Vera Secure:
The error from your screenshot is pretty explicit... You are missing the libjson library for some reason. It looks like your firmware image was incomplete and was missing a lot of stuff.
run
opkg update opkg install libjson
You likely will have other errors and will have to complete installation of dependencies.
Thanks @rafale77. Thats solve
curl :(7) Failed to connect to 127.0.0.1 port 3480: Connection refused
error but aftre I noticed that when trying upgrade the firmware manually I see thatcp -af PK_AccessPoint HW_Key HW_Key2 zwave_locale cmh.conf servers.conf users.conf services.conf user_data.json.lzo /etc/cmh/ cp: can't stat 'HW_Key': No such file or directory cp: can't stat 'HW_Key2': No such file or directory cp: can't stat 'zwave_locale': No such file or directory cp: can't stat 'users.conf': No such file or directory cp: can't stat 'services.conf': No such file or directory
errors at the very long upgrating scripts. It seems installing new bin file is hardware based at vera secure, maybe i need
HW_Key and HW_Key2 files
-
Looking in the newmios-hooks.sh, file there is a line in there that says
PRESERVE_CMH_FILES="PK_AccessPoint HW_Key HW_Key2 zwave_locale cmh.conf servers.conf users.conf services.conf user_data.json.lzo"
Which I assume means it expects them to be present, and to remain ?
I’m not very good at understanding the linux BASH/Shell language, but here looks to be the part where it’s used.
mios_pre_firmware_upgrade() { log "Running: mios_pre_firmware_upgrade" case $1 in backup_cmh_files) log "[MH]BACKUP CMH FILES: $PRESERVE_CMH_FILES in : $BACKUP_CMH_DIR" rm -rf $BACKUP_CMH_DIR mkdir -p $BACKUP_CMH_DIR cd ${CMH_DIR}/ cp -af $PRESERVE_CMH_FILES ${BACKUP_CMH_DIR}/ cd - ;; restore_cmh_files) log "[MH]RESTORE CMH FILES: $PRESERVE_CMH_FILES from : $BACKUP_CMH_DIR" [ -d "$BACKUP_CMH_DIR" ] && { cd ${BACKUP_CMH_DIR}/ cp -af $PRESERVE_CMH_FILES ${CMH_DIR}/ cd - } || log "[MH]BACKUP_CMH_DIR ($BACKUP_CMH_DIR) NOT FOUND. Unable to restore cmh files" ;; *) log "[MH]Deleting version dependent files from /etc/cmh: $DELETE_CMH_FILES" cd /etc/cmh/ rm $DELETE_CMH_FILES 2>/dev/null cd -
The above refers to this location
BACKUP_CMH_DIR="/tmp/backup_cmh_dir"
Can you see what’s in the above /tmp/backup_cmh_dir ?
Do you have a ‘backup’ file - if not in there perhaps one stored outside - you may be able to request it from Vera ?
-
destinationwrote on Mar 24, 2021, 3:24 PM last edited by destination Mar 24, 2021, 5:07 PM
There is nothing at /tmp/backup_cmh_dir. But I already have
ha-gateway-backup_XXXXXXXX_1.7.XXXX_2020-09-25.tgz
backup file. The vera restore page is not work also other interfaces too. What sould I do to restore the tgz backup file from ssh? How can I do that?
23/45