ghoost82 / mijia-720p-hack

Xiaomi Mijia-720P camera hack
252 stars 58 forks source link

Chuangmi 720p stucks with "sending Wifi discover" #21

Open Nuker1773 opened 5 years ago

Nuker1773 commented 5 years ago

Hi guys,

I bought a bunch of these Cams (Link). Modell Code cmsxj01c. and trying to setup a small security system for my house but I cant get this hack working. When I am starting the cams with the necessary files and correct Wifi Settings (no spaces in the SSID, nothing special in the psk!) in the config they stuck with blue blinking led. Checking the logs shows its ending with repeating "sending wifi discover..." I tried already a few firmwares from the old ones that are recommended to the newest but nothing changes here. Already spent about 10 hours to get this working but now I dont know what to do anymore..

Any Ideas?

Best Regards, Nuker1773

fliphess commented 5 years ago

Try resetting to an older firmware using the tf_recovery.img. If that is done, you can set the wifi credentials and SSID using the configuration file of the hack rather than through the miihome app which is a bit flaky.

Nuker1773 commented 5 years ago

I already tried a few older Firmwares and was configure the wifi settings with the config files aswell. I will write down the log, maybe this helps.

Nuker1773 commented 5 years ago

Using tf_recovery.img Version Release number 3.3.6_2017080313 and Hack version 0.95 I get this. Blue LED stays on after boot and nothing happens.

Mijia 720P hack configuration ROOT_PASSWORD=1234qwer WIFI_SSID=XXX WIFI_PASS=XXX TIMEZONE=UTC NTP_SERVER=pool.ntp.org ENABLE_SYSLOG=0 DISABLE_CLOUD=1 DISABLE_CLOUD_STREAMING=1 DISABLE_OTA=1 ENABLE_TELNETD=1 ENABLE_SSHD=0 ENABLE_HTTPD=1 ENABLE_FTPD=0 ENABLE_SAMBA=0 ENABLE_RTSP=1 RTSP_OPTIONS= SOUND_EN=0 Configure time zone Setting root password Changing password for root New password: Bad password: too weak Retype password: Passwords don't match passwd: password for root is unchanged Setting Samba root password tdbsam_open: Converting version 0.0 database to version 4.0. tdbsam_convert_backup: updated /tmp/sd/mijia-720p-hack/tmp/samba/passdb.tdb file. account_policy_get: tdb_fetch_uint32 failed for type 1 (min password length), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 2 (password history), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 7 (reset count minutes), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0 Failed to load upcase.dat, will use lame ASCII-only case sensitivity rules Failed to load lowcase.dat, will use lame ASCII-only case sensitivity rules Added user root. Configure WiFi Configure WiFi Configure Cloud Services Stopping restartd...killall: restartd: no process killed Disabling Cloud Disabling miio_client Disabling miio_client_helper_nomqtt.sh Disabling miot_devicekit Disabling miot_qrcode.sh Disabling miio_smb Disabling logmi.sh Disabling Cloud Streaming Disabling miio_avstreamer Disabling OTA Disabling miio_ota Executing /mnt/data/test/boot.sh Starting telnetd: OK Starting web server OK Starting RTSP server OK ntpd: bad address 'pool.ntp.org ' handle_light_state() Blue: flashMode = 0, brightness = 80 handle_light_state() Red: flashMode = 0, brightness = 0

fliphess commented 5 years ago

Can you use a longer root password? I think that's the reason you can't login using ssh. Try telnet: I think it's password less as setting a password failed due to:

Bad password: too weak

It seems to be too short..... Try changing it in the config file and restart.

Second: The rtspd server should have been started and the lighttpd as well, can you connect to the camera?

If not, check the password and ssid of your wifi, looks like it is incorrect as no errors appeared during the wifi setup.

Otherwise try my fork, which is optimized for the chuangmi 720p....... I fixed most of the errors that appeared during the boot process......

Nuker1773 commented 5 years ago

I can try a longer root password in the config but the problem is that the camera is not connected to my wifi. I dont see any new Device in my Wifi Controller after the camera is started. Im 100% sure Wifi password and ssid are correct. I will try your optimized hack aswell, thanks for the info, fliphess! I will report back! That gives me some hope that I dont have to destroy my 8 cams to release my anger.

fliphess commented 5 years ago

