Alibaba Cloud Bailian (Aliyun MMI) Project

[中文]

1. Overview

This project is based on beken_genie and talks to Alibaba Cloud Bailian Multimodal Agent (MMI).

The folder name is aliyun_mmi, not bailian. The cloud host is bailian.multimodalagent.aliyuncs.com.

Provisioning, keys, LEDs, dual-screen AVI and wake words follow beken_genie. Hardware is still the AIDK AI toy board.

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

Path: <source code>/projects/aliyun_mmi

This is not the Lingxin project. Lingxin uses LingXin_AI_IoT_VoiceChatEngine. This project uses aliyun_sdk plus Bailian MMI register / getToken / WSS.

2. Differences from beken_genie

  • CONFIG_ALIYUN_MMI_EN=y, display still dual-screen AVI (CONFIG_DUAL_SCREEN_AVI_PLAY=y).

  • After Wi-Fi is up, the Aliyun smart-config adapter registers the device, fetches a token, then ali_wss opens WSS with host/api/port from the SDK.

  • Default mode is duplex (C_MMI_MODE_DUPLEX), both text directions on (C_MMI_TEXT_MODE_BOTH), voice id longxiaochun_v2.

  • No Agora / Volc RTC, and not CONFIG_LINGXIN_AI_EN.

3. Key configuration

Kconfig

CPU

Format

Value

CONFIG_ALIYUN_MMI_EN

CPU0

bool

y

CONFIG_BK_SMART_CONFIG

CPU0

bool

y

CONFIG_DUAL_SCREEN_AVI_PLAY

CPU0 & CPU1

bool

y

Source pointers:

  • Register / token: projects/common_components/bk_smart_config/src/adapter/aliyun/bk_smart_config_ali_adapter.c

  • WSS path: projects/common_components/network_transfer/aliyun_wss/

  • Events / work mode: _mmi_event_callback in ali_wss_main.c

4. Auth and connection

Fill Bailian app credentials in the adapter (defaults are placeholder xxx and will not connect):

  • C_APP_ID / C_APP_SECRET in bk_smart_config_ali_adapter.c

  • Device name is the Wi-Fi MAC string stored via c_storage

After the station is up:

  1. c_mmi_sdk_init().

  2. If unregistered, HTTPS POST /api/device/v1/register to bailian.multimodalagent.aliyuncs.com.

  3. HTTPS POST /api/token/v1/getToken.

  4. Build wss://<host>:<port><api> from c_mmi_get_wss_* and ali_auto_run().

  5. MIC → c_mmi_put_recorder_data; playback ← c_mmi_get_player_data.

Apply for credentials in the Alibaba Cloud Bailian console. Do not commit a real secret.

5. Build and flash

  • SDK root: make bk7258 PROJECT=aliyun_mmi

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

  • SD-NAND eye AVI resources are the same as beken_genie.

6. Q&A

Q: How is this different from Lingxin?

A: Lingxin is projects/lingxin (CONFIG_LINGXIN_AI_EN). Bailian is this aliyun_mmi project (CONFIG_ALIYUN_MMI_EN) against bailian.multimodalagent.aliyuncs.com.

Q: It builds but never connects?

A: Replace C_APP_ID / C_APP_SECRET with console values and confirm HTTPS / WSS to the Bailian host is reachable.