?

Log in

No account? Create an account
Раскурочил ip-камеру. Часть 2 - Chudov's journal [entries|archive|friends|userinfo]
hedgeov

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Раскурочил ip-камеру. Часть 2 [июл. 23, 2012|12:11 am]
hedgeov
Первая часть.
Продолжил играть с ip-камерой D-Link DCS-930. Подпаял к разведенным на плате контактам последовательного порта, рядом с которыми написано console разъемчик, воткнул туда имеющийся у меня преобразователь TTL-RS232, установил в терминалке режим порта 57600-8N1 и после подачи питания увидел лог загрузки.
Пока из всего увиденного меня заинтересовали строки
Found format MJPEG.
- 640x480 (30.0 fps)
- 320x240 (30.0 fps)
- 160x120 (30.0 fps)
uvcvideo: Found UVC 1.00 device  (1b3b:2970)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround
input: UVC Camera (1b3b:2970) as /class/input/input0


Это значит, что чип умеет отдавать MJPEG 640x480@30fps, но по каким-то причинам в характеристиках устройства заявлено только 20fps.
Еще пока открытый вопрос о загрузке процессора на штатной прошивке. Раз чип со временем перегревается, значит есть что улучшить. Как узнать текущую загрузку процессора пока что я тоже не понимаю. Команды top в девайсе нету, надо искать альтернативные пути.

В общем, если будет свободное время, попробую покопаться и собрать кастомную прошивку...


U-Boot 1.1.3
                                                                                
Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fac000
config usb..
******************************
Software System Reset Occurred
******************************
flash_protect ON: from 0xBF000000 to 0xBF021767
flash_protect ON: from 0xBF030000 to 0xBF030FFF
*** Warning - bad CRC, using default environment

============================================ 
Ralink UBoot Version: 3.5.2.0
 — — — — — — — — — — — — — — — — — — — — — — 
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384 
                                                                                
 ##### The CPU freq = 320 MHZ #### 
 estimate memory size =32 Mbytes
                                                                                
Signature: DCS-930                  Release 1.11 (2011-05-31)
                                                                                
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
 4  3  2  1  0 
3: System Boot system code via Flash.
## Booting image at bf050000 ...
   Image Name:   Linux Kernel Image
   Created:      2010-08-02   7:12:49 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3419904 Bytes =  3.3 MB
   Load Address: 80000000
   Entry Point:  803b6000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 803b6000) ...
## Giving linux memsize in MB, 32
                                            
Starting kernel ...
                                                         
LINUX started...
                                                            
 THIS IS ASIC
                                                                 
Linux version 2.6.21 (andy@centos.localdomain) (gcc version 3.4.2) #1447 Mon Aug
 2 15:12:39 CST 2010
                                                        
 The CPU feqenuce set to 320 MHz