So far most of the chuangmi cam's are still able to use the hack when using the tf_recovery.img Keep me posted if it does for yours, otherwise we'll have to find a way to make it possible :)

Nuker1773 commented 5 years ago

Now I tried your optimized files. Used the tf_recovery.img file and made sure that the file was renamed to .bak. Then copied SDCARD files to my 2gb sd and configured ssid and passwort. Powered on the cam and it stucks with blinking blue led. there is now logfile created on my sdcard now.

Nuker1773 commented 5 years ago

Using File Format FAT (Default) instead of FAT32 its creating logfiles and stucks with blue LED On. syslog:

Jan 1 08:00:10 syslogd started: BusyBox v1.19.4 Jan 1 08:00:10 kernel: klogd started: BusyBox v1.19.4 (2017-08-10 20:29:54 CST) Jan 1 00:00:11 syslog: Password for 'root' changed Jan 1 00:00:14 kernel: Frammap: DDR0: memory base=0x1800000, memory size=0x1e00000, align_size = 4K. Jan 1 00:00:14 kernel: Frammap: version 1.1.2, and the system has 1 DDR. Jan 1 00:00:14 kernel: Frammap: fail to open /mnt/mtd/config_8136, /tmp/template_8136 is created. Jan 1 00:00:14 kernel: log: module license 'GM' taints kernel. Jan 1 00:00:14 kernel: Disabling lock debugging due to kernel taint Jan 1 00:00:14 kernel: log.ko: Jan 13 2015 18:00:07 (mmap 0x81600000 size 0xc000) Jan 1 00:00:14 kernel: LOG base 0x848bd000 size 4K (start pointer 0x7f00b114) Jan 1 00:00:14 kernel: PAGE_OFFSET(0x80000000) VMALLOC START(0x84800000) HZ(100) Jan 1 00:00:14 kernel: ms.ko v0.9 Jan 13 2015 18:00:09 Jan 1 00:00:14 kernel: em.ko v0.27 Jan 13 2015 17:59:15 Jan 1 00:00:14 kernel: em_user v0.6 Jan 13 2015 17:59:14 Jan 1 00:00:14 kernel: EM Module Service Starting (callback_period = 3ms) Jan 1 00:00:14 kernel: Start EM thread 2(em_callback:2) with nice -20 Jan 1 00:00:14 kernel: Start EM thread 1(em_callback:1) with nice -20 Jan 1 00:00:14 kernel: Start EM thread 0(em_callback:0) with nice -20 Jan 1 00:00:14 kernel: think2d_module_init Jan 1 00:00:14 kernel: T2D VER:2.7 think2d_drv_probe done, vbase 0x84922000, pbase 0x92200000 0x837F0B60 (1) Jan 1 00:00:14 kernel: LCD platform: Hook GM8136 driver. Jan 1 00:00:14 kernel: GM_ffb: [ver:0.1.22]INIT flcd200 OK. Jan 1 00:00:14 kernel: LCD0: PA = 0x9bf00000, VA = 0x84980000, size:0xd000 bytes Jan 1 00:00:14 kernel: LCD0: Output resolution is D1 NTSC. Jan 1 00:00:14 kernel: Register codec TVE100. Jan 1 00:00:14 kernel: LCD0: Input resolution is NTSC Jan 1 00:00:14 kernel: LCD0 registers 1 entities to video graph! Jan 1 00:00:14 kernel: LCD0: Driver[Ver: 1.2.3] init ok. fb0_fb1_share:1, fb1_pan_display:0 Jan 1 00:00:14 kernel: Welcome to use sar_adc_drv VER:2.0 Jan 1 00:00:14 kernel: module_init_func Jan 1 00:00:14 kernel: register_driver Jan 1 00:00:14 kernel: driver_probe Jan 1 00:00:14 kernel: dev_data_alloc_specific done Jan 1 00:00:14 kernel: ADDA paddr=90b00000 vaddr=8497c000 tve paddr=93500000 vaddr=8497e000 Jan 1 00:00:14 kernel: set_pinmux set as 0xB8 0xFFECF238 OK Jan 1 00:00:14 kernel: * register_cdev Jan 1 00:00:14 kernel: driver_probe done, io_vadr 0x8497A000, io_padr 0x90A00000 0x837434A0 Jan 1 00:00:14 kernel: driver_probe done,runmod:0x0,gain0 min-max(0x0-0x0) Jan 1 00:00:14 kernel: fe_common version 140714 Jan 1 00:00:15 kernel: platform_init Jan 1 00:00:15 kernel: ADDA308 current use MCLK=24568965 Jan 1 00:00:15 kernel: adda308_init_one [0] version 150324 Jan 1 00:00:15 kernel: FT3DNR200 Version 2017_0216_1054 Jan 1 00:00:15 kernel: request IRQ42 with ft3dnr_interrupt() ok! Jan 1 00:00:15 kernel: FT3DNR sp.0 buf size 0x3000 width 1280 height 720 phy addr 0x18e4000 Jan 1 00:00:15 kernel: FT3DNR mot.0 buf size 0x210 width 1280 height 720 phy addr 0x18e7000 Jan 1 00:00:15 kernel: FT3DNR mot.1 buf size 0x210 width 640 height 480 phy addr 0x18e8000 Jan 1 00:00:15 kernel: FT3DNR var.0 buf size 0x108 width 1280 height 720 phy addr 0x18e9000 Jan 1 00:00:15 kernel: FT3DNR var.1 buf size 0x60 width 640 height 480 phy addr 0x18ea000 Jan 1 00:00:15 kernel: FT3DNR ref.0 buf size 0x1c2000 width 1280 height 720 phy addr 0x18eb000 Jan 1 00:00:15 kernel: FT3DNR ref.1 buf size 0x96000 width 640 height 480 phy addr 0x1aad000 Jan 1 00:00:15 kernel: ISP328 v1.65, built @ Aug 26 2016 15:49:18 Jan 1 00:00:15 kernel: USE_DMA_CMD: TRUE Jan 1 00:00:15 kernel: [ISP_DBG]: idma_cmd pa=0x01b43000, va=0x84ad6000 Jan 1 00:00:15 kernel: [ISP_DBG]: odma_cmd pa=0x01b44000, va=0x84ad8000 Jan 1 00:00:15 kernel: [ISP_DBG]: hist_sta_buf pa=0x01b46000, va=0x84adc000 Jan 1 00:00:15 kernel: [ISP_DBG]: ae_sta_buf pa=0x01b47000, va=0x84ade000 Jan 1 00:00:15 kernel: [ISP_DBG]: awb_sta_buf pa=0x01b48000, va=0x84ae0000 Jan 1 00:00:15 kernel: [ISP_DBG]: af_sta_buf pa=0x01b49000, va=0x84ae2000 Jan 1 00:00:15 kernel: [ISP_DBG]: awb_seg_sta_buf0 pa=0x01b4a000, va=0x84ba0000 Jan 1 00:00:15 kernel: [ISP_DBG]: awb_seg_sta_buf1 pa=0x01b62000, va=0x84bc0000 Jan 1 00:00:15 kernel: ISP Alogrithm v2.10 Jan 1 00:00:15 kernel: Register [0][GM_AE] Jan 1 00:00:15 kernel: Register [1][GM_AWB] Jan 1 00:00:15 kernel: Register [2][GM_AF] Jan 1 00:00:15 kernel: EXT_CLK output ==> 27000000Hz Jan 1 00:00:15 kernel: CAP driving capacity = 16 Jan 1 00:00:15 kernel: [ISP_INFO]: Sensor Interface : MIPI Jan 1 00:00:15 kernel: [ISP_INFO]: xclk=27000000, pclk=35775000 Jan 1 00:00:15 kernel: [ISP_INFO]: adjust_blk fps=15, vmax=1604 Jan 1 00:00:15 kernel: [ISP_INFO]: hts=1478, t_row=413, sw_lines_max=1600 Jan 1 00:00:15 kernel: [VCAP_INFO]: VCAP300 Version: 0.3.7 Jan 1 00:00:15 kernel: [ISP_INFO]: s_clk=178875000 Jan 1 00:00:15 kernel: [ISP_INFO]: Found [GM_AE] Jan 1 00:00:15 kernel: [ISP_INFO]: Found [GM_AWB] Jan 1 00:00:15 kernel: [ISP_INFO]: Found [GM_AF] Jan 1 00:00:16 kernel: [ISP_WARN]: [AWB_M2] $grey_cx_boundary$ is not found!! Jan 1 00:00:16 kernel: [VCAP_INFO]: Register ISP Input Device Jan 1 00:00:16 kernel: MCP100 GM8136, built @ Jan 9 2015 13:54:23 Jan 1 00:00:16 kernel: FAVC Encoder v0.1.115, built @ Jan 9 2015 13:54:46 (GM8136) Jan 1 00:00:16 kernel: H264 rate control(VG) version: 1.1.11, built @ Jan 9 2015 13:55:18 Jan 1 00:00:16 kernel: Decoder v1.0.2, built @ Jan 9 2015 13:54:20 Jan 1 00:00:16 kernel: GM8136 MJPEG, encoder v4.0.21, decoder v4.0.9, built @ Jan 9 2015 13:54:28 Jan 1 00:00:16 kernel: osg canvas is dynammic allocate mode Jan 1 00:00:16 kernel: SWOSG ver 0.0.1 Jan 1 00:00:17 kernel: SCALER version 141119, temp_width: 0, temp_height: 0 Jan 1 00:00:17 kernel: fscaler300_init_one [0] NCNB Jan 1 00:00:17 kernel: audio_init: audio driver is inserted, minor version: 0224_1619 Jan 1 00:00:17 kernel: Record(SSP:0): stream->dma_buffer = 15e8000(ffde8000), size:800, dma_ch: 1 Jan 1 00:00:17 kernel: Playback(SSP:0): stream->dma_buffer = 16c0000(ffde0000), size:800, dma_ch: 2 Jan 1 00:00:17 kernel: gs.ko v1.5 Jan 13 2015 17:59:25 Jan 1 00:00:17 kernel: GS driver, log: level(0) category(0) bmp width(64) Jan 1 00:00:17 kernel: loop_comm.ko v0.5 Jan 13 2015 18:00:08 Jan 1 00:00:17 kernel: vpd_slave.ko v1.6 Jan 13 2015 17:59:41 Jan 1 00:00:17 kernel: config_path="/gm/config/" Jan 1 00:00:17 kernel: loopcomm slave init: Bus(101) getcp_bus(103) query_bs_bus(105) pack_membus(107) Jan 1 00:00:17 kernel: Parsing CAP vg_info version: 0.3.7 Jan 1 00:00:17 kernel: vplib v2.0 Jan 13 2015 17:59:43 Jan 1 00:00:17 kernel: config_init v0.18 Jan 13 2015 17:59:51 /gm/config//gmlib.cfg Jan 1 00:00:17 kernel: ----------------------------------------------------------------------------------- Jan 1 00:00:17 kernel: # cat /gm/config/gmlib.cfg Jan 1 00:00:17 kernel: ; GM8136_1M(Tiny Memory) Product Configuration (Without LCD, MPEG4, Scaler Substream, Encode Switching) Jan 1 00:00:17 kernel: [VERSION] Jan 1 00:00:17 kernel: VERSION = 0.1 Jan 1 00:00:17 kernel: [GRAPH_TYPE] Jan 1 00:00:17 kernel: ; graph type: 1(DVR with display 3DI), 2(IPCAM) Jan 1 00:00:17 kernel: graph_type = 2 Jan 1 00:00:17 kernel: [DISPLAY_GROUP] Jan 1 00:00:17 kernel: [RAW_OUT] Jan 1 00:00:17 kernel: ; CONFIG1 = channels/total_fps/ddr_channel, ... Jan 1 00:00:17 kernel: [LDC_OUT] Jan 1 00:00:17 kernel: ; CONFIG1 = channels/total_fps/ddr_channel, ... Jan 1 00:00:17 kernel: [AUDIO] Jan 1 00:00:17 kernel: ; CONFIG1 = audio_keyword/channels/sample_rate/stereo/bits/ddr_vch Jan 1 00:00:17 kernel: CONFIG1 = au_grab/32/16K/mono/16/0, au_render/4/16K/mono/16/0 Jan 1 00:00:17 kernel: max_frame_samples = 2048 Jan 1 00:00:17 kernel: grab_buffer_time = 768 Jan 1 00:00:17 kernel: render_buffer_time = 768 Jan 1 00:00:17 kernel: [BUFFER_DISPLAY] Jan 1 00:00:17 kernel: ; Display count lcd_vch/count/ddr_channel, lcd_vch/count/ddr_channel, ... Jan 1 00:00:17 kernel: display_count = 0/3/0 Jan 1 00:00:17 kernel: ; Playback 3DI input buffer count per channel Jan 1 00:00:17 kernel: playback_3di_input_count = 0 Jan 1 00:00:17 kernel: ; Playback scaler input buffer count per channel Jan 1 00:00:17 kernel: playback_scaler_input_count = 0 Jan 1 00:00:17 kernel: [BUFFER_BITSTREAM] Jan 1 00:00:17 kernel: ; Playback bitstream data buffer: time/ddr_vch Jan 1 00:00:17 kernel: datain_buffer_time = 0/0 Jan 1 00:00:17 kernel: ; Record bitstream data buffer: time/ddr_vch Jan 1 00:00:17 kernel: dataout_buffer_time = 231/0 Jan 1 00:00:17 kernel: [BUFFER_CAPTURE] Jan 1 00:00:17 kernel: ; Encode capture buffer three slop: fps/count, fps/count, fps/count Jan 1 00:00:17 kernel: CONFIG2 = 720P/20/2, 720P/15/2, 720P/5/1 Jan 1 00:00:17 kernel: CONFIG3 = VGA/20/2, VGA/15/2, VGA/5/1 Jan 1 00:00:17 kernel: CONFIG4 = CIF/20/2, CIF/15/2, CIF/5/1 Jan 1 00:00:17 kernel: capture_max_fps = 30 Jan 1 00:00:17 kernel: [BUFFER_ENCODE_DIDN] Jan 1 00:00:17 kernel: ; Encode substream scaler out buffer time Jan 1 00:00:17 kernel: encode_didn_out_buffer_count = 2 Jan 1 00:00:17 kernel: [BUFFER_SUBSTREAM] Jan 1 00:00:17 kernel: ; Encode substream scaler out buffer time Jan 1 00:00:17 kernel: encode_scaler_out_buffer_count = 0 Jan 1 00:00:17 kernel: [BUFFER_RAW] Jan 1 00:00:17 kernel: raw_out_buffer_count = 0 Jan 1 00:00:17 kernel: [BUFFER_LDC] Jan 1 00:00:17 kernel: ldc_out_buffer_count = 0 Jan 1 00:00:17 kernel: [ENCODE_MOTION] Jan 1 00:00:17 kernel: ; Enable motion data under specified resolution by "motion_resolution = D1, CIF..." Jan 1 00:00:17 kernel: ; motion_resolution = CIF Jan 1 00:00:17 kernel: [SNAPSHOT] Jan 1 00:00:17 kernel: yuv_max_width = 1280 Jan 1 00:00:17 kernel: yuv_max_height = 720 Jan 1 00:00:17 kernel: ; max_bitstream_size = 65536 Jan 1 00:00:17 kernel: max_bitstream_size = 691200 Jan 1 00:00:17 kernel: [RESERVED_BUFFER] Jan 1 00:00:17 kernel: ----------------------------------------------------------------------------------- Jan 1 00:00:17 kernel: disp0_in DDR0 720x480, method(0) Jan 1 00:00:17 kernel: (675KB x 1 + 0KB x 0) x 3 Jan 1 00:00:17 kernel: ==> 2031KB (ddr0) Jan 1 00:00:17 kernel: enc_cap_out DDR0 1280x720 1CH fps(15) factor(100) Jan 1 00:00:17 kernel: total_fps(15) aver(1CH/15fps/2) Jan 1 00:00:17 kernel: enc_cap_out DDR0 640x480 1CH fps(15) factor(100) Jan 1 00:00:17 kernel: total_fps(15) aver(1CH/15fps/2) Jan 1 00:00:17 kernel: 1800KB x 2 Jan 1 00:00:17 kernel: 600KB x 2 Jan 1 00:00:17 kernel: ==> 4808KB (ddr0) Jan 1 00:00:17 kernel: enc_out DDR0 1280x720 1CH fps(15) time(66) aver_sz(15360) max_sz(138240) count(1) Jan 1 00:00:17 kernel: enc_out DDR0 640x480 1CH fps(15) time(66) aver_sz(5120) max_sz(46080) count(1) Jan 1 00:00:17 kernel: 411KB x 1 (win=135KB x2 aver=15KB x1) Jan 1 00:00:17 kernel: 141KB x 1 (win=45KB x2 aver=5KB x1) Jan 1 00:00:17 kernel: enc_didn_out DDR0 1280x720 1CH decuple(20) Jan 1 00:00:17 kernel: enc_didn_out DDR0 640x480 1CH decuple(20) Jan 1 00:00:17 kernel: 1800KB x 2 Jan 1 00:00:17 kernel: 600KB x 2 Jan 1 00:00:17 kernel: ==> 4808KB (ddr0) Jan 1 00:00:17 kernel: au_grab_out DDR0 32CH 16K tracks(1) bits(16) samples(2048) latency(768) count(6) Jan 1 00:00:17 kernel: 256KB x 6 Jan 1 00:00:17 kernel: ==> 1548KB (ddr0) Jan 1 00:00:17 kernel: au_render_in DDR0 4CH 16K tracks(1) bits(16) samples(2048) latency(768) count(6) Jan 1 00:00:17 kernel: 16KB x 6 Jan 1 00:00:17 kernel: ==> 204KB (ddr0) Jan 1 00:00:17 kernel: ----------------------------------------------------------------------------------- Jan 1 00:00:17 kernel: Reserved buffer ratio=0 Jan 1 00:00:17 kernel: DDR0 size=13951KB Jan 1 00:00:17 kernel: ----------------------------------------------------------------------------------- Jan 1 00:00:17 kernel: #### Capture Count #### Jan 1 00:00:17 kernel: RES/FPS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 40 45 50 55 60 Jan 1 00:00:17 kernel: 3840x2160 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 3264x2176 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 3072x2048 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 2592x1952 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 2304x1728 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 2048x1536 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 1920x1088 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jan 1 00:00:17 kernel: 1280x1024 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Jan 1 00:00:17 kernel: 1280x 960 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Jan 1 00:00:17 kernel: DDR0 pool free size 11920KB. Jan 1 00:00:17 kernel: enc_cap_out 4808 KB (DDR0) Jan 1 00:00:17 kernel: fill enc_cap_out pattern 0x10801080 Jan 1 00:00:17 kernel: DDR0 pool free size 7112KB. Jan 1 00:00:17 kernel: enc_bs_out 552 KB (DDR0) Jan 1 00:00:17 kernel: DDR0 pool free size 6560KB. Jan 1 00:00:17 kernel: enc_3di_out 4808 KB (DDR0) Jan 1 00:00:17 kernel: DDR0 pool free size 1752KB. Jan 1 00:00:17 kernel: au_grab_out 1548 KB (DDR0) Jan 1 00:00:17 kernel: DDR0 pool free size 204KB. Jan 1 00:00:17 kernel: au_render_in 204 KB (DDR0) Jan 1 00:00:17 kernel: DDR0 pool free size 0KB. Jan 1 00:00:17 kernel: datain v0.2 Jan 13 2015 17:59:50 Jan 1 00:00:17 kernel: dataout v0.6 Jan 13 2015 17:59:54 Jan 1 00:00:17 kernel: osd_mg_database_init......osd_type:0 Jan 1 00:00:17 kernel: osd_mg_database_init......osd_type:1 Jan 1 00:00:17 kernel: osd_mg_database_init......osd_type:2 Jan 1 00:00:17 kernel: usr_clearwin v0.21 Jan 13 2015 17:59:59 Jan 1 00:00:17 kernel: usr_clearwin init fd(0x60000000) idx(0) buffer(0x81d96400/0x1d96400) Jan 1 00:00:17 kernel: usr_clearwin init fd(0x60000000) idx(1) buffer(0x81e3f400/0x1e3f400) Jan 1 00:00:17 kernel: usr_clearwin init fd(0x60000000) idx(2) buffer(0x81ee8400/0x1ee8400) Jan 1 00:00:17 kernel: usr_decode v0.1 Jan 13 2015 18:00:01 Jan 1 00:00:17 kernel: usr_snapshot v0.18 Jan 13 2015 18:00:00 (1280x720, 675KB) Jan 1 00:00:17 kernel: usr_getraw v0.5 Jan 13 2015 18:00:01 Jan 1 00:00:17 kernel: usr_cap_source v0.2 Jan 13 2015 18:00:02 Jan 1 00:00:17 kernel: usr_osg v1.9 Jan 13 2015 18:00:03 Jan 1 00:00:17 kernel: usr_osg: (ch_table) 4 ,-1 , Jan 1 00:00:17 kernel: usr_process v0.1 Jan 13 2015 17:59:58 Jan 1 00:00:17 kernel: videograph ioctl v0.44 Jan 1 00:00:17 kernel: vpd_master.ko v1.2 Jan 13 2015 17:59:35 Jan 1 00:00:17 kernel: vpd_master: chipnr=0. Jan 1 00:00:17 kernel: loopcomm master init: pack_membus(8106) Jan 1 00:00:17 kernel: Frammap: 2142 pages in DDR0 are freed. Jan 1 00:00:17 kernel: Set EM debug level(0) (0:quiet 1:get/put 2:property 3:semaphore) Jan 1 00:00:17 kernel: Set GraphService debug level(0). (0 for error, 1 for flow, 2 for detail.) Jan 1 00:00:17 kernel: Set MemoryService debug level(0). Jan 1 00:00:17 kernel: Set datain debug level(0) Jan 1 00:00:17 kernel: Set dataout debug level(0) Jan 1 00:00:17 kernel: Slave 0:1 is ready(1). Jan 1 00:00:17 kernel: vpslv set vpslv_dbglevel=0 Jan 1 00:00:17 kernel: Set VPD debug level(0). Jan 1 00:00:17 kernel: Debug Level:0 Jan 1 00:00:17 kernel: ftpwmtmr010(0x91b00000) mapping address = 0x85480000 Jan 1 00:00:17 kernel: Register PWM character driver success! Jan 1 00:00:18 kernel: input: botton_r as /devices/virtual/input/input0 Jan 1 00:00:18 kernel: evbug: Connected device: input0 (botton_r at unknown) Jan 1 00:00:19 crond[418]: crond: crond (busybox 1.19.4) started, log level 8 Jan 1 00:00:19 miio_avstreamer: /mnt/data/miio_av/miio_avstreamer disabled with chuangmi-720p-hack Jan 1 00:00:19 kernel: RTL871X: module init start Jan 1 00:00:19 kernel: RTL871X: rtl8189fs v4.3.24.8_22657.20170607_trunmi Jan 1 00:00:19 kernel: RTL871X: build time: Aug 7 2017 14:16:12 Jan 1 00:00:19 kernel: RTL871X: HW EFUSE Jan 1 00:00:19 kernel: RTL871X: rtw_read_macaddr_from_file /data/wifimac.txt is not readable Jan 1 00:00:19 kernel: RTL871X: hal_com_config_channel_plan chplan:0x27 Jan 1 00:00:20 kernel: RTL871X: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1 Jan 1 00:00:20 kernel: RTL871X: ERROR invalid mac addr:00:00:00:00:00:00, assign random MAC Jan 1 00:00:20 kernel: RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=00:e0:4c:f1:40:84 Jan 1 00:00:20 kernel: RTL871X: module init ret=0 Jan 1 00:00:20 miio_client_helper: /mnt/data/ot_wifi_tool/miio_client_helper_nomqtt.sh disabled with chuangmi-720p-hack Jan 1 00:00:20 wifi: Enabling wifi STA mode Jan 1 00:00:20 miot_devicekit: /mnt/data/miot/miot_devicekit disabled with chuangmi-720p-hack Jan 1 00:00:20 miot_qrcode: /mnt/data/miot/miot_qrcode.sh disabled with chuangmi-720p-hack Jan 1 00:00:21 miio_ota: /mnt/data/miio_ota/miio_ota disabled with chuangmi-720p-hack Jan 1 00:00:21 miio_smb: /mnt/data/miio_smb/miio_smb disabled with chuangmi-720p-hack Jan 1 00:00:21 syslog: No processes defined in config file. Exiting. Jan 1 00:00:21 kernel: init script all done Jan 1 00:00:23 kernel: RTL871X: set bssid:00:00:00:00:00:00 Jan 1 00:00:27 wifi: udhcpc (v1.19.4) started Jan 1 00:00:27 wifi: Sending discover... Jan 1 00:00:30 wifi: Sending discover... Jan 1 00:00:33 wifi: Sending discover... Jan 1 00:00:56 wifi: Sending discover... Jan 1 00:00:59 wifi: Sending discover... Jan 1 00:01:02 wifi: Sending discover... Jan 1 00:01:13 syslog: Early exit: Invalid argument: ^M Jan 1 00:01:15 kernel: Set PWM0 as Interval ModeSet PWM Mode as 0x10D Jan 1 00:01:15 kernel: Set PWM1 as Interval ModeSet PWM Mode as 0x10D Jan 1 00:01:15 kernel: Set PWM0 as Interval ModeSet PWM Mode as 0x10D Jan 1 00:01:15 kernel: Set PWM1 as Interval ModeSet PWM Mode as 0x10D Jan 1 00:01:15 init: starting pid 583, tty '/dev/ttyS0': '-/bin/sh < /dev/ttyS0 2>&1 > /dev/ttyS0' Jan 1 00:01:25 wifi: Sending discover... Jan 1 00:01:28 wifi: Sending discover... Jan 1 00:01:31 wifi: Sending discover... Jan 1 00:01:54 wifi: Sending discover... Jan 1 00:01:57 wifi: Sending discover... Jan 1 00:02:00 wifi: Sending discover... Jan 1 00:02:23 wifi: Sending discover... Jan 1 00:02:26 wifi: Sending discover... Jan 1 00:02:29 wifi: Sending discover... Jan 1 00:02:52 wifi: Sending discover... Jan 1 00:02:55 wifi: Sending discover... Jan 1 00:02:58 wifi: Sending discover...

