nuttx/Documentation/platforms
Lingao Meng 89c4b8ccaf
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
arch/sim: Add runtime HCI socket target option
Allow sim HCI socket users to select the host-side HCI target at runtime
with --bt-dev.  Passing --bt-dev=hciN overrides CONFIG_SIM_HCISOCKET_DEVID
for the BlueZ HCI user channel, while omitting the option keeps the existing
configured default behavior.

Also allow --bt-dev=/path/to/socket to connect to an H:4 stream exposed
through a Unix-domain socket.  This lets sim applications use a controller
provided by another host process or by a UART-to-Unix-socket bridge without
requiring BlueZ raw HCI privileges for the NuttX process.

Use host-side output for early --bt-dev parse errors, since NuttX stdio is
not initialized before nx_start().

Document the BlueZ and Unix socket modes, including the capability
requirements for BlueZ and the socat bridge example for Unix socket mode.

Testing:

  Host: Ubuntu 22.04 x86_64
  Board/config: sim:bthcisock

  Style checks:

    git diff --check HEAD~2..HEAD
    PATH=/home/mi/bsim-auto-test/.venv/bin:$PATH \
      ./tools/checkpatch.sh -c -u -m -g HEAD~2..HEAD

  Clean build:

    make distclean
    ./tools/configure.sh -l -a ../../nuttx-apps sim:bthcisock
    kconfig-tweak --file .config --set-val STACK_USAGE_WARNING 0
    make olddefconfig
    make -j16

  Invalid runtime argument smoke test:

    ./nuttx --bt-dev=invalid

  Verified the command exits with status 1 and reports the invalid target
  without crashing before nx_start().

  Unix socket HCI smoke test:

    socat -d -d UNIX-LISTEN:/tmp/hci.sock,fork,reuseaddr \
      /dev/ttyACM2,b1000000,raw,echo=0,crtscts=1
    printf 'ifconfig\nbt bnep0 info\npoweroff\n' | \
      timeout 20s ./nuttx --bt-dev=/tmp/hci.sock

  Verified the sim registers the Bluetooth network device as bnep0 and
  bt bnep0 info reads the controller state through the Unix-socket HCI
  path, including BDAddr aa:bb:cc:dd:ee:ff from the attached controller.

Assisted-by: OpenAI Codex
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-09-13 18:31:59 -03:00
..
arm Documentation: Point the buildroot links at the repository that still exists. 2026-09-13 18:29:40 -03:00
arm64 arm64/am62x: Add TISCI client, GPIO and I2C drivers 2026-08-02 11:40:13 +08:00
avr Documentation: Point the buildroot links at the repository that still exists. 2026-09-13 18:29:40 -03:00
ceva Documentation: add missing platforms to platforms/ and remove introduction/platforms 2023-10-22 19:06:44 +08:00
hc Documentation: Point the buildroot links at the repository that still exists. 2026-09-13 18:29:40 -03:00
mips arch/mips/jz4780: Add HDMI EDID parsing and dynamic display modes 2026-08-29 11:08:25 -03:00
misco Documentation: Point the buildroot links at the repository that still exists. 2026-09-13 18:29:40 -03:00
or1k docs/or1k: Migrate README.txt to RST format 2026-02-06 08:54:28 -03:00
renesas Documentation: Point the buildroot links at the repository that still exists. 2026-09-13 18:29:40 -03:00
risc-v arch/risc-v: Add CLIC interrupt threshold support 2026-09-13 08:31:16 -03:00
sim arch/sim: Add runtime HCI socket target option 2026-09-13 18:31:59 -03:00
sparc Documentation: migrate the rest boards 2023-10-26 18:13:34 -03:00
tricore arch/tricore: support tc4evb board. 2026-03-10 10:38:19 +01:00
x86 doc/qemu-i486: Add documentation about qemu-i486:vga_fb 2026-04-30 11:56:49 +08:00
x86_64 boards/qemu-intel64: add NXTerm display console config 2026-08-25 10:06:53 +08:00
xtensa doc/esp32s3: Update esp32s3-touch-lcd7 documentation 2026-08-24 09:39:58 +02:00
z16 Documentation: update broken links 2024-04-10 15:17:53 -03:00
z80 style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
index.rst docs: Fix duplicate toctree references causing build warnings 2026-06-03 15:02:22 +08:00