hi guys, some info that I was able to extract from these A9 cameras: if it can help someone smarter than me ....
so to start I have two different cameras, but almost identical with the BK7252 chip which use the "little stars" and "xiaodou" apk.
the printed circuits are slightly different and one of them has RX TX inscriptions. the other D0, CEN, VIO etc ...
I connected a USB-UART converter to RX / TX and launched a terminal (putty or others): I have lots of things displayed!
the system is RT-Thread and I managed to do some cool experiments.
the command "Help" gives all the commands available:
>help
RT-Thread shell commands:
start_ap_direct - This is start_ap_direct
testLedDemo - This is testLedDemo
mac - set_or_read_mac
rxsens - do_rx_sens
txevm - do_tx_evm
video - video
wifi_demo - wifi_demo command
rfcali_show_data - rfcali show data
rfcali_cfg_tssi_g - rfcali cfg tssi
rfcali_cfg_rate_dist - rfcali cfg rate_dist
rfcali_cfg_mode - rfcali cfg mode
rfcali_cfg_tssi_b - rfcali cfg tssi
camera_param_test - camera_param_test
camera_anti_flicker_test - camera_fps_test
camera_fps_test - camera_fps_test
camera_ppi_test - camera_ppi_test
camera_effect_test - camera_effect_test
camera_contrast_test - camera_contrast_test
camera_flip_test - camera_flip_test
camera_bringtness_test - camera_bringtness_test
camera_inf_write_reg_value - camera_inf_write_reg_value
camera_inf_read_reg_value - camera_inf_read_reg_value
camera_reg_read_test - camera_reg_read_test
stopAudioEncoderStream - This is stopAudioEncoderStream
startAudioEncoderStream - This is startAudioEncoderStream
registAudioLiveStream - This is registAudioLiveStream
batteryDemo - This is batteryDemo
buttonServiceInit - This is buttonServiceInit
VideoTransferTcpStart - This is VideoTransferTcpStart
testFlash - This is testFlash
testBurn - This is testBurn
testFatctor - This is testFatctor
testOtaDemo - This is testOtaDemo
testTFCardOta - This is testTFCardOta
apMatchCancel - apMatchCancel
apMatchStart - apMatchStart
reBleConfigNet - reBleConfigNet command
destroyBle - destroyBle command
registerBle - registerBle command
testDevice - This is testDevice
testAppCheckOta - this is testAppCheckOta
testDeviceSearch - This is testDeviceSearch
testTFCard - This is testTFCard
stopVideoEncoderStream - This is stopVideoEncoderStream
startVideoEncoderStream - This is startVideoEncoderStream
registVideoLiveStream - This is registVideoLiveStream
audio_dump - audio_dump
wdg_stop - wdg_stop
wdg_refresh - wdg_refresh
wdg_start - wdg_start
reboot - reboot system
set_log - set_log on or off
stack - rt_hw_stack_print
resetenv - Reset all envrionment variable to default.
getvalue - Get an envrionment variable by name.
saveenv - Save all envrionment variables to flash.
printenv - Print all envrionment variables.
setenv - Set an envrionment variable.
netio_init - netio server
ntp_sync - Update time by NTP(Network Time Protocol)
ping - ping network host
ble_command - ble_command
bk_ble_netconfig_stop - bk_ble_netconfig_stop
bk_ble_netconfig_start - bk_ble_netconfig_start
ble_netconfig_sample - ble_netconfig_sample
button_test - button test
http_ota - OTA by http client: http_ota [url]
memtrace - dump memory trace information
list_fd - list file descriptor
list_device - list device in system
list_timer - list timer in system
list_mempool - list memory pool in system
list_memheap - list memory heap in system
list_msgqueue - list message queue in system
list_mailbox - list mail box in system
list_mutex - list mutex in system
list_event - list event in system
list_sem - list semaphore in system
list_thread - list thread
version - show RT-Thread version information
help - RT-Thread shell help.
free - Show the memory usage in the system.
time - Execute command with time.
ps - List threads in the system.
netstat - list the information of TCP / IP
dns - list the information of dns
ifconfig - list the information of network interfaces
echo - echo string to file
df - disk free
mkfs - format disk with file system
mkdir - Create the DIRECTORY.
pwd - Print the name of the current working directory.
cd - Change the shell working directory.
rm - Remove(unlink) the FILE(s).
cat - Concatenate FILE(s)
mv - Rename SOURCE to DEST.
cp - Copy SOURCE to DEST.
ls - List information about the FILEs.
fal - FAL (Flash Abstraction Layer) operate.
date - get date and time or set [year month day hour min sec]
wifi - wifi command
wifi help - Help information
wifi cfg SSID PASSWORD - Setting your router AP ssid and pwd
wifi - Do the default wifi action
wifi wlan_dev scan
wifi wlan_dev join SSID PASSWORD
wifi wlan_dev bjoin BSSID PASSWORD
wifi wlan_dev ap SSID [PASSWORD]
wifi wlan_dev up
wifi wlan_dev down
wifi wlan_dev rssi
wifi wlan_dev status
>printenv
user=user
ssid0=pdtest
passwd0=123456789
factoryflag=0
cchipupdate=0
workmode=ap
lowpower_onoff=0
systemvolume=86
username0=admin
userpasswd0=6666
username1=admin
userpasswd1=6666
recmode=1
airkissflag=1
reboot_reason=0
led_onoff=1
>netstat
0 0 0.0.0.0:32108 <==> 0.0.0.0:0
#1 0 0.0.0.0:17650 <==> 0.0.0.0:0
#2 4 0.0.0.0:68 <==> 0.0.0.0:67
#3 0 0.0.0.0:8600 <==> 0.0.0.0:0
>reboot
reboot system
\ | /
- RT - Thread Operating System
/ | \ 3.1.0 build Mar 6 2021
2006 - 2018 Copyright by rt-thread team
[FUNC]rwnxl_init
[bk]tx_txdesc_flush
[FUNC]calibration_main
get rfcali_mode:0
tssi_th:b-125, g-100
fit n20 tab with dist:2
fit n20 tab with dist:2
fit n20 tab with dist:2
txpwr table for ble ch0/19/39 inused
lpf_i & q in flash is:9, 10
xtal in flash is:25
xtal_cali:25
rwnx_tpc_pa_map_init
[FUNC]ps_init
[FUNC]func_init_extended OVER!!!
lwIP-2.0.2 initialized!
set dac vol:65 - indx:11,dig:30,ana:1a
set adc vol: 80 - 80
igmp_mac_filter add 224.0.0.1 01:00:5E:00:00:01
register station wlan device sucess!
igmp_mac_filter add 224.0.0.1 01:00:5E:00:00:01
register soft-ap wlan device sucess!
beken wlan hw init
drv_pm_init
[D/FAL] (fal_flash_init:63) Flash device | beken_onchip | addr: 0x00000000 | len: 0x00400000 | blk_size: 0x00001000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device | beken_onchip_crc | addr: 0x00000000 | len: 0x00400000 | blk_size: 0x00001000 |initialized finish.
[D/FAL] (fal_partition_init:176) Find the partition table on ‘beken_onchip_crc’ offset @0x0000ed94.
[32;22m[I/FAL] ==================== FAL partition table ==================== [0m
[32;22m[I/FAL] | name | flash_dev | offset | length | [0m
[32;22m[I/FAL] ------------------------------------------------------------- [0m
[32;22m[I/FAL] | bootloader | beken_onchip_crc | 0x00000000 | 0x0000f000 | [0m
[32;22m[I/FAL] | app | beken_onchip_crc | 0x00010000 | 0x00180000 | [0m
[32;22m[I/FAL] | download | beken_onchip | 0x001a9000 | 0x00253000 | [0m
[32;22m[I/FAL] | EasyFlash | beken_onchip | 0x003fc000 | 0x00002000 | [0m
[32;22m[I/FAL] | param2 | beken_onchip | 0x003fe000 | 0x00001000 | [0m
[32;22m[I/FAL] ============================================================= [0m
[32;22m[I/FAL] RT-Thread Flash Abstraction Layer (V0.4.0) initialize success. [0m
tc_entity_init
ROMFS File System initialized!
current app image name: app, version: 7252_CY_IPC_2103061400, timestamp: 1615010409
===sd card open:0===
msh />cmd 1:3
sdcard cmd 8 timeout,cmdresp_int_reg:0x84
cmd8 noresp, voltage mismatch or Ver1.X SD or not SD
sdcard cmd 37 timeout,cmdresp_int_reg:0x84
send cmd55 err:3
send cmd55&cmd41 err, quite loop
cmd 1:3
sdcard cmd 8 timeout,cmdresp_int_reg:0x84
cmd8 noresp, voltage mismatch or Ver1.X SD or not SD
sdcard cmd 37 timeout,cmdresp_int_reg:0x84
send cmd55 err:3
send cmd55&cmd41 err, quite loop
cmd 1:3
sdcard cmd 8 timeout,cmdresp_int_reg:0x84
cmd8 noresp, voltage mismatch or Ver1.X SD or not SD
sdcard cmd 37 timeout,cmdresp_int_reg:0x84
send cmd55 err:3
send cmd55&cmd41 err, quite loop
sdcard_open err
SD File System initialzation failed!
Enter normal mode…
app_init finished
[Flash]EasyFlash V3.0.4 is initialize success.
[Flash]You can get the latest version on GitHub - armink/EasyFlash: Lightweight IoT device information storage solution: KV/IAP/LOG. | 轻量级物联网设备信息存储方案:参数存储、在线升级及日志存储 ,全新一代版本请移步至 https://github.com/armink/FlashDB .
#
*
* Welcome to C-chip P2P IPC…
*
*
* C-chip AIOT Team
* Project Name : K9-IP-CAMERA
* Version : 0.0.2
* Date : Mar 6 2021 13:57:51
network interface: ap
MTU: 1500
MAC: fc 58 4a 05 a0 b1
FLAGS: UP LINK_DOWN ETHARP BROADCAST IGMP
ip address: 0.0.0.0
gw address: 0.0.0.0
net mask : 0.0.0.0
network interface: w0 (Default)
MTU: 1500
MAC: fc 58 4a 05 a0 b0
FLAGS: UP LINK_DOWN ETHARP BROADCAST IGMP
ip address: 0.0.0.0
gw address: 0.0.0.0
net mask : 0.0.0.0
dns server #0: 0.0.0.0
dns server #1: 0.0.0.0
[DRV_WLAN]drivers\wlan\drv_wlan.c L902 beken_wlan_control cmd: case WIFI_INIT!
_wifi_easyjoin: ssid:Livebox-LPG bssid:00:00:00:00:00:00 key:vanille01
start watch dog
rt_hw_wdg_start time=10000 threshold=5000
net 0 not ip up
[31;22m[E/NTP]: ERROR no such host [0m
[31;22m[E/NTP]: ERROR no such host [0m
[31;22m[E/NTP]: ERROR no such host [0m
1041 [ [1;31mERROR [0m cc_midware\tfcard_manage\tfcard_manage.c-isSdCardInserted:63]: [0m TFCard not inserted!
1051 [ [1;31mERROR [0m cc_midware\hardware\manageOta\tfcardOta.c-tfcardOtaServiceTask:311]: [0m TFCard is not inserted, no ota!
fast_connect
lr:2d681
1382: [sa_sta]MM_RESET_REQ
[bk]tx_txdesc_flush
[sa_sta]ME_CONFIG_REQ
rw_msg_send_me_config_req ps_on is 1
set_ps_mode_cfm:911 1 0 0
[sa_sta]ME_CHAN_CONFIG_REQ
[sa_sta]MM_START_REQ
bssid 8c-f8-13-49-63-ba
security2cipher 2 3 24 8 security=6
cipher2security 2 3 24 8
mm_add_if_req_handler:0
hapd_intf_add_vif,type:2, s:0, id:0
wpa_dInit
wpa_supplicant_req_scan
Setting scan request: 0.100000 sec
MANUAL_SCAN_REQ
wpa_supplicant_scan
Cancelling scan request
wpa_driver_associate
scan_start_req_handler
me_set_ps_disable:795 1 0 1 0 1
me_set_ps_disable_req_handler 1!!
me_set_ps_disable 0 1
me_set_ps_disable2 1 1
set_ps_mode_cfm:911 1 5 0
exit dtim ps!
sm_auth_send:1
sm_auth_handler
sm_assoc_rsp_handler
rc_init: station_id=0 format_mod=2 pre_type=0 short_gi=1 max_bw=0
rc_init: nss_max=0 mcs_max=7 r_idx_min=0 r_idx_max=3 no_samples=10
mm_set_vif_state_req_handler
chan_bcn_detect_start
---------SM_CONNECT_IND_ok
Not associated - Delay processing of received EAPOL frame (state=ASSOCIATING bssid=00:00:00:00:00:00 )
wpa_driver_assoc_cb
get_scan_rst_null
Cancelling scan request
get_scan_rst_null
hapd_intf_add_key CCMP
add sta_mgmt_get_sta
sta:0, vif:0, key:0
sta_mgmt_add_key
add hw key idx:24
add TKIP
add is_broadcast_ether_addr
sta:255, vif:0, key:2
add hw key idx:2
ctrl_port_hdl:1
me_set_ps_disable:795 0 1 0 0 4
dis set ps 4!!
sta_ip_start
configuring interface mlan (with DHCP client)
dhcp_check_status_init_timer
new dtim period:3
new ie: 0 : 4c 69 76 65 62 6f 78 2d 4c 50 47
new ie: 1 : 82 84 8b 96 c 12 18 24
new ie: 3 : 6
new ie: 2d : ad 1 1b ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 6 e4 a7 c 0
new ie: 30 : 1 0 0 f ac 2 2 0 0 f ac 4 0 f ac 2 1 0 0 f ac 2 c 0
IP UP: 192.168.17.168
[ip_up]:start tick = 1017, ip_up tick = 2222, total = 1205
------start enter ps mode—
first enable sleep
power_save_me_ps_first_set_state:582
me_send_ps_req 2 0 0
ps_keep_timer init
set_ps_mode_cfm:911 1 4 0
set listen dtim:1
enter 0 ps,p:3 m:1 int:100 l:1!
power_save_dtim_ps_init
* Create preload thread for 1 sessions
prevent sleep is 0
prevent sleep is 0
prevent sleep is 0
sleep_first 0
dtim period:3 multi:1
Battery voltage 4140mv 95%
video_transfer_init 3
video_transfer_main entry
video transfer send type:3
open I2C2
status:0
vbuf opened
ejpeg_hdl is DD_HANDLE_UNVALID
adc-buf:009011e8, adc-buf-len:5120, ch:1
audio_device_mic_opened
adc-buf:009011e8, adc-buf-len:5120, ch:1
set adc channel 1
audio_device_mic_set_channel:1
set adc sample rate 8000
audio_device_mic_set_rate:8000
set QVGA
GC0309 init finish
camera_intfer_init,a5a50003-a5a50005
using "setenv" i put my SSID and password, and the camera connected to my network!
(after a "saveenv" and a reboot.)
On the other hand, still impossible to interact with the camera. an analysis of the TCP / UDP ports does not return anything and Wireshark does not see any frame.
I then created an AP with an ESP8266, to which I added a DNS server which responds to all requests by the IP of my PC.
I then put the SSID of the AP in the camera + reboot but again I was disappointed because even if the camera considers my PC as its gateway, I do not see any frame with wireshark.
in short, I haven't made much progress and I publish these discoveries for those who, unlike me, know what to do and how to do !!!
sorry for the google translation but i'm french and as you know french only can speak french ...
Tuyau2poil