fliphess commented 5 years ago

Just to be sure: Are you connecting to a 2.4GHZ wifi network? (The hardware does not support newer 5G wifi )

fliphess commented 5 years ago

I had a close look at the logging and most of the log looks okay, I noticed some errors that I don't like, and that should be fixed, but no errors that could result in this behaviour.

I want to verify if it's a hardware or software issue: Can take out the SD card and connect the camera to the wifi using the miihome app?

If that's done and the camera is able to connect to the wifi without the hack, the credentials are stored in NV-ram as a result and the credentials in the configuration file are not needed anymore.

If you manage to connect to the wifi using the miihome app and you are able to ping the camera, you can then re-insert the SD cart and the camera should automagically join the earlier connected wifi network.

See if this works, as far as I can see the hack is fully active and functional, it's just the wifi connection that is bugging.....

Nuker1773 commented 5 years ago

Good News. Yes, 2,4 ghz only. I removed the SD Card, connect the cam with the miihome app to my wifi, reinserted the sdcard and now its really connected with my wifi and the hack is working... I will try some reboots if its really stable.

Nuker1773 commented 5 years ago

Some time and reboots later, its still working. Thank you really much for your help, fliphess. So far i have two more questions.

Justed checked the Wiki Page RTSP and see 15 fps is normal.

