Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamBK7231N keeps dropping wifi connection
• In 90 % of the cases a BK7231N that “drops Wi-Fi” is fighting either (a) an unstable 3.3 V rail during the 250-350 mA TX bursts, (b) an RF mismatch/weak 2.4 GHz signal, or (c) firmware / router settings that it simply cannot handle (WPA3, CCMP-256, channels 12–13, aggressive power-save).
• Stabilise the supply, keep RSSI > -70 dBm, run recent firmware (e.g. OpenBeken ≥ v1.17.123 or the latest Tuya image), and lock the AP to WPA2-PSK + AES on channel 1/6/11; the disconnections normally disappear.
Electrical domain
• BK7231N absolute ratings: 3.0 – 3.6 V, TX-peak ≈ 300 mA, ripple < 50 mV.
• Brown-outs of only 100 mV for 2-3 µs are enough to reset the RF block → silent disconnect.
• Symptoms: log shows “STA DISCONNECTED, reason = 8 / 200”, or device reboots.
• Remedies
– Low-ESR 10 µF (ceramic/X5R) + 100 nF within 5 mm of VCC pins.
– DC-DC or LDO rated ≥ 600 mA; avoid USB ports that sag under load.
RF / antenna domain
• Internal PCB or chip antenna must have full keep-out and 50 Ω feed; short “ground-fence” vias mandatory.
• RSSI guideline:
− -50 dBm excellent (room with AP)
− -70 dBm limit for reliable MQTT / HTTP polling
− -80 dBm frequent drops.
• Interference → microwave ovens, BLE, USB 3.0 cables: check with a Wi-Fi analyser.
• Try fixed channels 1, 6 or 11; avoid 40 MHz HT-40 if many APs nearby.
Firmware / software domain
• Beken SDK 1.0.11-36 (mid-2023) contained a power-save bug causing silent AP time-outs; fixed in 1.0.12-42 (Jan 2024). Make sure your image was built with the new SDK (OpenBeken v1.17.1xx or newer, Tuya OTA 1.2.5 or later).
• Disable STA_PWS
/ set wifi_pm
to NONE
while debugging (OpenBeken CLI).
• Reconnection logic: set AutoReconnect
=1, RetryInterval
≥ 2000 ms; ultra-fast retries can brick some routers.
• Heap exhaustion: keep LWIP_TCPIP_THREAD_STACKSIZE
≥ 2 kB, otherwise the LWIP watchdog resets Wi-Fi.
Router / network domain
• Security: stick to WPA2-PSK, AES only. BK7231N does not support WPA3-SAE, GCMP-256 or TKIP fallback reliably.
• Channels 12–13 work only if the module was flashed with ETSI reg-domain; most Chinese modules ship as FCC – stay ≤ 11.
• Disable band-steering / “smart connect”; the client cannot follow 5 → 2.4 GHz kicks.
• DHCP: lease ≥ 1 h; or give the device a reservation or static IP to avoid 802.11 re-auth every lease renewal.
Special cases seen in the field (2024 community reports)
• Mesh systems (TP-Link Deco, Asus AiMesh) sometimes de-auth IoT clients to move them between nodes; if the fast-transition IE is missing, the BK7231N fails. Pin the MAC to one node or create a 2.4 GHz-only SSID.
• Password with “%” or non-ASCII characters is parsed wrongly in boot ROM ≤ v2.0 → connection loop. Use plain ASCII 8-32 chars.
• OpenBeken and LibreTuya builds released after Feb-2024 integrate the new Beken “dual-core” Wi-Fi stack; early feedback shows 30-40 % fewer disconnections.
• Vendors are phasing in the BK7231N-32U-QFN (4 MiB flash) — check pin 33 (RF test-pad) because some modules swapped it, degrading antenna match.
• WPA3 transition on home routers is the largest practical obstacle for 2.4 GHz IoT SOCs lacking hardware CCMP-256; expect firmware forks to add software support late 2024.
Power analogy: think of the RF power-amp as a camera flash; while it “fires,” the capacitor bank is the battery. If the capacitor is too small or far away, the flash dims (packet lost) or the device reboots.
RF analogy: a trace antenna locked inside a metal wall box is like shouting from inside a closed filing cabinet—you need either an external whip or to drill openings around the antenna zone.
• Always respect local RF regulations—channels 12/13 are illegal in parts of North America.
• When modifying firmware, comply with GPL/LGPL licences used by OpenBeken / LWIP.
• Make sure OTA updates and debug logs do not leak personally-identifiable Wi-Fi credentials (GDPR / CCPA).
pm none
). wifi_status
or router UI).• Some Tuya OEM boards use the pin-compatible BK7231T (512 kB RAM). The advice above applies, but those parts need slightly higher boot-power (≈ 350 mA).
• If the module is inside a metal wall switch back-box, physics limits the link budget; no software can fix that—an external antenna or sub-GHz technology may be required.
• Track the public Beken GitHub mirror for SDK ≥ 1.1.x which promises WPA3-SAE.
• Evaluate Matter-over-Wi-Fi builds (OpenBeken branch matter_beta
) that keep the radio awake longer but negotiate low-latency multicast.
• Explore PCB-embedded IFA vs. meander antenna efficiency; a simple 25 mm wire outperforms many tiny chip antennas.
• Investigate switching to ESP32-C3 or BL618 if you anticipate mandatory WPA3 home routers after 2026.
BK7231N dropouts nearly always trace back to:
Stabilise the 3.3 V rail, give the module a clean WPA2-PSK channel 1/6/11 link with RSSI better than ‑70 dBm, and flash current firmware with power-save tuned. Follow the check-list above; most users regain rock-solid connectivity without daily reboots or watchdog scripts.