logo elektroda
logo elektroda
X
logo elektroda

SurpLife (Zengge) Symphony Controller USB SPI: BK7238 Firmware Details

divadiow 894 10
ADVERTISEMENT
  • Helpful post
    #1 21329884
    divadiow
    Level 35  
    SurpLife (Zengge) Symphony Controller USB SPI. Very small.

    WiFi SPI LED Controller with USB cable on a wooden table Photo of an electronic board with several components and a connected white wire. SurpLife (Zengge) USB SPI controller module on a white background.

    BKFIL and Easy Flasher firmware backup attached. The coeff on this device is 84f37800 84f37800 84f37800 84f37800.

    boot at 115200 baud

    Code: Text
    Log in, to see the code


    app boot is at 2000000 baud
    Code: Text
    Log in, to see the code


    attempting OTA with mhflasher to see what it says:

    Code: Text
    Log in, to see the code


    detected by the Magic Home and SurpLife apps but SL has all the SPI LED scenes and features

    Device information screen from an app showing device name and firmware version. Symphony Controller app screen with hexagonal menu items. App screen for connecting the device to Wi-Fi. App screen showing connection to Wi-Fi network LEDnet007788A8A9.

    @insmod's Arduino SDK build boots:
    Screenshot of OpenBK7238 control panel.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #4 21521547
    divadiow
    Level 35  
    hooked this back up to see what was on it. Early OpenBK7238.

    OpenBK7238 control panel with configuration, restart, and web application launch buttons.

    OTA I guess wasn't working at this point so flashed with EF
    BK7231 Easy UART Flasher window with Write success! message indicating successful firmware writing.

    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 ✅

    Main interface of the OpenBK7238 web panel with device information and configuration options.

    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

    Code: Text
    Log in, to see the code


    P1 is the microphone, not supported in OBK

    PCB with electronic components and a microcontroller pinout diagram in the upper left corner.

    ZJ-BWCUCS-HC-1K-43 V1.0
  • ADVERTISEMENT
  • #6 21521690
    divadiow
    Level 35  
    hmm. unsure. I'll trawl a selection of these SDKs
    A list of folders with names of electronic module chips visible in a file explorer window.
    There's this in XR806, but that's audio, not necessarily mic I guess
    Screenshot of a project folder containing C source and header files for an audio demo.

    Added after 1 [hours] 2 [minutes]:

    a ton of stuff in the attached, but don't see anything super relevant.
    other things maybe interesting?
    A list of C source and header files in a pixel driver project folder. ZIP archive window with a list of folders in the os_kv directory. Screenshot of a folder containing directories and files from a software project. Screenshot of a folder window with several C source files and a README file. Screenshot of a file explorer window displaying C source and header files from the tuyaos_dimmer_driver_demo project.
  • Helpful post
    #8 21540520
    p.kaczmarek2
    Moderator Smart Home
    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:
    Code: C / C++
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #10 21623733
    p.kaczmarek2
    Moderator Smart Home
    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)

    I see,
    Helpful post? Buy me a coffee.
  • #11 21624400
    divadiow
    Level 35  
    insmod wrote:
    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

    Added after 6 [hours] 30 [minutes]:

    bad test. seems fine.





    Added after 3 [hours] 34 [minutes]:

    OTA 1.18.145->1.18.145 wipes LFS

Topic summary

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.
Summary generated by the language model.
ADVERTISEMENT