Beken WSS Project

[中文]

1. Overview

This project keeps the beken_genie BLE provisioning framework, replaces Agora / Volcengine RTC with WebSocket (WSS) for audio streaming, and shows conversation text as scrolling subtitles on a single LCD.

Keys, LEDs, wake words and prompt tones follow Genie. The panel is the same idea as ai_dashboard: one 360x360 QSPI LCD (ST77916), no dual-screen eye AVI.

Hardware, keys, LEDs and the App: Beken Genie AI Project

Path: <source code>/projects/beken_wss

projects/readme.txt: Genie provisioning + websocket media + single-screen subtitle.

2. Differences from beken_genie / ai_dashboard

  • Transport: CONFIG_BK_WSS_TRANS=y, code under projects/common_components/network_transfer/bk_wss/.

  • Default URI in bk_wss_main.c: wss://ai.aclsemi.com:9015. Change this for production.

  • Display: CONFIG_SINGLE_SCREEN_FONT_DISPLAY=y (single_screen_font_display LVGL label, UTF-8 per-glyph update).

  • No CONFIG_DUAL_SCREEN_AVI_PLAY, no Agora / Volc RTC.

  • PSRAM is still used (see beken_wss_nopsram for the no-PSRAM build).

3. Key configuration

Kconfig

CPU

Format

Value

CONFIG_BK_WSS_TRANS

CPU0

bool

y

CONFIG_SINGLE_SCREEN_FONT_DISPLAY

CPU0 & CPU1

bool

y

CONFIG_LCD_QSPI_ST77916

CPU1

bool

y

CONFIG_LCD_BACKLIGHT_GPIO

CPU1

int

25

CONFIG_LCD_QSPI_RESET_PIN

CPU1

int

45

CONFIG_LCD_QSPI_ID

CPU1

int

1

CONFIG_WEBSOCKET / CONFIG_WEBSOCKET_TLS

CPU0

bool

y

CONFIG_LCD_BACKLIGHT_GPIO, CONFIG_LCD_QSPI_RESET_PIN and CONFIG_LCD_QSPI_ID must be declared in Kconfig.projbuild.

Subtitle UI: projects/common_components/single_screen_font_display/lvgl_ui.c. Provisioning adapter: projects/common_components/bk_smart_config/src/adapter/wss/.

4. Runtime flow

  1. BLE provisioning (Beken App) writes SSID / password.

  2. After STA is up, beken_auto_run()beken_wss_main() opens WSS.

  3. Encoded MIC frames go out via rtc_websocket_audio_send_data; downlink PCM / G722 plays on the speaker.

  4. Server text is queued to LVGL and scrolled on the single screen.

Default audio is 16 kHz, G722 or PCM, AEC on.

5. Build and flash

  • SDK root: make bk7258 PROJECT=beken_wss

  • Firmware: <source code>/build/beken_wss/bk7258/all-app.bin

  • Place the font file used by single_screen_font_display on SD-NAND (or the path the project actually opens).

  • Flashing: IDK getting started

6. Q&A

Q: How do I change the WSS server?

A: Edit websocket_cfg.uri in projects/common_components/network_transfer/bk_wss/bk_wss_main.c and keep TLS / SNI consistent with CONFIG_WEBSOCKET_TLS.

Q: Can I use another QSPI / SPI LCD?

A: Yes. Width must be a multiple of 16, height a multiple of 8. Update CPU1 LCD Kconfig and lv_vendor_init() size, same as ai_dashboard.

Q: When to use beken_wss_nopsram instead?

A: Use this project when the board has PSRAM and you need on-screen subtitles. Use Beken WSS without PSRAM for no-PSRAM hardware or BK7257.