logo elektroda
logo elektroda
X
logo elektroda

LN882H datasheet, pinout, WiFi modules (LN882HK, LN882HKx, LN882), Esphome/Tasmota style firmware

p.kaczmarek2 15585 5

TL;DR

  • LN882H is a single-chip wireless SoC with a Cortex M4F CPU, 802.11b/g/n Wi‑Fi, Bluetooth 5.1 LE, and 20 GPIOs in QFN32 or 12 GPIOs in QFN24.
  • It exposes SPI, I2S, I2C, SDIO, UART, PWM timers, multi-channel ADC, external QSPI XIP, RTC, WDT, DMA, and WS2811/WS2812 RGB LED support.
  • The chip offers 296KB RAM, 128KB ROM, and 512KB~4MB Flash, with package variants including LN882HKI, LN882HKG, LN882HFG, and LN882HC0.
  • A Tuya WL2H-U module pinout maps GPIOA/B signals to UART, ADC, reset, and a burn-mode test point for flashing.
  • OpenBK7231T_App provides Esphome/Tasmota-style firmware support, but LN882H support is still WIP and the flashing guide is deferred.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • Diagram of the QFN32 LN882HKx package showing pin configuration.
    LN882H is a Single-Chip Wireless SOC with Cortex M4F CPU supporting 802.11b/g/n (2.4 GHz Wi-Fi) and Bluetooth 5.1 (LE). LN882H offers 296KB RAM / 128KB ROM, 512KB~4MB Flash for XIP application code and SWD debug interface.
    LN882H peripherals include 20 GPIOs (QFN32) or 12 GPIOs (QFN24), SPI/I2S/I2C/SDIO/UART interfaces, Timer/Advance Timer (PWM), Multi-channel ADC with programmed amplifier for voice sense, XIP from external QSPI FLASH with high-speed cache, RTC, WDT, DMA controller and RGB LED protocol support (Compatible with the WS2811/WS2812).

    LN882H block diagram and pinout
    Here is LN882H diagram:
    Block diagram of the LN882H SoC.
    QFN32 pinout:
    Pin layout diagram of the LN882HKx QFN32 chip
    QFN24 pinout:
    QFN24 pin layout for LN882HFx chip
    QFN40 pinout:
    Pin layout of LN882HCx chip in QFN40 package.
    GPIO table:
    GPIO pin description table for LN882H in QFN40, QFN32, and QFN24 formats.
    LN882H has 12 or 20 GPIOs:
    - Two group IOs GPIOA and GPIOB, which are separately configurable
    - Configurable hardware and software control for each signal
    - Configurable interrupt mode for Port A, debounce logic is used to generate single hi-active interrupts
    SWD interface:
    SWD Pin Assignment Table for LN882H
    ADC:
    ADC pin assignment table for LN882H
    Boot mode select:
    Boot mode table for LN882H showing pin assignments and mode definitions.
    Case codes:
    Part Number Package Flash Size Temperature
    LN882HKI QFN-32, 5mm pitch 2MB Flash -40℃~105℃
    LN882HKG QFN-32, 5mm pitch 1MB Flash -40℃~105℃
    LN882HFG QFN-24, 4mm pitch 1MB Flash -40℃~105℃
    LN882HC0 QFN-40, 5mm pitch External Flash -40℃~105℃



    LN882H IoT modules
    LN882H often comes in form of modules, for example, a WL2H-U module by Tuya:
    Top view of the WL2H-U IoT module with dimension and pin markings.
    Bottom view of the LN882H module pin layout.
    Pinout:
    Pin No.SymbolI/O TypeDescription
    1GPIOA5I/OCommon GPIO pin, which can be reused as SPI_SCK and corresponds to pin 13 of the IC.
    2GPIOA6I/OCommon GPIO pin, which can be reused as SPI_MOSI and corresponds to pin 14 of the IC.
    3GPIOA4I/OCommon GPIO pin, corresponding to pin 12 of the IC.
    4GPIOA1I/OCommon GPIO pin, corresponding to pin 9 of the IC.
    5ADCI/OADC pin, corresponding to the GPIOA0 pin (pin 8) of the IC.
    6RX1I/OUART_RX1 pin, corresponding to the GPIOB8 pin (pin 29) of the IC.
    7TX1I/OUART_TX1 pin for log printing, corresponding to the GPIOB9 pin (pin 30) of the IC.
    8GPIOA7I/OPWM pin, corresponding to pin 15 of the IC.
    9GPIOA10I/OPWM pin, corresponding to pin 21 of the IC.
    10GPIOA11I/OPWM pin, corresponding to pin 22 of the IC.
    11GPIOA12I/OPWM pin, corresponding to pin 23 of the IC.
    12GPIOB3I/OPWM pin, corresponding to pin 24 of the IC.
    13GNDPThe ground wire.
    143V3P3.3V power supply.
    15TX0I/OUART_TX0 pin for sending user data, corresponding to the GPIOA2 pin (pin 10) of the IC.
    16RX0I/OUART_RX0 pin for receiving user data, corresponding to the GPIOA3 pin (pin 11) of the IC.
    17GPIOB4I/OCommon GPIO pin, which can be reused as ADC2 and corresponds to pin 24 of the IC.
    18RSTI/OReset pin, which is active at a low level, internally pulled up, and compatible with other module designs.
    19GPIOB5I/OCommon GPIO pin, corresponding to pin 26 of the IC.
    20GPIOB6I/OCommon GPIO pin, which can be reused as SPI_MISO and corresponds to pin 27 of the IC.
    21GPIOB7I/OCommon GPIO pin, which can be reused as SPI_CS and corresponds to pin 28 of the IC.
    Top side test point (burning pin)GPIOA9I/OMode selection pin, which is pulled down before power-on to enter the burning mode and corresponds to pin 17 of the IC.



    Sample IoT devices with LN882H
    See following topics:
    Flashing OpenBeken Firmware on WL2S Module with Lightning LN882HK Chip for ELIVCO LSPA9
    Identify Mini smart switch WiFi Relay Module with ln882hki Chip
    Heruled Tuya WiFi Smart LED Controller - Lightning Semiconductor LN8825B chip
    More LN882 device teardowns should appear on our forum soon.

    LN882H alternate firmware
    There is one esphome/tasmota-style firmware that supports LN882H, the support at the time of the writing is WIP, but should be fully functional soon, see:
    https://github.com/openshwprojects/OpenBK7231T_App
    Screenshot of the OpenLN882H user interface.
    Also see our devices list:
    https://openbekeniot.github.io/webapp/devicesList.html
    And see OpenBeken tutorials on Elektroda Youtube:
    https://www.youtube.com/@elektrodacom

    LN882H firmware read/write procedure
    The LN882H flashing tutorial will be posted as separate topic. Please watch for updates in the posts down below. For unofficial flasher info, please see this post:
    https://www.elektroda.com/rtvforum/topic4008545-60.html#20897719

    Futher reading
    Here are some more detailed LN882H resources.
    Datasheet:
    LN882H_Dat..eet.pdf (2.89 MB)You must be logged in to download this attachment.
    Chinese detailed documentation:
    ln882h-doc...104-p2.zip (57.5 MB)You must be logged in to download this attachment.
    ln882h-doc...104_p1.zip (55.72 MB)You must be logged in to download this attachment.
    SDK:
    ln882h-202..104.zip (33.34 MB)You must be logged in to download this attachment.
    Miscellaneous:
    ln882x-mcu...240104.zip (16.41 MB)You must be logged in to download this attachment.
    ln882h-nim...240104.zip (27.3 MB)You must be logged in to download this attachment.
    jdt-ln882h...otocol.zip (25.72 MB)You must be logged in to download this attachment.
    ln882x-off...240104.zip (42.61 MB)You must be logged in to download this attachment.

    Detailed flashing guide for open source firmware and pairing with HA guide will be posted separately! Please watch the posts below for updates!
    This topic is information-only, it's locked for users, please open separate topic if you have a question.
    Attachments:
    • gwin-project-20240104.zip (14.99 MB) You must be logged in to download this attachment.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14584 posts with rating 12607, helped 654 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20902484
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    I am adding more information now:
    LN8820_datasheet_1v9.pdf:
    LN8820_dat...et_1v9.pdf (1.44 MB)You must be logged in to download this attachment.
    LN8825X_datasheet_1v9.pdf:
    LN8825X_da...et_1v9.pdf (1.43 MB)You must be logged in to download this attachment.
    LN8826_datasheet_1v8.pdf:
    LN8826_dat...et_1v8.pdf (1.42 MB)You must be logged in to download this attachment.
    SDK_LN8825_V0.9.1.7z:
    SDK_LN8825...9.1.7z (38.79 MB)You must be logged in to download this attachment.
    SDK_LN8825_V0.11.1.7z:
    SDK_LN8825...V0.11.1.7z (40.59 MB)You must be logged in to download this attachment.
    SDK-LN8825-v0.7.1.7z
    SDK-LN8825...7.1.7z (34.74 MB)You must be logged in to download this attachment.

    I also have ty_iot_wf_rtos_sdk_ln882x_1.1.11.tar.gz, if anyone is interested.

    Some extras below:
    Attachments:
    • SDK_V1.3.1_rel.7z (37.81 MB) You must be logged in to download this attachment.
    • ART2000-SRC-LN8825_26-2020.04.07.7z (15.58 MB) You must be logged in to download this attachment.
    • LN8829L_产品规格书 v1.14.pdf (1.31 MB) You must be logged in to download this attachment.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20905535
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #4 20963801
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    Here is Tuya SDK ln882h_0.0.3.zip .
    To use, add gcc-arm-none-eabi-10-2020-q4-major.tar to toolchain dir (it's not in the package because it's 770MB):
    ln882h_0..3.zip (55.62 MB)You must be logged in to download this attachment.
    Same, but older version, ln882h_0.0.2.zip:
    ln882h_0..2.zip (55.62 MB)You must be logged in to download this attachment.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20980251
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    colink-1.0.1.7z SDK:
    colink-1...1.7z (60.95 MB)You must be logged in to download this attachment.
    ty_iot_wf_rtos_sdk_ln882x_1.1.11.tar.gz
    ty_iot_wf_....11.tar.gz (170.18 MB)You must be logged in to download this attachment.
    Helpful post? Buy me a coffee.
  • #6 21446063
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    Flashing guide as video:


    Helpful post? Buy me a coffee.
