วันพุธที่ 7 กันยายน พ.ศ. 2565

วิธีการ Reset กล้องวงจรปิด UNV (Uniview) แบบ linux shell

 กล้อง UNV บางรุ่น เช่นกล้องแบบ Dome จะไม่มีปุ่ม Reset ทำให้ Reset แบบปกติไม่ได้ บทความนี้จะสอนวิธี Reset แบบใช้ Linux Command ครับ

กล้อง Dome ยี่ห้อ UNV 

รุ่น IPC322CR3-VSPF40-A
ขั้นแรกคือ แกะตัวกล้องออกมาเพื่อเชื่มกับพอร์ต Console ของกล้อง ตัวพอร์ตจะอยู่ที่ PCB หลัก

การเชื่อมต่อ Console
Console จะเป็น Serial Port ระดับแรงดันไฟ 3.3V ใช้ Baudrate 115200
เมื่อต่อสายเสร็จให้เป็น Serial Terminal ในคอมพิวเตอร์ ตั้ง baudrate 115200 แล้วเสียบไฟเข้ากล้อง
หลังจากเสียบไฟ จะมีข้อความ Boot ของ Linux
▒▒▒▒
IPL gd156225
D-08
HW Reset
64MB
BIST0_0001-OK
[SDMMC] NO SD!
[NOR]
offset:00010000
size:7fc8 chks:5551a134 ok

IPL_CUST gbf16da4
MXP found at 0x00003000
[SDMMC] NO SD!
  decomp_size=0x00040718


U-Boot 2015.01-svn101017 (Apr 21 2020 - 08:31:06), Build: jenkins-64位版本单控件Compile-34

