Building cpc-spinel-proxy Locally#

cpc-spinel-proxy is a host daemon that bridges a Unix-domain Spinel socket (as used by the default Android Thread HAL) to a CPCd instance on the Multi-PAN 802.15.4 endpoint. It was added in SiSDK 2026.6 for Android 15 multiprotocol integrations where ot-daemon does not expose multi-PAN Spinel IIDs directly.

For how this proxy fits into the overall Android datapath, see Android 15.

Supported platforms#

cpc-spinel-proxy is generated for host targets using the OpenThread host ARM64 (Android 15 - NDK r27d) platform component. The resulting binary is intended for integration into an Android 15 vendor image.

Other host platform components may be added in future SDK releases; use the platform component that matches your target OS and toolchain.

Prerequisites#

Before building cpc-spinel-proxy:

  1. Build and install CPCd and libcpc for the same target environment, or stage compatible libcpc.so and sl_cpc.h for the NDK link step. See Building CPCd Locally.

  2. Install NDK r27d (API 35) when cross-compiling for Android outside AOSP. Link to NDK download.

Building in Simplicity Studio#

  1. Create a new project.

  2. Select Custom Board device to indicate a host target.

  3. Select Makefile IDE as the toolchain.

  4. Select Copy Contents if you will build on a separate build host.

  5. Configure the project with a supported host platform component as specified in the Supported platforms section.

  6. Build from the generated project directory:

make -f cpc-spinel-proxy.Makefile

On success, the binary is at ./build/debug/cpc-spinel-proxy.

When cross-compiling for Android with the NDK, set CC, CXX, and LD to the NDK aarch64-linux-android* clang tools and ensure the Makefile links against the staged libcpc.so and include path for sl_cpc.h.

Runtime configuration#

Typical invocation for the Android multiprotocol reference (socket path, CPC instance, endpoint, and IID translation):

cpc-spinel-proxy -s /data/vendor/hardware/spinel-proxy.sock \
  -i cpcd_0 -e 12 --iid 2 --iid-list 0

Option

Purpose

-s, --socket PATH

Unix socket listened on for the Thread HAL (spinel+socket:// URL must match this path)

-i, --cpc-instance NAME

CPCd instance name (cpcd_0)

-e, --endpoint ID

CPC endpoint for 802.15.4 Spinel on your secondary image (endpoint 12 for 15.4)

--iid N

Spinel IID used on the CPC side for Thread (reference: 2)

--host-iid N

Spinel IID presented on the HAL socket side (default 0)

--iid-list N,...

Additional CPC-side IIDs forwarded to the HAL (include 0 for RCP broadcast frames)

The proxy accepts one HAL client at a time. If CPCd resets, the HAL socket session is dropped and the HAL service must reconnect.

Integrating into an Android image#

After building the binary:

  1. Stage the ELF (and libc++_shared.so if dynamically linked) under your vendor tree.

  2. Wrap with cc_prebuilt_binary in Android.bp, or install via your product prebuilt workflow.

  3. Add an init.rc service that starts after cpcd and before vendor.threadnetwork_hal.

  4. Add vendor SELinux policy for the proxy domain, registering the socket with mode 0660.

See Android 15 — Integration for AOSP packaging strategies and startup order.