Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tam------ wifi_mcu_basic_example ------TCP/IP initialized.
LN882H SDK Ver: 1.8 [build time:Sep 9 2023 08:53:42][0x010800ff]
____ _ _ __
/ ___|___ _____ _| | (_)/ _| ___
| | / _ \_ / | | | | | | |_ / _ \
| |__| (_) / /| |_| | |___| | _| __/
\____\___/___|\__, |_____|_|_| \___|
|___/
cozylife_app_info
CozyLife SDK Version: 0.6.0
CozyLife SDK Build Sep 9 2023 08:53:37
cozylife_app_info
Product Id: iy9fT1
Firmware Version: 1.0.1
Firmware Build Sep 9 2023 08:53:44
device id:DELETED
1609473600 [L] [ lib_log] udplog_init on: 0, 192.168.2.2:7789
1609473600 [L] [ lib_wifi] wifi_start_connect
[WLIB_I]cap_comp = 0, xtal_capbank_tab:[0]:40 [1]:35 [2]:35 [3]:35 [4]:50 [5]:70 [6]:70 [7]:70
[WLIB_I][original]phy_tab_1f:0x4C, phy_tab_20:0x3C
[WLIB_I][efuse]phy_tab_1f:0x54, phy_tab_20:0x44
[WLIB_I][flash]phy_tab_1f:0x54, phy_tab_20:0x44, tx_pwr_comp_all=0, tx_pwr_comp_b=0, tx_pwr_comp_gn=0
[WLIB_I]==>temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
[WLIB_I]<==temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
[WLIB_I]LN882H WiFi Lib Ver(CozyLife-230526.1): 1.1.3 [build time:May 26 2023 18:45:35][0x010103ff]
[WLIB_I]STA_Startup.
[WLIB_I]Disconnected.
[WLIB_E]HwEr:UKI:0
psk value :
00000000: DELETED
00000010: DELETED
00000020: DELETED
1609473601 [L] [ lib_wifi] wifi connecting to ssid: DELETED passwd: DELETED
STA startup!
[WLIB_I]Disconnected.
[WLIB_I]Status: Scan Successful. Initaiting Join:
[WLIB_I]SSID = DELETED
[WLIB_I]BSSID = DELETED
[WLIB_I]Channel = 3
[WLIB_I]RSSI = -70
[WLIB_I]StationID = DELETED
[WLIB_I]Status: Initiating Authentication.
[WLIB_I]Status: Authentication Successful. Initiating Association.
[WLIB_I]Peer's HT-Capabilities:
[WLIB_I]ht_capable = 1
[WLIB_I]ldpc_cod_cap = 0
[WLIB_I]smps_mode = 3
[WLIB_I]greenfield = 0
[WLIB_I]short_gi_20 = 1
[WLIB_I]short_gi_40 = 1
[WLIB_I]rx_stbc = 0
[WLIB_I]max_rx_ampdu_factor = 3
[WLIB_I]min_mpdu_start_spacing = 6
[WLIB_I]htc_support = 0
[WLIB_I]sta_amsdu_maxsize = eff
[WLIB_I]chan_width = 1
[WLIB_I]dsss_cck_40mhz = 1
[WLIB_I]Status: Association Successful.
[WLIB_I]Connected.
STA connected to target AP!
1609473602 [L] [ lib_wifi] wifi_connect
[WLIB_I]xtal_temp_cal.curr_sect=3,last_sect=2
[WLIB_I]==>temp_sect:3,phy_tab_1f:0x54,phy_tab_20:0x44
[WLIB_I]<==temp_sect:3,phy_tab_1f:0x54,phy_tab_20:0x44
+--------------- net device info ------------+
|netif hostname: sta |
|netif ip = DELETED
|netif mask = 255.255.255.0 |
|netif gateway = DELETED
|netif mac : DELETED
+--------------------------------------------+
1609473609 [L] [ lib_wifi] wifi_get_iP
1609473609 [L] [ lib_mainw] ip: DELETED
[WLIB_I]xtal_temp_cal.curr_sect=2,last_sect=3
[WLIB_I]==>temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
[WLIB_I]<==temp_sect:2,phy_tab_1f:0x54,phy_tab_20:0x44
adc raw: 792, temp_IC: 33
Total:135436; Free:104080;
adc raw: 792, temp_IC: 33
Total:135436; Free:104168;
adc raw: 794, temp_IC: 34
Total:135436; Free:104080;
[14:09:36.925] - serial type is general
[14:09:36.965] - Open COM10 Success
[14:09:41.512] - ------ wifi_mcu_basic_example ------
[14:09:42.053] - TCP/IP initialized.
[14:09:42.058] - LN882H SDK Ver: 2.1_rc1 [build time:Nov 28 2023 09:34:26][0x02010001]
[14:09:42.059] - ____ _ _ __
[14:09:42.060] - / ___|___ _____ _| | (_)/ _| ___
[14:09:42.066] - | | / _ \_ / | | | | | | |_ / _ \
[14:09:42.068] - | |__| (_) / /| |_| | |___| | _| __/
[14:09:42.069] - \____\___/___|\__, |_____|_|_| \___|
[14:09:42.070] - |___/
[14:09:42.071] - cozylife_app_info
[14:09:42.072] - CozyLife SDK Version: 0.6.0
[14:09:42.073] - CozyLife SDK Build Nov 28 2023 09:34:21
[14:09:42.074] - cozylife_app_info
[14:09:42.074] - Product Id: iy9fT1
[14:09:42.075] - Firmware Version: 1.0.2
[14:09:42.080] - Firmware Build Nov 28 2023 09:34:28
[14:09:42.081] - device id:
[14:09:42.083] - [0;35m1609473600 [L] [ lib_log] udplog_init on: 0, 192.168.2.2:7789
[14:09:42.085] - [0m[0;35m1609473600 [L] [ lib_ble] ble mac: e8:73:f0:c2:50:00
[14:09:42.827] - [0m[BLIB_I]BLIB Ver: 1.0.5 [build time:Aug 7 2023 17:33:27][0x010005ff]
[14:09:42.829] - [0;35m1609473600 [L] [ lib_ble] bt_event_bleenabled
[14:09:42.834] - [0m[WLIB_I]cap_comp = 0, xtal_capbank_tab:[0]:40 [1]:35 [2]:35 [3]:35 [4]:50 [5]:70 [6]:70 [7]:70
[14:09:42.837] - [WLIB_I][original]phy_tab_1f:0x4C, phy_tab_20:0x3C
[14:09:42.839] - [WLIB_I][efuse]phy_tab_1f:0x50, phy_tab_20:0x40
[14:09:42.841] - [WLIB_I][flash]phy_tab_1f:0x50, phy_tab_20:0x40, tx_pwr_comp_all=0, tx_pwr_comp_b=0, tx_pwr_comp_gn=0
[14:09:42.844] - [WLIB_I]==>temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40
[14:09:42.846] - [WLIB_I]<==temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40
[14:09:42.851] - [WLIB_I]LN882H WiFi Lib Ver: 1.3.0 [build time:Oct 8 2023 11:17:49][0x010300ff][for Cozylife Commit-a353a99a]
[14:09:42.852] - [WLIB_I]STA_Startup.
[14:09:42.855] - [WLIB_I]Disconnected.
[14:09:42.856] - [WLIB_E]HwEr:UKI:0
[14:09:42.856] - STA startup!
[14:09:43.623] - CH= 6,RSSI= -45,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.626] - CH= 6,RSSI= -48,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.628] - CH= 1,RSSI= -65,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.630] - CH= 1,RSSI= -67,BSSID:[MACADDR],SSID:""
[14:09:43.632] - CH=11,RSSI= -73,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.636] - CH= 1,RSSI= -86,BSSID:[MACADDR],SSID:""
[14:09:43.637] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.640] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.642] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:""
[14:09:43.644] - CH= 1,RSSI= -91,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:43.644] - [WLIB_I]Disconnected.
[14:09:43.647] - AP01 rssi:-45 channel:6 ssid:fakewifi
[14:09:43.648] - AP02 rssi:-48 channel:6 ssid:fakewifi
[14:09:43.650] - AP03 rssi:-65 channel:1 ssid:fakewifi
[14:09:43.653] - AP04 rssi:-67 channel:1 ssid:
[14:09:43.655] - AP05 rssi:-73 channel:11 ssid:fakewifi
[14:09:43.656] - AP06 rssi:-86 channel:1 ssid:
[14:09:43.658] - AP07 rssi:-90 channel:1 ssid:fakewifi
[14:09:43.660] - AP08 rssi:-90 channel:1 ssid:fakewifi
[14:09:43.661] - AP09 rssi:-90 channel:1 ssid:
[14:09:43.662] - AP10 rssi:-91 channel:1 ssid:fakewifi
[14:09:43.832] - [WLIB_I]LN882H WiFi Lib Ver: 1.3.0 [build time:Oct 8 2023 11:17:49][0x010300ff][for Cozylife Commit-a353a99a]
[14:09:43.834] - [WLIB_I]STA_Startup.
[14:09:43.835] - [WLIB_I]Disconnected.
[14:09:43.836] - [WLIB_E]HwEr:UKI:0
[14:09:43.838] - STA startup!
[14:09:45.281] - CH= 6,RSSI= -45,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.284] - CH= 6,RSSI= -48,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.286] - CH= 1,RSSI= -65,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.287] - CH= 1,RSSI= -65,BSSID:[MACADDR],SSID:""
[14:09:45.290] - CH=11,RSSI= -74,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.292] - CH=11,RSSI= -88,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.293] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:""
[14:09:45.295] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.298] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.300] - CH= 1,RSSI= -90,BSSID:[MACADDR],SSID:""
[14:09:45.302] - CH= 1,RSSI= -91,BSSID:[MACADDR],SSID:"fakewifi"
[14:09:45.303] - [WLIB_I]Disconnected.
[14:09:45.305] - AP01 rssi:-45 channel:6 ssid:fakewifi
[14:09:45.307] - AP02 rssi:-48 channel:6 ssid:fakewifi
[14:09:45.308] - AP03 rssi:-65 channel:1 ssid:fakewifi
[14:09:45.311] - AP04 rssi:-65 channel:1 ssid:
[14:09:45.313] - AP05 rssi:-74 channel:11 ssid:fakewifi
[14:09:45.315] - AP06 rssi:-88 channel:11 ssid:fakewifi
[14:09:45.316] - AP07 rssi:-90 channel:1 ssid:
[14:09:45.319] - AP08 rssi:-90 channel:1 ssid:fakewifi
[14:09:45.320] - AP09 rssi:-90 channel:1 ssid:fakewifi
[14:09:45.322] - AP10 rssi:-90 channel:1 ssid:
[14:09:45.323] - AP11 rssi:-91 channel:1 ssid:fakewifi
[14:09:45.325] - [0;35m1609473603 [L] [ lib_wifi] wifi_start_config
[14:09:45.435] - [0m[WLIB_I]LN882H WiFi Lib Ver: 1.3.0 [build time:Oct 8 2023 11:17:49][0x010300ff][for Cozylife Commit-a353a99a]
[14:09:45.437] - [WLIB_I]SoftAP_Startup.
[14:09:45.437] - [WLIB_E]HwEr:UKI:0
[14:09:45.439] - [WLIB_I]Channel scanning not needed
[14:09:45.440] - [WLIB_I]User Preferred channel idx 0-0
[14:09:45.443] - [WLIB_I]Selecting 20MHz ch from One of ... 0
[14:09:45.444] - [WLIB_I]Selected Channel Tbl Idx 0-0
[14:09:45.447] - [WLIB_I]AP: Starting network in 0-0
[14:09:45.448] - [WLIB_I]Connected.
[14:09:45.450] - [WLIB_I]sta_conn_step_set: CONNECTED
[14:09:45.452] - [WLIB_I]Status: Start Successful. Entering Enable State.
[14:09:45.454] - SoftAP startup!
[14:09:45.455] - +--------------- net device info ------------+
[14:09:45.458] - |netif hostname: ln_softap |
[14:09:45.459] - |netif ip = 192.168.4.1 |
[14:09:45.462] - |netif mask = 255.255.255.0 |
[14:09:45.464] - |netif gateway = 192.168.4.1 |
[14:09:45.467] - |netif mac : [MACADDR] |
[14:09:45.468] - +--------------------------------------------+
[14:09:45.529] - [WLIB_I]Disconnected.
[14:09:45.531] - [WLIB_I]Channel scanning not needed
[14:09:45.533] - [WLIB_I]User Preferred channel idx 4-0
[14:09:45.535] - [WLIB_I]Selecting 20MHz ch from One of ... 0 1 2 3 4
[14:09:45.538] - [WLIB_I]Selected Channel Tbl Idx 4-0
[14:09:45.539] - [WLIB_I]AP: Starting network in 4-0
[14:09:45.540] - [WLIB_I]Connected.
[14:09:45.542] - [WLIB_I]sta_conn_step_set: CONNECTED
[14:09:45.544] - [WLIB_I]Status: Start Successful. Entering Enable State.
[14:09:45.546] - [0;35m1609473603 [L] [ lib_ble] ble_start_wifi_cfg
[14:09:55.054] - [0m[WLIB_I]xtal_temp_cal.curr_sect=3,last_sect=2
[14:09:55.056] - [WLIB_I]==>temp_sect:3,phy_tab_1f:0x50,phy_tab_20:0x40
[14:09:55.058] - [WLIB_I]<==temp_sect:3,phy_tab_1f:0x50,phy_tab_20:0x40
[14:09:56.054] - [WLIB_I]xtal_temp_cal.curr_sect=2,last_sect=3
[14:09:56.061] - [WLIB_I]==>temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40
[14:09:56.063] - [WLIB_I]<==temp_sect:2,phy_tab_1f:0x50,phy_tab_20:0x40silvestro_gatto wrote:I have some of this Cozylife 16A mini switch with LN-02 and I was able to save original firmare and upload OpenLN882H firmware LN882H_Test_ver_1.17.478.
I couldnt get any serial output with the original firmware. Could you please tell me which speed you set on the serial port to capture the boot log? Thanks!
silvestro_gatto wrote:Could you please explain how to modify the upper part of the Template info ( "vendor" , "bDetailed", "name", "model", "chip", "board",
"flags", "keywords")? I tried many times to Import the "Elivco Cozylife 16A Mini Switch (RMW002)" Template and apply it, but I can only update the pin settings.
silvestro_gatto wrote:I am also getting a "FAILED! Invalid command "lfs_format // clear LFS" error when I click on "Clear OBK and apply new script from above" button
TL;DR: If you have a CozyLife mini switch from AliExpress, 2 strong identifiers are the LN882H/LN882HKI marking and the UART banner; one expert reply says, "OpenLN882H official flasher" is the right tool when ltchiptool rejects the file. This FAQ helps owners identify the chip, back up stock firmware, and avoid common flashing mistakes on LN882H-based relays. [#21691770]
Why it matters: LN882H-based relays look similar to BK7231 devices, but the thread shows they need different tooling, templates, and recovery steps.
| Option | Works for LN882H thread cases | Main use | Limitation shown in thread |
|---|---|---|---|
| OpenLN882H official flasher | Yes | Flashing OpenLN882H_1.18.175 |
Must back up first |
| ltchiptool flasher | No, file reported unrecognized | General flashing attempt | Rejected LN882H firmware file |
ESPHome with bk72xx generic board |
No | Tried as alternative firmware | User reported it simply did not work |
| OpenBeken/OpenLN882H web template import | Partial | Apply pins/flags | Does not store template metadata on device |
Key insight: Treat LN882H as its own platform. The safest path in this thread is: identify the chip by marking or boot log, dump stock firmware first, then flash with the dedicated OpenLN882H tool and configure pins manually if template import is incomplete.
wifi_mcu_basic_example when the full app log did not appear. [#20974623]iy9fT1, with Firmware Version 1.0.1 built Sep 9 2023 and Firmware Version 1.0.2 built Nov 28 2023. [#20911009]LN882H SDK Ver during boot. If your relay came from AliExpress and shows CozyLife firmware plus that UART banner, treat it as an LN882H-family device before flashing. [#21691762]OpenLN882H_1.18.175 as "file is unrecognized" in ltchiptool, and the reply pointed to the dedicated BK7231GUIFlashTool release for LN882H. Back up the original firmware before writing anything new. [#21691770]------ wifi_mcu_basic_example ------, but a full log appeared only once while the 3.3 V lead was being connected. That makes power-up timing and boot state a real edge case on these relays. [#20839581]LN882H_Test because the build used the default software-version string instead of a forwarded custom version. The maintainer said USER_SW_VER needs to be defined in the Makefile, otherwise a default value is used. Later replies added that the CMake-to-#define wiring was still unfinished. [#20999123]MQTT_OUTPUT_RINGBUF_SIZE, MQTT_VAR_HEADER_BUFFER_LEN, and MQTT_REQ_MAX_IN_FLIGHT, but the author had not yet tested it personally. [#20953098]SoftAP_Startup, wifi_start_config, and a network interface at 192.168.4.1 with mask 255.255.255.0. In this thread, SoftAP appears during provisioning when the device cannot complete normal station setup. [#20911009]bk72xx and generic-bk7231n-qfn32-tuya, and reported it simply did not work on the LN882H switch. The maintainer then stated that ESPHome does not support many such devices and pointed users to OpenBK/OpenLN tooling instead. [#21350030]139.162.135.94:8899 is used for cloud control, while TCP port 5555 is a local listener with an unknown protocol. One researcher saw no prompt, banner, or useful reply on either endpoint. He suggested inspecting it with mitmproxy in Generic TCP mode or with a Wireshark capture, because HTTP tooling alone is insufficient here. [#21315355]lfs_format path fails on LN882H, so the workaround is manual module configuration instead of one-click clearing and script import. Use the template as a pin reference, then set the pins manually in the web interface. [#20974623]