Version: I3g#######
I2C:   ready
DRAM:  64 MiB
WARNING: Caches not enabled
MMC:   MStar SD/MMC: 0
nor_flash_mxp allocated success!!
Flash is detected (0x0707, 0xEF, 0x40, 0x17)
SF: Detected nor0 with total size 8 MiB
MXP found at mxp_offset[0]=0x00003000, size=0x1000
env_offset=0x2000 env_size=0x1000
Flash is detected (0x0707, 0xEF, 0x40, 0x17)
SF: Detected nor0 with total size 8 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Flash is detected (0x0707, 0xEF, 0x40, 0x17)
SF: Detected nor0 with total size 8 MiB
Detected MACID:6c:f1:7e:03:83:31
Net:   MAC Address 6C:F1:7E:03:83:31
Auto-Negotiation...
Link Status Speed:100 Full-duplex:1
mstar_emac
Press Ctrl+B to abort autoboot in 2 seconds
Flash is detected (0x0707, 0xEF, 0x40, 0x17)
SF: Detected nor0 with total size 8 MiB
SF: 1310720 bytes @ 0x30000 Read: OK
## Booting kernel from Legacy Image at 21000000 ...
   Image Name:   Linux-3.18.30
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1203256 Bytes = 1.1 MiB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
atags:0x20000000

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 3.18.30 (jenkins@w04943-OptiPlex-7020) (gcc version 4.9.4 (Buildroot 2017.08-gc7bbae9) ) #1 PREEMPT Tue Apr 21 08:32:12 CST 2020
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
early_atags_to_fdt() success
Machine model: INFINITY3 MSC000A-S03A-64M
Reserved memory: created CMA memory pool at 0x22600000, size 26 MiB
Reserved memory: initialized node cma0, compatible id shared-dma-pool
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: mtdparts=NOR_FLASH:192K(boot),1280K(kernel),6080K(program),64K(cliinfo),64K(mtd_runtime),512K(config) root=/dev/mtdblock2 rootfstype=squashfs
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 34664K/65536K available (2620K kernel code, 195K rwdata, 396K rodata, 108K init, 100K bss, 30872K reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc02fa24c   (3017 kB)
      .init : 0xc02fb000 - 0xc0316000   ( 108 kB)
      .data : 0xc0316000 - 0xc0346d60   ( 196 kB)
       .bss : 0xc0346d60 - 0xc035ff84   ( 101 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        CONFIG_RCU_FANOUT set to non-default value of 4
        Dump stacks of tasks blocking RCU-preempt GP.
NR_IRQS:16 nr_irqs:16 16
Find CLK_cpupll_clk, hook ms_cpuclk_ops
[ms_cpuclk_init] get dvfs gpio  vid_1
Architected cp15 timer(s) running at 6.00MHz (virt).
sched_clock: 56 bits at 6MHz, resolution 166ns, wraps every 2863311527936ns
Switching to timer-based delay loop, resolution 166ns
console [ttyS0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 12.00 BogoMIPS (lpj=60000)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x2027c8f8 - 0x2027c92c
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations


Version : MVX2##I3g966b75dKL_LX318####[BR:gI3/master]#XVM

GPIO: probe end
MSYS:  INIT DONE. TICK=0x0208859C
Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 2, 20480 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 128 (order: 0, 6144 bytes)
UDP-Lite hash table entries: 128 (order: 0, 6144 bytes)
NET: Registered protocol family 1
futex hash table entries: 16 (order: -4, 448 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. © 2001-2006 Red Hat, Inc.
msgmni has been set to 119
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler noop registered (default)
i2c /dev entries driver
logger: created 256K log 'log_main'
[ms_uart_probe] uart port 0 use MUX_PM_UART
1f221000.uart0: ttyS0 at MMIO 0x0 (irq = 98, base_baud = 10750000) is a unknown
[ms_uart_probe] uart port 1 use MUX_UART1
1f221200.uart1: ttyS1 at MMIO 0x0 (irq = 99, base_baud = 10750000) is a unknown
URDMA rx_buf=0xC2642000(phy:0x22642000) tx_buf=0xC2643000(phy:0x22643000) size=0x1000
[ms_uart_probe] uart port 2 use MUX_UART0
1f220400.uart2: ttyS2 at MMIO 0x0 (irq = 112, base_baud = 10750000) is a unknown
netif_napi_add() called with weight 128 on device eth%d
MSYS: DMEM request: [EMAC_BUFF]:0x00002000
[EMAC]Init EMAC success! (add delay in reset)
[HVSP]u32Dropmode on/n
[VIP]gu32CMDQmode off/nMSYS: DMEM request: [VIP_CMDQ]:0x00004000
mload_size = 35040
mload_virt_addr = c264a000
mload_dma_addr = 0x2264a000
MSYS: DMEM request: [ISP_base]:0x0001B120
ShareData_Meminfo phyaddr:0x21e879c0, viraddr:0xc1e879c0, len:0x38
AE Base: virt=0xC2653000 size=0xB400
AWB Base: virt=0xC265E400 size=0x8700
AF Base: virt=0xC2666B00 size=0xF0
HISTO Base: virt=0xC2666BF0 size=0x2F0
MOT Base: virt=0xC2666EE0 size=0x6E40
RGBIR Base: virt=0xC266DD20 size=0x400
[ISP] register driver success
[CSI] register driver successms_rtc 1f002400.rtc: rtc core: registered 1f002400.rtc as rtc0
[ms_rtc_probe]: rtc setup, frequency=12000000
[SAR] infinity_sar_probe
[JPE, JpeProbe] set base=0xfd264000 irq=93, nClockRate=288000000
MSYS: DMEM request: [BDMA_FSP_WBUFF]:0x00000100
[Ser flash] phys=0x2266f000, virt=0xc266f000, bus=0x0266f000
[FSP] Flash is detected (0x0707, 0xEF, 0x40, 0x17) ver1.1
[FSP] 1-1-1 FAST_READ MODE
mtd .name = NOR_FLASH, .size = 0x00800000 (8MiB)
 .erasesize = 0x00010000 .numeraseregions = 0
MXP_PARTS!!
MXP found at mxp_offset[0]=0x00003000, size=0x1000
6 cmdlinepart partitions found on MTD device NOR_FLASH
Creating 6 MTD partitions on "NOR_FLASH":
0x000000000000-0x000000030000 : "boot"
0x000000030000-0x000000170000 : "kernel"
0x000000170000-0x000000760000 : "program"
0x000000760000-0x000000770000 : "cliinfo"
0x000000770000-0x000000780000 : "mtd_runtime"
0x000000780000-0x000000800000 : "config"
MSYS: DMEM request: [AESDMA_ENG]:0x00001000
MSYS: DMEM request: [AESDMA_ENG1]:0x00001000
infinity_aes soc:aesdma: MSTAR AES engine enabled.
cryptodev: driver aesdmadev loaded.
[ms_cpufreq_init] cpu current clk=796917760
ms_pwm->pad_ctrl[0]=69
ms_pwm->pad_ctrl[1]=70
ms_pwm->pad_ctrl[2]=255
ms_pwm->pad_ctrl[3]=255
ms_pwm->pad_ctrl[4]=53
ms_pwm->pad_ctrl[5]=255
ms_pwm->pad_ctrl[6]=63
ms_pwm->pad_ctrl[7]=56
mstar-i3pwm 1f003400.pwm: probe successful
mstar notify driver install successfully
TCP: cubic registered
NET: Registered protocol family 17
ThumbEE CPU extension supported.
ms_rtc 1f002400.rtc: setting system clock to 1970-01-01 00:00:00 UTC (0)
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
devtmpfs: mounted
Freeing unused kernel memory: 108K (c02fb000 - c0316000)
random: init urandom read with 0 bits of entropy available
[RCS]: /etc/init.d/S00devs
mknod: /dev/console: File exists
mknod: /dev/null: File exists
[RCS]: /etc/init.d/S11init
mkdir: can't create directory '/usr/local': Read-only file system
ln: /usr/local/bin: No such file or directory
ln: /usr/sbin/pppd: Read-only file system
ln: /lib/firmware: Read-only file system
NET_USR module init ok!
NET_DBG module init ok!
[RCS]: /etc/init.d/S30ambrwfs
/etc/init.d/S30ambrwfs: line 22: can't create /proc/sys/kernel/hotplug: nonexistent directory
cp: can't stat '/root/*': No such file or directory
mount: can't find /program in /proc/mounts
[RCS]: /etc/init.d/S80network
      IP: 192.168.0.13
   BOOTP:
 GATEWAY: 192.168.0.1
 NETMASK: 255.255.255.0
HOSTNAME:
  NETDEV: eth0
AUTOCONF:

root login: [ManuparseInfo][0324]:      ProductName[IPC322LR3-VSPF40-E]
[ManuparseInfo][0325]:  BuildInfo[LENS-4801C07X;ENC-0302C2C1;SEN-0302C2C1]
[ManuparseInfo][0055]:  Product info : Type[3] Class[3] ImgInverse[1] AlarmInInverse[0] AlarmOutInverse[0] AudioIn[1] AudioOut[1] bIsLDR[0] bIsLDC[0] bIs8021x[0]
[ManuparseInfo][0076]:  Sensor type[13] name[sc2232_mipi]
[ManuparseInfo][0097]:  SpecialImgInverse[0]
[ManuparseInfo][0051]:  Light Chip Type[1]
[ManuparseWarn][0053]:  Lens match failed, default OTHER_LENS
[ManuparseInfo][0056]:  Manuparse LensType[0xf000], Class[0]
[ManuparseWarn][0096]:  Lens bu bao, default V7R1
[ManuparseInfo][0099]:  Manuparse Lens Cam Type[0x2013000]
[ManuparseInfo][0135]:  Manuparse IrCut type[0]
gpio_info[0469]: kgpio for PRODUCT_DIPCV1R2B02
gpio_info[0589]: Product type is GOBLET
gpio_info[0360]: no need to init reset button!
gpio_info[0637]: no special init
gpio_info[0682]: no [gstGreenRunLedGpio] led pin
gpio_info[0683]: no [gstRedRunLedGpio] led pin
[PWN] mstar_pwm_config duty_ns=0, period_ns=24000
reg=0x1F003710 clk=12000000, period=0x1f4
reg=0x1F003708 clk=12000000, u32Duty=0x0
[PWM] mstar_pwm_enable
IO PAD conflict turn off jtag. Disable EJTAG!
gpio_info[0190]: Pwm_Init Ok
gpio_info[0157]: Pwm val min[160] max[435]gpio_info[0233]: set pwm chl[6] duty[297]
[PWN] mstar_pwm_config duty_ns=297, period_ns=24000
reg=0x1F003710 clk=12000000, period=0x1f4
reg=0x1F003708 clk=12000000, u32Duty=0x94
motor_info[0292 @ DC_IrcutInit]:        DC ICR init ok
motor_info[1296 @ motor_init]:  motor finish init
<4>wait for runtime_thread_process thread
<4>wait for runtime_thread_process thread
init: property_service started...
init: minit[MVX2####g348e306CM_MINIT#####XVM]
net.core.wmem_max = 655360
net.core.wmem_default = 655360
vm.overcommit_memory = 0
vm.overcommit_ratio = 50
vm.min_free_kbytes = 598
vm.dirty_background_ratio = 2
vm.dirty_expire_centisecs = 500
vm.dirty_ratio = 2
vm.dirty_writeback_centisecs = 100
vm.admin_reserve_kbytes = 0
vm.user_reserve_[FB]Set 68
[DRVHVSP]Drv_HVSP_SetFbManageConfig(646):8000
kbytes = 0
DNRR OFF
[FB]Set 57
[DRVHVSP]Drv_HVSP_SetFbManageConfig(646):100
UNLOCK
lsusb: /sys/bus/usb/devices: No such file or directory
MSYS: DMEM request: [EMAC_BUFF]:0x00002000
MSYS: DMEM kept entry found: name=EMAC_BUFF, phys=0x22644000, length=0x00002000
cat: can't open '/proc/driver/boardname': No such file or directMSYS: DMEM request: [VIP_CMDQ]:0x00004000
ory
PHYS=0x22644000,KVIRT=0xC2644000, LENGTH=0x00002000
Successfull!
MSYS: DMEM kept entry found: name=VIP_CMDQ, phys=0x22646000, length=0x00004000
PHYS=0x22646000,KVIRT=0xC2646000, LENGTH=0x00004000
Successfull!
MSYS: DMEM request: [ISP_base]:0x0001B120
MSYS: DMEM kept entry found: name=ISP_base, phys=0x22653000, length=0x0001B120
PHYS=0x22653000,KVIRT=0xC2653000, LENGTH=0x0001BMSYS: DMEM request: [BDMA_FSP_WBUFF]:0x00000100
120
Successfull!
chmod: /tmp/bin/MSYS: DMEM kept entry found: name=BDMA_FSP_WBUFF, phys=0x2266F000, length=0x00000100
update: Read-only file system
cp: can't stat '/usr/sbin/nandwrite_move': No such file or directory
chmod: /tmp/bin/nandwrite: No such file or directory
PHYS=0x2266F000,KVIRT=0xC266F000, LENGTH=0x00000100
Successfull!
MSYS: DMEM request: [AESDMA_ENG]:0x00001000
MSYS: DMEM kept entry found: name=AESDMA_ENG1, phys=0x22671000, length=0x00001000
PHYS=0x22671000,KVIRT=0xC2671000, LENGTH=0x00001000
Successfull!
MSYS: DMEM request: [AESDMA_ENG1]:0x00001000
MSYS: DMEM kept entry found: name=AESDMA_ENG1, phys=0x22671000, length=0x00001000
PHYS=0x22671000,KVIRT=0xC2671000, LENGTH=0x00001000
SuccessfullMSYS: DMEM request: [ISP_MLOAD]:0x000088E0
!
PHYS=0x22672000,KVIRT=0xC2672000, LENGTH=0x000088E0
Successfull!
MSYS: DMEM request: [DLC_MEM]:0x00000400
PHYS=0x2267B000,KVIRT=0xC267B000, LENGTH=0x00000400
Successfull!
MSYS: DMEM request: [SCL_MCNR_YC]:0x003FC000
PHYS=0x2267C000,KVIRT=0xC267C000, LENGTH=0x003FC000
Successfull!
PHYS=0x22A78000,KVIRT=0xC2A78000, LENGTH=0x000FF000
Successfull!
cp: can't stat '/program/bin/ca.cer': No such file or directory
PHYS=0x22B77000,KVIRT=0xC2B77000, LENGTH=0x00094800
Successfull!
PHYS=0x22C0C000,KVIRT=0xC2C0C000, LENGTH=0x00094800
Successfull!
PHYS=0x22CA1000,KVIRT=0xC2CA1000, LENGTH=0x00025200
Successfull!
PHYS=0x22CC7000,KVIRT=0xC2CC7000, LENGTH=0x00094800
Successfull!
PHYS=0x22D5C000,KVIRT=0xC2D5C000, LENGTH=0x00031800
Successfull!
PHYS=0x22D8E000,KVIRT=0xC2D8E000, LENGTH=0x0000A1A0
Successfull!
PHYS=0x22D99000,KVIRT=0xC2D99000, LENGTH=0x000AEA80
Successfull!
PHYS=0x22E48000,KVIRT=0xC2E48000, LENGTH=0x000AEA80
Successfull!
PHYS=0x22EF7000,KVIRT=0xC2EF7000, LENGTH=0x000AEA80
Successfull!
Open file fail
PHYS=0x22FA6000,KVIRT=0xC2FA6000, LENGTH=0x00025200
Successfull!
PHYS=0x22FCC000,KVIRT=0xC2FCC000, LENGTH=0x00009F00
Successfull!
PHYS=0x22FD6000,KVIRT=0xC2FD6000, LENGTH=0x0000A080
Successfull!
PHYS=0x22FE1000,KVIRT=0xC2FE1000, LENGTH=0x00035200
Successfull!
PHYS=0x23017000,KVIRT=0xC3017000, LENGTH=0x00035200
Successfull!
PHYS=0x2304D000,KVIRT=0xC304D000, LENGTH=0x00035200
Successfull!
PHYS=0x23083000,KVIRT=0xC3083000, LENGTH=0x002FD400
Successfull!
PHYS=0x23381000,KVIRT=0xC3381000, LENGTH=0x000CC000
Successfull!
PHYS=0x2344D000,KVIRT=0xC344D000, LENGTH=0x0000A800
Successfull!
PHYS=0x23458000,KVIRT=0xC3458000, LENGTH=0x00382C00
Successfull!
PHYS=0x237DB000,KVIRT=0xC37DB000, LENGTH=0x00382C00
Successfull!
PHYS=0x23B5E000,KVIRT=0xC3B5E000, LENGTH=0x00382C00
Successfull!
rm: can't remove 'logo.png': Read-only file system
ln: logo.png: File exists
mount: can't find /calibration/ in /proc/mounts
tmp/config_a.xml
Interversion is :DIPCV100R002B03D003SP63
Not found path [MWare/IvaIpc/SmartMode/SmartType]
Path MWare/IvaIpc/SmartMode/SmartType Not find
DeviceName is IPC322CR3-VSPF40-A; PrototypeName is IPC322LR3-VSPF40-E; ManufacturingDate is 2020-09-06.
Interversion is :DIPCV100R002B03D003SP63
szTmpManufacturingDate error:
Not found path [MWare/IvaIpc/SmartMode/SmartType]
Path MWare/IvaIpc/SmartMode/SmartType Not find
do: ls /program/factory/default_cfg_IPC232.xml
/program/factory/default_cfg_IPC232.xml
do: cp /program/factory/device_cap_IPC302L.xml /config/device_cap.xml
do: cp /program/factory/default_cfg_IPC232.xml /config/default_cfg.xml
do: cp /program/factory/preset_scene_IPC3XX.xml /config/preset_scene.xml
Not found path [/MWare/Basic/TmsServer/CameraID]
Not found path [/MWare/Basic/TmsServer]
Not found path [/MWare/Basic/TmsServerEx/CameraID]
Not found path [/MWare/Basic/TmsServerEx]
MW_XML_LoadFile:Open file fail! /calibration/customize/customized.xmlLoad XML File failed!
Customize Time Zone Fail
CustomerCode val is 09, switching
ln: /www/skin/default_1/images/logo.png: File exists
DeviceName is IPC322CR3-VSPF40-A. CustomCode is 09
mount: can't find /calibration/ in /proc/mounts
CPU type is mstar
sed: /config/config_a.xml: No such file or directory

รอจนกระทั่งไม่มีข้อความอื่นขึ้นมาอีก แล้วกด ENTER จะปรากฎหน้า Login ให้ใส่

Username = root

Password = 123456

root login: root

Password:

Nov 30 16:00:06 login[130]: root login on 'ttyS0'

พิมพ์คำสั่ง cleanconfig กด ENTER

แล้วตามด้วยคำสั่ง reboot กด ENTER

เท่านี้กล้องก็จะคืนค่าโรงงานให้ครับ

ไม่มีความคิดเห็น:

แสดงความคิดเห็น