BouffaloSDK Documentation

repository·master·Indexed 19 days ago

https://github.com/bouffalolab/bouffalo_sdk

A comprehensive software development kit for Bouffalo Lab's IoT and MCU chips (including bl702, bl616, bl616cl, and bl618dg). The SDK provides support for DVP and SPI camera sensors, various LCD drivers (ili9341, ili9488, st7789v, gc9503v), and the NetHub host stack featuring the bflbwifictrl Wi-Fi control stack and virtual channel API for private data exchange via SDIO. It also includes the bl_crt_bundle for optimized X.509 Root CA certificate management.

Tokens
348.5K
Snippets
1.2K
Records
1.7K
Agent score
66%

What's inside BouffaloSDK

  1. Overview of bflbwifictrl / libbflbwifi

    master

    The bflbwifictrl subdirectory provides an optional AT-style host control stack for Wi-Fi. It is used when an application requires AT control capabilities rather than just the NetHub data-path.

    Key components include:

    • bflbwifid: A daemon that manages runtime backend selection and request dispatch.
    • bflbwifictrl: A CLI tool for interacting with the Wi-Fi control stack.
    • libbflbwifi: A C library that manages Wi-Fi semantics and state management.

    Note: This stack is not required for NetHub data-path-only products.

  2. What is the OpenThread Control Interface (OTCI)?

    master

    The OpenThread Control Interface (OTCI) is a Python library that provides uniform interfaces to connect to and control various devices running OpenThread. It abstracts the underlying connection methods, allowing you to interact with different device types using a consistent API.

    Supported device types:

    • OpenThread CLI: SOC devices via Serial.
    • OpenThread NCP: SOC devices via Serial (limited support via pyspinel).
    • OpenThread Border Router (OTBR): OTBR devices via SSH.
  3. Overview of the NetHub Device Module

    master

    The NetHub module (components/net/nethub) is a device-side implementation responsible for bridging Wi-Fi traffic to a selected host interface.

    Key Responsibilities:

    • Bridges device-side Wi-Fi traffic onto a single selected host interface (SDIO, USB, or SPI).
    • Splits Wi-Fi RX packets between local handling and host forwarding.
    • Manages active Wi-Fi endpoint selection (STA or AP).
    • Provides a logical control path facade via nethub_ctrl_*.
    • Provides a logical virtual channel API via nethub_vchan_*.

    Architectural Boundaries:

    • The core does not depend on ATModule; ATModule is an optional control path composition.
    • It does not implement the Wi-Fi protocol stack itself.
    • It cannot run multiple host interfaces simultaneously in a single build.
  4. Overview of sdio2_test

    master

    The sdio2_test example is a multi-channel data testing suite based on SDIO2/SDIO3. It is designed to test various functions including Ethernet devices, tty devices, and speedtest performance.

    Key Components:

    • Device Driver: The driver implementation for the devices is located in bsp/common/msg_router/device and is invoked within main.c.
    • Host Requirements: Requires a Linux host system that supports SDH Host.
    • Kernel Module: A kernel module driver is provided in bsp/common/msg_router/linux_host/kernel which supports hot swapping, allowing for stability testing of the SDIO driver.
  5. Overview of the lwip_emac example

    master

    The lwip_emac example demonstrates a network interface using EMAC and the lwIP protocol stack. It provides several network services including TCP Loopback (Server/Client), UDP Echo, HTTP, and iperf throughput testing.

    Key features:

    • Unified Initialization: EMAC, netif, PHY Link monitoring, and DHCP are initialized via a shared startup module.
    • Resilience: Services can continue to function during normal PHY Link Down/Up events.
    • DHCP: Enabled by default; the IPv4 address is printed via netif state callbacks.
    • HTTP Server: An embedded lwIP httpd server that starts automatically upon network initialization and runs on TCP port 80.
  6. Overview of the audio_dac_adc example

    master

    The audio_dac_adc example demonstrates a complete, built-in audio path on supported Bouffalo chips. It enables:

    • Capture: Using the built-in BL AUADC (Analog-to-Digital Converter) path.
    • Playback: Using the built-in BL AUDAC/AUPWM (Digital-to-Analog Converter / Pulse Width Modulation) path.

    This example reuses the recorder shell commands found in the examples/peripherals/i2s/i2s_codec directory.

  7. Overview of BL616 built-in images

    master

    The bsp/board/bl616dk/builtin_imgs directory contains pre-built boot2 and mfg (manufacturing) files used for IOT functions.

    Available image types:

    • boot2_bl616_isp_debug_<version>.bin: Normal boot2 image including debug logs.
    • boot2_bl616_isp_release_<version>.bin: Normal boot2 image without debug logs.
    • mfg_bl616_gu_<commit>_autoboot_<version>.bin: Autoboot manufacturing image.
    • mfg_bl616_gu_<commit>_<version>.bin: Non-autoboot manufacturing image.
  8. Overview of available LVGL demos

    master

    The following demos are available to demonstrate LVGL capabilities:

    • Widgets: Shows built-in widgets using the material theme. Requires LV_MEM_SIZE $\ge$ 38KB.
    • Music Player: Demonstrates modern, smartphone-like UIs. Optimized for 480x272 or 272x480 resolutions.
    • Keypad and Encoder: Shows how to navigate widgets (buttons, sliders, rollers, etc.) without a touchpad.
    • Benchmark: Measures system performance and compares settings.
    • Stress: A stress test involving heavy object creation, deletion, and animations to detect memory leaks or corruption.
    • Flex Layout: Demonstrates the flex layout system.
    • Multi-language: Demonstrates multi-language support.