📢 Listen (AI):

FAQ

TL;DR: LN882H gives 296 KB RAM, and "supports 802.11b/g/n" for developers who need one fast reference for the datasheet, pinout, WL2H-U mapping, SDK posts, and open-source flashing resources. This FAQ solves the common problem of scattered LN882H, LN882HK, and WL2H-U information across multiple forum updates. [#20901530]

Why it matters: If you are reverse-engineering Tuya-style Wi-Fi modules or porting alternative firmware, this thread collects the core hardware facts and the follow-up flashing guide in one place.

Variant Package Flash Typical GPIO count
LN882HKI QFN-32, 5 mm pitch 2 MB 20
LN882HKG QFN-32, 5 mm pitch 1 MB 20
LN882HFG QFN-24, 4 mm pitch 1 MB 12
LN882HC0 QFN-40, 5 mm pitch External flash Not stated

Key insight: The thread does more than list pinouts. It links the LN882H hardware, WL2H-U module mapping, SDK archives, and a later released flashing guide, so you can move from identification to firmware work without hunting across separate sources.

Quick Facts

  • LN882H combines a Cortex-M4F CPU with 2.4 GHz Wi-Fi, Bluetooth 5.1 LE, 296 KB RAM, 128 KB ROM, and 512 KB to 4 MB flash support for XIP-based designs. [#20901530]
  • The posted variants span QFN-24, QFN-32, and QFN-40 packages, with operating temperature listed as -40b0C to 105b0C across all four case codes. [#20901530]
  • Tuya's WL2H-U module exposes 21 edge pins plus a top-side burning test point, including 3V3, GND, UART0, UART1, ADC, reset, PWM-capable GPIOs, and SPI-capable GPIOs. [#20901530]
  • The thread later adds LN8820, LN8825X, and LN8826 datasheets, plus SDK archives including SDK_LN8825_V0.7.1, V0.9.1, V0.11.1, and ty_iot_wf_rtos_sdk_ln882x_1.1.11. [#20902484]
  • A Tuya ln882h SDK package was shared in versions 0.0.2 and 0.0.3, and it needs the gcc-arm-none-eabi-10-2020-q4-major toolchain copied into the toolchain directory because that 770 MB archive was not bundled. [#20963801]

1. What is the LN882H SoC, and what WiFi, Bluetooth, CPU, RAM, ROM, and flash features does it offer?

LN882H is a single-chip wireless SoC with a Cortex-M4F CPU, 2.4 GHz 802.11b/g/n Wi-Fi, and Bluetooth 5.1 LE. It provides 296 KB RAM, 128 KB ROM, and support for 512 KB to 4 MB flash for XIP application code. The thread also lists 20 GPIOs on QFN32 and 12 GPIOs on QFN24, plus UART, SPI, I2C, SDIO, ADC, PWM, DMA, RTC, and WS2812-compatible RGB LED support. [#20901530]

2. How do I find the LN882H datasheet, pinout, block diagram, and GPIO table for the QFN24, QFN32, and QFN40 packages?

Use the main information post, which groups the LN882H block diagram, QFN32 pinout, QFN24 pinout, QFN40 pinout, GPIO table, ADC material, SWD interface, boot-mode select image, and attached datasheet files in one place. That same post also includes package case codes and module-level material for the Tuya WL2H-U. You do not need separate threads for the basic pinout reference. [#20901530]

3. Which pins on the Tuya WL2H-U module map to LN882H GPIOs, UART, ADC, reset, and the burning-mode test point?

WL2H-U maps its pins directly to LN882H signals. Examples include pin 5 as ADC on GPIOA0, pins 15 and 16 as UART0 TX and RX on GPIOA2 and GPIOA3, pins 6 and 7 as UART1 RX and TX on GPIOB8 and GPIOB9, pin 18 as active-low reset, and the top-side burning test point as GPIOA9. Power uses pin 14 for 3.3 V and pin 13 for GND. [#20901530]

4. How do I put an LN882H or WL2H-U module into burning mode for flashing firmware?

Pull the mode-select pin low before power-up. For WL2H-U, that pin is the top-side burning test point mapped to GPIOA9.
  1. Connect 3.3 V and GND.
  2. Pull GPIOA9 low before power-on.
  3. Power the module and start the flashing tool.
If you miss the timing and pull GPIOA9 low after power-up, the module will not enter burning mode because the thread states the pin must be pulled down before power-on. [#20901530]

5. Where can I find the LN882H open-source flashing guide with backup procedure included?

You can find it in the January 12, 2024 follow-up post that announces: "Flashing guide released!" That post links the dedicated guide titled "How to flash LN882H with open source Tasmota/Esphome style firmware - backup procedure included." It is the thread's direct pointer to the separate flashing tutorial rather than a summary inside the information-only post. [#20905535]

6. What is XIP on the LN882H, and how does execute-in-place from external QSPI flash work?

XIP lets LN882H run application code directly from external QSPI flash instead of first copying it into RAM. "XIP" is a memory-execution mode that runs application code directly from external QSPI flash, using the LN882H high-speed cache to reduce RAM use and keep code storage external. The thread explicitly describes "XIP from external QSPI FLASH with high-speed cache" as a platform feature. [#20901530]

7. What is the SWD interface on LN882H, and how is it used for debugging or firmware work?

SWD is the LN882H debug interface for low-level firmware work. "SWD" is a serial debug interface that gives a Cortex-M microcontroller a direct programming and debugging path, using fewer pins than older JTAG-style setups while still supporting development workflows. The thread includes a dedicated SWD interface diagram, which signals that SWD is part of the documented hardware path for debugging and development access. [#20901530]

8. Which Esphome/Tasmota-style firmware currently supports LN882H, and what is the status of OpenBeken support?

OpenBeken is the Esphome/Tasmota-style firmware named in the thread for LN882H. The post says support was work in progress at the time, but it "should be fully functional soon," and it links the OpenBK7231T_App repository plus the OpenBeken device list. That makes OpenBeken the thread's cited open-source option for LN882H-family experimentation. [#20901530]

9. How does LN882H compare with related chips like LN8820, LN8825X, and LN8826 when choosing documentation or SDKs?

Choose the documentation that matches the exact chip family named on your board. The thread starts with LN882H material, then separately adds LN8820_datasheet_1v9.pdf, LN8825X_datasheet_1v9.pdf, LN8826_datasheet_1v8.pdf, and multiple LN8825 SDK archives. That means the forum treats these as related but distinct parts, so mixing datasheets or SDKs without checking the chip marking can cause avoidable mistakes. [#20902484]

10. What are the differences between LN882HKI, LN882HKG, LN882HFG, and LN882HC0 in package type, flash size, and GPIO count?

LN882HKI is QFN-32 with 2 MB flash, LN882HKG is QFN-32 with 1 MB flash, LN882HFG is QFN-24 with 1 MB flash, and LN882HC0 is QFN-40 with external flash. The thread states LN882H offers 20 GPIOs in QFN32 or 12 GPIOs in QFN24. It does not state a GPIO total for the QFN40 variant in the case-code table, so avoid assuming that number from the other packages. [#20901530]

11. Where are the available LN882H, LN8825, and Tuya SDK packages in this thread, and which versions were shared?

The SDK packages are spread across later follow-up posts. One post adds SDK_LN8825_V0.7.1.7z, SDK_LN8825_V0.9.1.7z, and SDK_LN8825_V0.11.1.7z, plus ty_iot_wf_rtos_sdk_ln882x_1.1.11.tar.gz. A later post shares Tuya ln882h_0.0.2.zip and ln882h_0.0.3.zip, and another adds colink-1.0.1.7z plus the same ty_iot_wf_rtos_sdk_ln882x_1.1.11 package. [#20980251]

12. Why does the Tuya ln882h SDK require the gcc-arm-none-eabi-10-2020-q4-major toolchain, and where should it be placed?

The shared Tuya ln882h SDK expects that exact ARM GCC toolchain because it was not included in the package. The post says to add gcc-arm-none-eabi-10-2020-q4-major.tar to the toolchain directory, and explains the omission: the archive is 770 MB. If you place it elsewhere, the SDK setup will not match the thread's stated layout. [#20963801]

13. Which LN882H peripherals are useful for smart-home firmware, such as PWM, ADC, UART, SPI, I2C, SDIO, DMA, RTC, and WS2812 support?

LN882H exposes most of the peripherals smart-home firmware needs. The thread lists SPI, I2S, I2C, SDIO, UART, timer and advanced-timer PWM, multi-channel ADC with programmed amplifier for voice sense, DMA, RTC, watchdog, and RGB LED protocol support compatible with WS2811 and WS2812. On WL2H-U, several exposed pins are also marked as PWM, UART, ADC, or SPI-capable, which helps when remapping functions in custom firmware. [#20901530]

14. What devices or modules mentioned in the forum use LN882H-family chips, and where can I see teardown or flashing examples?

The thread names the Tuya WL2H-U as a concrete LN882H module and links example device topics for ELIVCO LSPA9, a mini smart switch WiFi relay module with LN882HKI, and a Heruled Tuya smart LED controller with an LN8825B chip. Those linked topics are where you can look for teardown context, identification clues, and early flashing examples across the LN882 family. [#20901530]

15. Where can I watch the LN882H flashing video tutorial and find the OpenBeken device list for Home Assistant-style setups?

Watch the flashing video in the February 19, 2025 forum update, which posts a direct YouTube tutorial link. For device support lookup, use the OpenBeken device list linked in the main information post. Together, those two resources cover the visual flashing walkthrough and the broader catalog of supported devices for Home Assistant-style integrations and custom setup planning. [#21446063]
Generated by the language model.
ADVERTISEMENT