CPU revision is: 0001964c
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 8128
Kernel command line: console=ttyS1,57600n8 root=/dev/ram0
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Cache parity protection disabled
cause = 800000, status = 1100ff00
PID hash table entries: 128 (order: 7, 512 bytes)
calculating r4koff... 00138800(1280000)
CPU frequency 320.00 MHz
Using 160.000 MHz high precision timer.
Console: colour dummy device 80x25
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 25300k/32768k available (3056k kernel code, 7468k reserved, 739k data, 2
232k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
detected lzma initramfs
detected lzma initramfs
initramfs: LZMA lc=3,lp=0,pb=2,dictSize=1048576,origSize=7737856
LZMA initramfs by Ming-Ching Tiew <mctiew@yahoo.com>............................
................................................................................
...........<6>squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
fuse init (API version 7.8)
io scheduler noop registered (default)
Ralink gpio driver initialized
 —- Boot Code Signature  —-
Signature: DCS-930                  Release 1.11 (2011-05-31)
===== DCS-930 v1.00   build 9 (2010-08-02) =====
Serial: 8250/16550 driver $Revision: 1.3 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
rdm_major = 254
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
=== pAd = c0000000, size = 486096 ===
< — RTMPAllocAdapterBlock, Status=0
Wlan STA Mode
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (SVN r209)
******************** CONFIG_RT2880_ROOTFS_IN_RAM
******************** CONFIG_RT2880_FLASH_4M
ralink flash device: 0x400000 at 0x1f000000
Ralink SoC physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 4 MTD partitions on "Ralink SoC physically mapped flash":
0x00000000-0x00030000 : "Bootloader"
0x00030000-0x00040000 : "Config"
0x00040000-0x00050000 : "Factory"
0x00050000-0x00400000 : "Kernel"
block2mtd: version $Revision: 1.1.1.1 $
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
dwc_otg: version 2.72a 24-JUN-2008
DWC_otg: Core Release: 2.66a
DWC_otg: Periodic Transfer Interrupt Enhancement - disabled
DWC_otg: Multiprocessor Interrupt Enhancement - disabled
DWC_otg: Using DMA mode
DWC_otg: Device using Buffer DMA mode
dwc_otg lm0: DWC OTG Controller
dwc_otg lm0: new USB bus registered, assigned bus number 1
dwc_otg lm0: irq 18, io mem 0x00000000
DWC_otg: Init: Port Power? op_state=1
DWC_otg: Init: Power Port (0)
usb usb1: Product: DWC OTG Controller
usb usb1: Manufacturer: Linux 2.6.21 dwc_otg_hcd
usb usb1: SerialNumber: lm0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Advanced Linux Sound Architecture Driver Version 1.0.14rc3 (Wed Mar 14 07:25:50 
2007 UTC).
usb 1-1: new full speed USB device using dwc_otg and address 2
usb 1-1: configuration #1 chosen from 1 choice
Found format MJPEG.
- 640x480 (30.0 fps)
- 320x240 (30.0 fps)
- 160x120 (30.0 fps)
uvcvideo: Found UVC 1.00 device  (1b3b:2970)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround
.
input: UVC Camera (1b3b:2970) as /class/input/input0
usbcore: registered new interface driver snd-usb-audio
ALSA device list:
  #0: USB Device 0x1b3b:0x2970 at usb-lm0-1, full speed
nf_conntrack version 0.5.0 (256 buckets, 2048 max)
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
GDMA1_MAC_ADRH  — : 0x00000000
GDMA1_MAC_ADRL  — : 0x00000000
Ralink APSoC Ethernet Driver Initilization. v2.00  256 rx/tx descriptors allocat
ed, mtu = 1500!
***** Init RF/MAC data from flash memory *****
LAN MAC: F0 7D 68 05 5E F8 
GDMA1_MAC_ADRH  — : 0x0000f07d
GDMA1_MAC_ADRL  — : 0x68055ef8
PROC INIT OK!
Freeing unused kernel memory: 2232k freed
init started: BusyBox v1.12.1 (2010-08-02 15:08:25 CST)
startAlgorithmics/MIPS FPU Emulator v1.5
ing pid 708, tty '': '/etc_ro/rcS'
devpts: called with bogus options
Welcome to
     _______  _______  ___     __  ____   _  _   ___
    |  ___     \|   __      ||   |   |__||    \ | || | /  /
    | |___|   ||  |__|    ||   |__  __ |     \| || |/  /
    |     _     /|     _       ||      ||  || |\     ||     \
    |__|  \__\|__| |__||______||__||_| \____||_|\___\

   	                 =System Architecture Department=

*****************
*  INTERNET.SH  *
*****************
Password for 'admin' changed
forked to background (761)
switch reg write offset=14, value=5555
switch reg write offset=40, value=1001
switch reg write offset=44, value=1001
switch reg write offset=48, value=1001
switch reg write offset=4c, value=1
switch reg write offset=50, value=2001
switch reg write offset=70, value=ffffffff
switch reg write offset=98, value=7f7f
switch reg write offset=e4, value=7f
phy_tx_ring = 0x01530000, tx_ring = 0xa1530000
phy_rx_ring = 0x00000000, rx_ring = 0x00000000
CDMA_CSG_CFG = 81000000
GDMA1_FWD_CFG = 10000
MAC_CSR0 [MACVersion:0x28720200]
RX DESC a1542000  size = 2048
< — RTMPAllocTxRxRingMemory, Status=0
SSID: Very_Special_89357451
Key1Str is Invalid key length(0) or Type(1)
Key2Str is Invalid key length(0) or Type(1)
Key3Str is Invalid key length(0) or Type(1)
Key4Str is Invalid key length(0) or Type(1)
 —> EEPROMAddressNum = 6
WLAN MAC: XX XX XX XX XX XX 
RfIcType = 5
Country Region = 81
Phy Mode = 9
MCS Set = ff 00 00 00 00
<==== rt28xx_init, Status=0
0x1300 = 00064300
device ra0 entered promiscuous mode
device eth2 entered promiscuous mode
*** begin lan.sh ***
br0: port 2(eth2) entering learning state
br0: port 1(ra0) entering learning state
route: ioctl 0x890c failed: No such process
udhcpc (v1.12.1) started
webs: Listening for HTTP requests at address 192.168.0.20
ru.pool.ntp.org: Unknown host
br0: topology change detected, propagating
br0: port 2(eth2) entering forwarding state
br0: topology change detected, propagating
br0: port 1(ra0) entering forwarding state
                                  
***tftp server, listen port: 69***
killall: dldps2121: no process killed
opt.local stop ok.
opt.local start ok.
*** end lan.sh ***
                                                          
***** g_wl_interface = ra0 ******
                                           
************************
*  END OF INTERNET.SH  *
************************
starting pid 891, tty '/dev/ttyS1': '/bin/sh'
                             
BusyBox v1.12.1 (2010-08-02 15:08:25 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
                               
# Rcv Wcid(1) AddBAReq
Start Seq = 00000000
ERROR!!! GetSuiteFromRSNIE : it can't get any more information beyond AKM 
Sending select for 192.168.1.112...
Lease of 192.168.1.112 obtained, lease time 7200
deleting route
route: ioctl 0x890c failed: No such process
adding dns xxx.xxx.xxx.xxx
webs: Listening for HTTP requests at address 192.168.1.112
                  
***tftp server, listen port: 69***
Sun Jul 22 16:28:00 UTC 2012
opt.local stop ok.
opt.local start ok.
Sun Jul 22 16:38:02 UTC 2012
**** video.sh ***

help
                                                                        
Built-in commands:
 — — — — — — — — —-
	       . : break cd chdir continue eval exec exit export false hash
	       help local pwd read readonly return set shift source times trap
	       true type ulimit umask unset wait

СсылкаОтветить

Comments:
[User Picture]From: hedgeov
2012-07-26 12:17 pm
Анонимус выше - это я залогиниться забыл.
(Ответить) (Parent) (Thread)