Восстановление камера dahua ptz SD49225T-HN-S2

javierferwolf
Сообщения: 20
Зарегистрирован: 31 май 2017, 05:10

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение javierferwolf » 24 фев 2024, 06:20

iTuneDVR писал(а):Пробуй по примерам через сценарий обновить без загрузчика.
Подключить к еще одному порту для вывода логов.


пока не было время потестить все! но вот то что сейчас получилось попробовал через сценарий обновить без загрузчика что-то не то делаю? правда не знаю если это правильно?
Вложения
fotos.jpg

iTuneDVR
Сообщения: 3220
Зарегистрирован: 24 авг 2013, 11:05

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение iTuneDVR » 26 фев 2024, 13:00

Определенно что-то не так.
При этом неплохо бы показать сам сценарий, который лежит в папке, которая является корнем для tftp.
Файл во вложение с оригинальным именем.

javierferwolf
Сообщения: 20
Зарегистрирован: 31 май 2017, 05:10

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение javierferwolf » 26 фев 2024, 22:13

iTuneDVR писал(а):Определенно что-то не так.
При этом неплохо бы показать сам сценарий, который лежит в папке, которая является корнем для tftp.
Файл во вложение с оригинальным именем.


Да совсем не правильно делал. вот информация о камера в файле commands.txt отредактировано так, чтобы консоль выдавала информацию. (help, printenv, ls)
Ncat: Version 7.40 ( https://nmap.org/ncat )
Ncat: Listening on 192.168.254.254:5002
gBootLogPtr:00b80008.
NAND: 128 MiB
amb_nand_read_oob read page:49152 err
partition file version 2
rootfstype squashfs root /dev/mtdblock8
fail to load bootargsParametersV2.txt
fail to load bootargsParametersV2.txt
fail to init bootargsParametersV2
TEXT_BASE:01000000
Net: Detected MACID:38:af:29:b1:39:48
PHY:0x001cc816,addr:0x00
PHY:0x001cc816,addr:0x00
phy RTL8201 init
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'upgrade_info_7db780a713a4.txt'.Download to address: 0x5000000
Downloading: *
done
Bytes transferred = 84 (54 hex)
? - alias for 'help'
backup - backup - manual backup program.

base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootf - boot from flash
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
cfgRestore- erase config and backup partition.

cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dcache - enable or disable data cache
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
editenv - edit environment variable
erasepart- erasepart

exit - exit script
false - do nothing, unsuccessfully
flwrite - flwrite - write data into FLASH memory

fsinfo - print information about filesystems
fsload - load binary file from a filesystem image
go - start application at address 'addr'
gpio - gpio test
help - print command description/usage
hwid - hwid - set hardware id and save to flash

i2c - I2C sub-system
icache - enable or disable instruction cache
iminfo - print header information for application image
itest - return true/false on integer compare
kload - kload - load uImage file from parttion

lip - lip - set local ip address but not save to flash

loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
logsend - get log buf
loop - infinite loop on address range
ls - list files in a directory (default /)
mac - mac - set mac address and save to flash

md - memory display
memsize - memsize - set mem size

mii - MII utility commands
mm - memory modify (auto-incrementing address)
mtest - simple RAM read/write test
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
partition- print partition information
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
rdefault- rdefault -recover default env

reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
showvar - print local hushshell variables
sip - sip - set server ip address but not save to flash

sleep - delay execution for some time
source - run script from memory
sync_uboot- sync_uboot - sync uboot to uboot-bak

test - minimal test like /bin/sh
tftpboot- tftpboot- boot image via network using TFTP protocol
true - do nothing, successfully
uartUp - uartUp- update image via uart using uart4

usleep - delay execution for some time
version - print monitor version
bootdelay=3baudrate=115200ipaddr=192.168.1.108serverip=192.168.1.1autoload=yesgatewayip=192.168.1.1netmask=255.255.255.0dh_keyboard=1sysbackup=1logserver=127.0.0.1loglevel=4 autosip=192.168.254.254autolip=192.168.1.108autogw=192.168.1.1autonm=255.255.255.0pd=tftp 0x02000000 pd-x.squashfs.img; flwriteethact=ambarella macda=tftp 0x2000000 dhboot.bin.img; flwrite; tftp dhboot-min.bin.img;nand protect off;flwrite;nand protect ondr=tftp 0x2000000 romfs-x.squashfs.img; flwritedk=tftp 0x2000000 kernel.img; flwritedu=tftp 0x2000000 user-x.squashfs.img; flwritedw=tftp 0x2000000 web-x.squashfs.img; flwriteds=tftp 0x2000000 dsp-x.squashfs.img; flwritedc=tftp 0x2000000 custom-x.squashfs.img; flwritedt=tftp 0x2000000 data-x.squashfs.img; flwritedf=tftp 0x2000000 fpga.img; flwriteup=tftp 0x2000000 update.img; flwritetk=tftp 0x200100 hawthorn.dts.dtb;tftp 0x2000000 uImage;bootm 0x2000000bootcmd=nand read 0x200100 0x60000 0x10000;kload 0x2000000; bootm 0x2000000bootargs=console=ttyS0,115200 mem=150M root=/dev/mtdblock8 rootfstype=squashfs init=/linuxrcHWID=CA-HZ2025T-S2:01:03:04:4A:21:00:01:0E:01:01:04:330:00:00:00:04:00:00:00:00:200:00peripheral=1:140:0:0:0:1:0:00:1:21:0:1ID=4G06C74PAJZ1U66devalias=SD49225T-HNethaddr=38:AF:29:B1:39:48appauto=1stdin=serialstdout=serialstderr=serialfilesize=54fileaddr=5000000
Environment size: 1354/131068 bytes
Unknown command 'Vэt' - try 'help'
cmd Failed Vэt!
partition file version 2
rootfstype squashfs root /dev/mtdblock8
fail to load bootargsParameters.txt
fail to load bootargsParameters.txt file
get bootargs info failed
cmdLine console=ttyS0,115200 mem=150M root=/dev/mtdblock8 rootfstype=squashfs init=/linuxrc


после того, как понял, что правильный адрес файлов соответствует тому, что показывала консоль 0x2000000 Переписал файл Commands.txt, вот так (Читал на другом форуме, как должно быть)
tftp 0x2000000 kernel.img; flwrite
tftp 0x2000000 partition-x.cramfs.img; flwrite
tftp 0x2000000 romfs-x.squashfs.img; flwrite
tftp 0x02000000 pd-x.squashfs.img; flwrite
tftp 0x2000000 user-x.squashfs.img; flwrite
tftp 0x2000000 custom-x.squashfs.img; flwrite
tftp 0x2000000 web-x.squashfs.img; flwrite
tftp 0x2000000 .FLASHING_DONE_STOP_TFTP_NOW
sleep 5


Вот что у меня видимо с этим получилось


accepting requests..
Open TFTP Server MultiThreaded Version 1.64 Windows Built 2001

starting TFTP...
alias / is mapped to root\
permitted clients: all
server port range: all
max blksize: 65464
default blksize: 512
default timeout: 60
file read allowed: Yes
file create allowed: No
file overwrite allowed: No
thread pool size: 1
Listening On: 192.168.254.254:69
Client 192.168.1.108:1383 root\upgrade_info_7db780a713a4.txt, 1 Blocks Served
Client 192.168.1.108:1563 root\kernel.img, 1062 Blocks Served
Client 192.168.1.108:3277 root\partition-x.cramfs.img, 3 Blocks Served
Client 192.168.1.108:3863 root\romfs-x.squashfs.img, 930 Blocks Served
Client 192.168.1.108:2014 root\pd-x.squashfs.img, 34 Blocks Served
Client 192.168.1.108:2706 root\user-x.squashfs.img, 8050 Blocks Served
Client 192.168.1.108:2348 root\custom-x.squashfs.img, 17 Blocks Served
Client 192.168.1.108:3000 root\web-x.squashfs.img, 4230 Blocks Served
Client 192.168.1.108:2096 root\.FLASHING_DONE_STOP_TFTP_NOW, 1 Blocks Served
Client 192.168.1.108:1401 root\success.txt, File not found or No Access

***********
Ncat: Version 7.40 ( https://nmap.org/ncat )
Ncat: Listening on 192.168.254.254:5002
gBootLogPtr:00b80008.
NAND: 128 MiB
amb_nand_read_oob read page:49152 err
partition file version 2
rootfstype squashfs root /dev/mtdblock8
fail to load bootargsParametersV2.txt
fail to load bootargsParametersV2.txt
fail to init bootargsParametersV2
TEXT_BASE:01000000
Net: Detected MACID:38:af:29:b1:39:48
PHY:0x001cc816,addr:0x00
PHY:0x001cc816,addr:0x00
phy RTL8201 init
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'upgrade_info_7db780a713a4.txt'.Download to address: 0x5000000
Downloading: *
done
Bytes transferred = 420 (1a4 hex)
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'kernel.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 1558898 (17c972 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: kernel
Created: 2016-11-18 11:23:17 UTC
Image Type: ARM Linux Firmware (uncompressed)
Data Size: 1558834 Bytes = 1.5 MiB
Load Address: 00c80000
Entry Point: 01200000
Verifying Checksum ... OK
Programing start at: 0x00c80000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'partition-x.cramfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 4160 (1040 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: partition
Created: 2016-11-18 11:23:16 UTC
Image Type: ARM Linux Standalone Program (uncompressed)
Data Size: 4096 Bytes = 4 KiB
Load Address: 00500000
Entry Point: 00600000
Verifying Checksum ... OK
Programing start at: 0x00500000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'romfs-x.squashfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 1364032 (14d040 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: romfs
Created: 2017-03-08 6:21:19 UTC
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 1363968 Bytes = 1.3 MiB
Load Address: 01200000
Entry Point: 01600000
Verifying Checksum ... OK
Programing start at: 0x01200000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'pd-x.squashfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 49216 (c040 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: pd
Created: 2016-11-18 11:23:36 UTC
Image Type: ARM Linux Standalone Program (uncompressed)
Data Size: 49152 Bytes = 48 KiB
Load Address: 00940000
Entry Point: 00c80000
Verifying Checksum ... OK
Programing start at: 0x00940000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'user-x.squashfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 11817024 (b45040 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: user
Created: 2017-08-22 11:50:07 UTC
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 11816960 Bytes = 11.3 MiB
Load Address: 01e00000
Entry Point: 03b80000
Verifying Checksum ... OK
Programing start at: 0x01e00000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'custom-x.squashfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 24640 (6040 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: custom
Created: 2016-11-18 11:23:37 UTC
Image Type: ARM Linux Standalone Program (uncompressed)
Data Size: 24576 Bytes = 24 KiB
Load Address: 00600000
Entry Point: 00940000
Verifying Checksum ... OK
Programing start at: 0x00600000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'web-x.squashfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 6209600 (5ec040 hex)
Erasing update flag partition.

## Checking Image at 02000000 ...
Legacy image found
Image Name: web
Created: 2016-11-18 11:23:18 UTC
Image Type: ARM Linux Standalone Program (uncompressed)
Data Size: 6209536 Bytes = 5.9 MiB
Load Address: 01600000
Entry Point: 01e00000
Verifying Checksum ... OK
Programing start at: 0x01600000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename '.FLASHING_DONE_STOP_TFTP_NOW'.Download to address: 0x2000000
Downloading: *
done
partition file version 2
rootfstype squashfs root /dev/mtdblock8
fail to load bootargsParameters.txt
fail to load bootargsParameters.txt file
get bootargs info failed
cmdLine console=ttyS0,115200 mem=150M root=/dev/mtdblock8 rootfstype=squashfs init=/linuxrc

iTuneDVR
Сообщения: 3220
Зарегистрирован: 24 авг 2013, 11:05

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение iTuneDVR » 27 фев 2024, 13:01

И в итоге?

javierferwolf
Сообщения: 20
Зарегистрирован: 31 май 2017, 05:10

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение javierferwolf » 27 фев 2024, 16:34

iTuneDVR писал(а):И в итоге?


камера все еще не работает!(
в консоли, как показано на конце, я получаю эту ошибку
пробовал несколько версий прошивок, но пока безуспешно.

fail to load bootargsParameters.txt
fail to load bootargsParameters.txt file
get bootargs info failed

iTuneDVR
Сообщения: 3220
Зарегистрирован: 24 авг 2013, 11:05

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение iTuneDVR » 27 фев 2024, 20:19

Какие конкретно пробовал прошивки ?
Путь к источнику конкретных прошивок или сами прошивки на облачный диск и ссылка.
Фото шильдика с камеры еще бы!

javierferwolf
Сообщения: 20
Зарегистрирован: 31 май 2017, 05:10

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение javierferwolf » 27 фев 2024, 23:31

iTuneDVR писал(а):Какие конкретно пробовал прошивки ?
Путь к источнику конкретных прошивок или сами прошивки на облачный диск и ссылка.
Фото шильдика с камеры еще бы!

https://ftp.asm.cz/Dahua/kamerove_syste ... T-GN-W-S2/
https://ftp.viatec.ua/Dahua/Firmware/PTZ/Mao-Rhea/
https://files.dahua.support/Firmware/Ka ... 25T-HN-S2/

DH_SD-Mao-Rhea_MultiLang_PN_Stream3_IVS_V2.800.0000000.4.R.191105
DH_SD-Mao-Rhea_MultiLang_PN_Stream3_IVS_V2.800.1051002.0.R.201209
DH_SD-Mao-Rhea_Eng_P_Stream3_IVS_V2.622.0000000.7.R.180404

Модель камеры как написано на консоли.
linuxrcHWID=CA-HZ2025T-S2:01:03:04:4A:21:00:01:0E:01:01:04:330:00:00:00:04:00:00:00:00:200:00peripheral=1:140:0:0:0:1:0:00:1:21:0:1ID=4G06C74PAJZ1U66devalias=SD49225T-HNethaddr=38:AF:29:B1:39:48appauto=1stdin=serialstdout=serialstderr=serialfilesize=54fileaddr=5000000
Вложения
photo_2024-02-27_14-28-49.jpg

iTuneDVR
Сообщения: 3220
Зарегистрирован: 24 авг 2013, 11:05

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение iTuneDVR » 28 фев 2024, 12:20

javierferwolf писал(а):NAND: 128 MiB
amb_nand_read_oob read page:49152 err
partition file version 2
rootfstype squashfs root /dev/mtdblock8
fail to load bootargsParametersV2.txt
fail to load bootargsParametersV2.txt
fail to init bootargsParametersV2


...


## Checking Image at 02000000 ...
Legacy image found
Image Name: kernel
Created: 2016-11-18 11:23:17 UTC
Image Type: ARM Linux Firmware (uncompressed)
Data Size: 1558834 Bytes = 1.5 MiB
Load Address: 00c80000
Entry Point: 01200000
Verifying Checksum ... OK
Programing start at: 0x00c80000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'partition-x.cramfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 4160 (1040 hex)
Erasing update flag partition.




Возможно, что проблема с флешем, раз вначале выдает ошибку чтения с nand блока, в котором храниться информация из partition-x.cramfs.img, но при этом запись этого файла идет нормально.
Можно попытаться выполнить команду
nand bad
А лучше перейти к паяльным процедурам сразу.

javierferwolf
Сообщения: 20
Зарегистрирован: 31 май 2017, 05:10

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение javierferwolf » 28 фев 2024, 16:56

iTuneDVR писал(а):
javierferwolf писал(а):NAND: 128 MiB
amb_nand_read_oob read page:49152 err
partition file version 2
rootfstype squashfs root /dev/mtdblock8
fail to load bootargsParametersV2.txt
fail to load bootargsParametersV2.txt
fail to init bootargsParametersV2


...


## Checking Image at 02000000 ...
Legacy image found
Image Name: kernel
Created: 2016-11-18 11:23:17 UTC
Image Type: ARM Linux Firmware (uncompressed)
Data Size: 1558834 Bytes = 1.5 MiB
Load Address: 00c80000
Entry Point: 01200000
Verifying Checksum ... OK
Programing start at: 0x00c80000
write : 100%
done
Using ambarella mac device
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1Download Filename 'partition-x.cramfs.img'.Download to address: 0x2000000
Downloading: *
done
Bytes transferred = 4160 (1040 hex)
Erasing update flag partition.




Возможно, что проблема с флешем, раз вначале выдает ошибку чтения с nand блока, в котором храниться информация из partition-x.cramfs.img, но при этом запись этого файла идет нормально.
Можно попытаться выполнить команду
nand bad
А лучше перейти к паяльным процедурам сразу.


Я тоже так подумал но непонятно, насколько это правда, На этом форуме есть человек, у которого такая же проблема и он может даже сказать, что у него почти такая же ptz-камера, как показано в коде HWID=S2:01:03:04:4A:21:00:01. : 0E:01:01:04:330:00:00:00:04:00:00:00:00:200:00 и смог загрузить камеру с версией прошивки DH_SD-Mao-Rhea_MultiLang_NP_Stream3_IVS_V2.623.0000000.7.R.181124 но почему-то со мной не получилось! =/
https://ipcamtalk.com/threads/dahua-ipc ... ost-445710

iTuneDVR
Сообщения: 3220
Зарегистрирован: 24 авг 2013, 11:05

Re: Восстановление камера dahua ptz SD49225T-HN-S2

Сообщение iTuneDVR » 28 фев 2024, 17:51

Да, там аналогичная ошибка и может быть это не относится к делу.
Он там так же не нашел uart и делал через tftp слушая порты, на сколько я поглядел по диагонали.
Снимай дамп, если есть чем.
Фото шильдика тоже важно для понимания какого года устройство.


Вернуться в «IPC DAHUA»