hooked this back up to see what was on it. Early OpenBK7238.
OTA I guess wasn't working at this point so flashed with EF
I notice the OpenBK7238 log out must have switched UART too.
1.18.84 OTA- > 1.18.84 log:
Code: Text
Log in, to see the code
flashed factory back from 0x0 and tested OpenBK7238 flash and OTA was still OK as if new user converting from factory.
OTA still behaves as it should ✅
Added after 52 [minutes]:
although SPI isn't yet implemented yet on BK7238, here are the pin assignments discovered by trial-and-error and educated guesses after marking pins with traces
That's lot of interesting samples, but let's focus on mic for now.
driver_mic readme translated to english by GPT:
Quote:
Microphone
Introduction
The Microphone is a common input device used to convert sound signals into electrical signals. This demo shows how to capture audio data from a microphone and save it to internal flash or an SD card.
Features
This sample code demonstrates how to initialize the microphone, collect audio data, and save it to a specified storage medium. The main features include:
Initializing the microphone and audio system.
Configuring the audio sampling rate (to allow the speaker to directly play back audio from the MIC, only 8kHz or 16kHz is supported), sample bit depth (16-bit), and channels (mono).
Detecting audio trigger signals through a GPIO pin.
Using a ring buffer to store audio data.
Saving audio data to internal flash or an SD card.
Reading audio data from the storage medium and playing it back.
File Structure
example_recorder.c: The main source file containing the implementation of microphone initialization, audio recording, and storage.
Usage
Ensure the hardware is properly connected, and both the microphone and SD card are connected to the development board.
Configure the config file in the project and enable CONFIG_FATFS to support the SD card file system.
Compile and flash the code to the development board.
Run the program, press the audio trigger button to start recording, and release the button to stop recording and begin playback.
About PCM and WAV
To convert PCM to WAV format, simply add a WAV header in front of the PCM data. Refer to the diagram below for the WAV header format:
Notes
Ensure the SD card is properly formatted and has sufficient storage space.
Adjust the GPIO pins and audio parameters according to your actual hardware configuration.
The recording duration is limited by the size of the ring buffer and the available storage space.
It is creating wav file... it's not using ADC directly, it seems to be using TKL system:
So I can now drive WS2812 from BK7238 NiceMCU? I can give it a try today
Quote:
SPIDMA LEDs for BK7238, BK7252N and BK7231N_ALT.
Tested 12 WS2812B leds on BK7238, animations work fine.
Fixed Powersave on BK7238.
Implemented SPI with new sdk, not tested. (N/7238/7252N use SPI DMA, everything else SPI)
The only untested thing is spi on BK7231U/T_ALT and BK7238/N_ALT.
My 'test' as of now hasn't been very methodical, but in the few moments I had yesterday to try it, it worked. OTA to SPI PR on this SurpLufe device was OK, 2m 120 LED ws2812 connected up, PixelAnim running. However, it was quite hit-and-miss getting the animations going. GUI was oddly unresponsive/slow
Thank you for the coding for this part. Good work.
There are two questions/ remarks: - sometimes the firmware crashed, if I set more than 20 Pixels at startup. Sometimes the last pixel set a wrong color, (startDriver SM16703P | SM16703P_Init 32 | startDriver PixelAnim) -> Comet with white color let the last pixel be yellow. I think, it could be a problem of PixelAnim !?
- Where can I find the command-set for SM16703P? I want to set brightness at startup. i.e.
Thanks Andreas
Added after 4 [hours] 36 [minutes]:
Now I have found the command-set at github in /scripts/commands.md. Sorry.
The crash, I have had, is at startup - if you use "Change Startup Command Text". Not by autoexec.bat!. I think, there is a timing problem. If I start with "delay_ms 100" the problems are gone.
Andreas
ah yes. a delay needed on BK7238 sounds familiar for something, but I could be mis-remembering. If you do use autoexec be sure to keep a note of the content elsewhere, OTA updates currently wipe LFS on BK7238 iirc.
The permitted fallback LittleFS range straddles the app/OTA boundary:
fallback LFS allowed range = 0x12B000 .. 0x1AB000
app partition tail = 0x12B000 .. 0x132000
OTA partition overlap = 0x132000 .. 0x1AB000
The default live LittleFS range does not straddle the boundary:
default live LFS = 0x1A3000 .. 0x1AB000
this is entirely inside OTA = 0x132000 .. 0x1E0000
OTA space to play with:
BK7231T current: ~484 KiB
BK7231N current: ~632 KiB
BK7238 proposed: ~664 KiB
or maybe a dedicated LFS somewhere else that won't clash, if there is anywhere. Either option is better than LFS always getting wiped, which is kinda bad considering BK7238 is so popular now.
✨ The discussion centers on the SurpLife (Zengge) Symphony Controller USB SPI device featuring the BK7238 chip, with firmware details including BKFIL and Easy Flasher backups. The device boots at 115200 baud and switches to 2000000 baud for application boot. Firmware version BK7238_1.0.14 is noted, running RT-Thread OTA package V0.2.8. The device identification includes MID AK001-ZJ21413 and firmware version 77_24_2. Early OpenBK7238 firmware was tested, revealing UART switching behavior during OTA updates. The device is available on AliExpress with various power and IR remote options. The discussion also explores access to Tuya ADC samples for microphone usage, with SDK trawling revealing XR806 audio components but no direct mic samples. A translated readme for a driver_mic indicates WAV file creation via the TKL system rather than direct ADC usage, involving TKL audio, GPIO, memory, and filesystem modules. Generated by the language model.
TL;DR: OTA image size observed was 743,313 bytes; “OTA still behaves as it should.” Works on SurpLife (Zengge) Symphony Controller with BK7238, with SPI/WS2812 now supported and EF/OTA paths verified. [Elektroda, divadiow, post #21521547]
Why it matters:** This FAQ helps makers and integrators flash, wire, and stabilize BK7238-based SPI LED controllers fast, with field-tested settings.
What exactly is the SurpLife (Zengge) Symphony Controller and which chip does it use?
It’s a very small USB SPI LED controller used by SurpLife/Zengge. The unit documented here runs the Beken BK7238 SoC and exposes Wi‑Fi, BLE, and SPI LED driving features. Factory firmware advertises as LEDnet… in AP mode, and logs reveal BLE advertising and TCP/UDP services. [Elektroda, divadiow, post #21329884]
How do I capture serial logs—what baud rates are used?
Connect to the boot ROM at 115200 baud to see the RT‑Thread/Beken boot. After the app hands over, switch to 2,000,000 baud for runtime logs. This transition appears consistently on this BK7238 sample, so adjust your terminal after the “go os_addr(0x10000)” line. [Elektroda, divadiow, post #21329884]
Can I flash OpenBeken on this BK7238, and does OTA work?
Yes. Users restored factory firmware, then flashed OpenBK7238 with Easy Flasher (EF), and confirmed OTA upgrades proceed to 100%. Quote: “OTA still behaves as it should.” If OTA was broken on early builds, EF direct flashing resolved it. [Elektroda, divadiow, post #21521547]
Is SPI/WS2812 support available on BK7238 now?
Yes—“SPI is now implemented,” and SPIDMA LEDs were tested working on BK7238. This unlocks direct driving of addressable strips from the controller with current OpenBeken builds that include the SPI DMA path. [Elektroda, insmod, post #21623725]
How many LEDs were field‑tested with BK7238 SPI output?
Twelve WS2812B LEDs were tested on BK7238 with animations running fine. This confirms timing and DMA correctness for short strips; longer runs may also work but were not detailed in that post. [Elektroda, p.kaczmarek2, post #21623733]
Why did earlier OTA attempts fail with mhflasher URLs?
Logs show the device/flash IDs didn’t match the OTA payload (device type 33 vs flash 77), so the updater pushed an “event: ota fail.” Align OTA device type and vendor strings, or use EF for a clean base before OTA. [Elektroda, divadiow, post #21329884]
Which pins did the community map on this board?
Discovered mappings: Pin 6 = IRRecv;0, Pin 8 = Btn;1, Pin 16 = SM16703P_DIN;0. Header P1 is a microphone input and not supported yet in OpenBeken on BK7238. [Elektroda, divadiow, post #21521547]
Does the SurpLife controller show up in popular apps?
Yes. It was detected by both Magic Home and SurpLife apps; SurpLife exposed more SPI LED scenes and features. This helps during first‑time setup before migrating to OpenBeken. [Elektroda, divadiow, post #21329884]
What is OpenBeken?
OpenBeken is a community firmware for Beken Wi‑Fi MCUs that brings local control, drivers, and OTA. On this unit, OpenBK7238 builds flashed with EF and updated to 1.18.84 via OTA as demonstrated. [Elektroda, divadiow, post #21521547]
Can OTA updates erase my files or scripts?
Yes, an observed case shows OTA 1.18.145→1.18.145 wiped the LittleFS (LFS). Keep a copy of autoexec/startup scripts elsewhere and re‑upload after updating. “OTA… wipes LFS” was reported on BK7238. [Elektroda, divadiow, post #21624400]
My startup commands crash or the last pixel shows wrong color—how do I fix it?
A timing race at startup caused crashes above ~20 pixels and a wrong last pixel color. Prefix your “Change Startup Command Text” with delay_ms 100. Quote: “If I start with ‘delay_ms 100’ the problems are gone.” [Elektroda, Andy41, post #21715277]
Where is the SM16703P command set for scripting brightness and effects?
Community notes point to the OpenBeken commands reference at scripts/commands.md. Use it to issue SM16703P_Init, PixelAnim, and brightness commands. Add a small startup delay on BK7238 before sending driver commands. [Elektroda, Andy41, post #21715277]
Does the microphone work under OpenBeken on this board?
Not yet. The board’s P1 header feeds a mic, but OpenBeken for BK7238 currently lacks a mic driver. You can wire LEDs and IR now; audio‑reactive features await support. [Elektroda, divadiow, post #21521547]
How does Tuya’s SDK handle microphones on similar hardware?
A shared sample uses TKL (tkl_audio, tkl_fs, tkl_gpio) to record 8/16 kHz mono PCM and write a WAV file, rather than exposing raw ADC within the app. It demonstrates GPIO‑triggered capture with ring buffers. [Elektroda, p.kaczmarek2, post #21540520]
What network services and BLE details appeared in logs?
Observed: TCP port 50763, TCP ‘tcps’ on 5577, UDP server on 48899, BLE name IOTWF8A9, and active advertising. Use these to verify connectivity during bring‑up and discovery. [Elektroda, divadiow, post #21329884]
Where can I buy this SurpLife/Zengge USB SPI controller?
A matching listing was shared on AliExpress, including variants with power and IR remote options. Confirm BK7238 in photos/spec before ordering. [Elektroda, divadiow, post #21330605]
How do I convert from factory firmware to OpenBeken (quick steps)?
Back up current firmware; note Wi‑Fi SSID/password and any scenes.
Flash OpenBK7238 with Easy Flasher via UART; reboot and join its AP.