EliasKotlyar / Xiaomi-Dafang-Hacks

4.2k stars 1k forks source link

Dafang PTZ: Bootloader (maybe) installed, CFW (maybe) installed, blue solid LED, no dns, no ssh, no rtsp #743

Closed Moskvitch closed 6 years ago

Moskvitch commented 6 years ago

Hi all -

In the end got some results by formatting a 512MB partition on a 16GB card. Did get a long solid blue LED after the bootloader update phase, which then turned into flashing blue/yellow. Like the title says, after editing the supplicant.conf I get a solid blue LED and a new device on my network. Upon removing the card I can see short videos recorded onto the card in the "record" folder, with audio, but... https://' ing into it does not work. ssh'ing into it from the terminal does not work. If it is helpful, after removing the card I was able to do the standard setup procedure and re-add to Mi Home and it (again) gave me the following fw upgrade available notification: Current version: 5.5.1.243 Latest version: 5.5.1.391 Any thoughts, please? This is a brand new Dafang PTZ.

PS FWIW, I seem to remember someone having the issue of camera tilting all the way up and whirring getting stuck panning in one direction - had this to when I tried powering from USB, which is only 500ma afaik, the issue went away when connecting to the camera's included 2A USB adaptor.

jmtatsch commented 6 years ago

is there a startup.log? Seems like you never ran the custom fw

Moskvitch commented 6 years ago

================================================== Starting the Dafang Hacks Custom Application Layer

Loaded common functions Created etc directory on sdcard Bind mounted /system/sdcard/bin/busybox to /bin/busybox Bind mounted /system/sdcard/root to /root Bind mounted /system/sdcard/etc to /etc Created cron directories and standard interval jobs wpa_supplicant: wpa_supplicant v2.5 random: Trying to read entropy from /dev/random Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/system/sdcard/config/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/system/sdcard/config/wpa_supplicant.conf' -> '/system/sdcard/config/wpa_supplicant.conf' Reading configuration file '/system/sdcard/config/wpa_supplicant.conf' ctrl_interface='/var/run/wpa_supplicant' ctrl_interface_group='0' ap_scan=1 Priority group 2 id=0 ssid='Home' nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory) rfkill: Cannot open RFKILL control device nl80211: RFKILL status not available nl80211: Supported cipher 00-0f-ac:1 nl80211: Supported cipher 00-0f-ac:5 nl80211: Supported cipher 00-0f-ac:2 nl80211: Supported cipher 00-0f-ac:4 nl80211: Using driver-based off-channel TX nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected nl80211: interface wlan0 in phy phy0 nl80211: Set mode ifindex 2 iftype 2 (STATION) nl80211: Subscribe to mgmt frames with non-AP handle 0x526248 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x526248 match=06 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x526248 match=0a07 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x526248 match=0a11 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x526248 match=1101 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x526248 match=1102 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x526248 match=0505 netlink: Operstate: ifindex=2 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT) nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory) nl80211: driver param='(null)' Add interface wlan0 to a new radio phy0 nl80211: Regulatory information - country=00 nl80211: 2402-2472 @ 40 MHz 20 mBm nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR) nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR) nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR) nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR) nl80211: 57240-63720 @ 2160 MHz 0 mBm nl80211: Added 802.11b mode based on 802.11g information wlan0: Own MAC address: 78:11:dc:71:02:ec wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 wlan0: RSN: flushing PMKID list in the driver nl80211: Flush PMKIDs wlan0: Setting scan request: 0.100000 sec ENGINE: Loading dynamic engine ENGINE: Loading dynamic engine EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: Supplicant port status: Unauthorized nl80211: Skip set_supp_port(unauthorized) while not associated EAPOL: KEY_RX entering state NO_KEY_RECEIVE EAPOL: SUPP_BE entering state INITIALIZE EAP: EAP entering state DISABLED ctrl_interface_group=0 wlan0: Added interface wlan0 wlan0: State: DISCONNECTED -> DISCONNECTED nl80211: Set wlan0 operstate 0->0 (DORMANT) netlink: Operstate: ifindex=2 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT) Daemonize.. udhcpc: deleting routers adding dns 192.168.1.1 Initialized gpios Determined image sensor model as jxf22 dropbear: bftpd: Created new certificate for webserver lighttpd: Startup finished!

jmtatsch commented 6 years ago

Looks like your wifi config may be bad. Or the camera is too far from the router. EAPOL: Supplicant port status: Unauthorized nl80211: Skip set_supp_port(unauthorized) while not associated EAPOL: KEY_RX entering state NO_KEY_RECEIVE

Moskvitch commented 6 years ago

Thanks for replying! The camera is 6 feet from the nearest 2.4GHz wifi AP with a bunch of 2.4GHz-only gizmos connected to it. Double-checked ssid/pwd. Any other settings i should mess with in the wpa_supplicant.conf file? i only added the ssid and the psk. Thanks

Moskvitch commented 6 years ago

Just did everything from scratch. Same card, same demo.bin, same set of files with the same wpa_supplicant.conf - connected immediately! It even got assigned the same ip address by dhcp as yesterday... but now I can connect to the web interface. If only I could now set a static ip address... but that's another issue :) Now on to homebridge config... Thanks again!