fliphess commented 5 years ago

Hey @Nuker1773 !

I'm almost sure the 25frames per second is not the actual framerate, as it is hard capped at 15 FPS in the gmlib.cfg.

We can give it a try to see if it's possible to change, but i expect it to be because of limits of the hardware. I'll have a look and see if it's possible to make this bigger.

About the auto IR on: It's currently not possible as ir_sample, the tool that takes care of switching the night mode (when enabled setting AUTO_NIGHT_MODE=1) is locking the pwm mechanism when running.

I'm working on a replacement tool that is able to do this, but it will take a couple of months to implement.

The automatic power on is at the moment impossible due to a chicken and egg situation: There is no power, and thus no activity to switch on the power. The only way to make it possible to switch the power on and off is using an external relay mechanism (for example a sonoff relay)

In the near future I'm planning to release a "sleep mode", that is able to switch off the rtspd and other services, but it will never be able to turn the camera back on after shutdown.

Nuker1773 commented 5 years ago

Hi, regarding IR, thats disappointing. My plan was to install some cams outside on my house. Is there any other way to send a command on a time schedule to activate IR or manually active IR. Would be enough if ir is activated on a specific time per day,..

fliphess commented 5 years ago

That shouldn't be that hard: Using my fork u can use MQTT or HTTP calls to enable IR, or use a cronjob to do it on a specific time. Using home automation software like homeassistant you can easily create external triggers to this off-camera

In the next 2 or 3 months I aim at building a first version of the auto-night-and-IR-mode feature that supports what you ask for :)