Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configure the client

BxiClient takes a configuration object at construction. Every field has a working default, so deviceType alone is enough to connect to a local device.

Set the options

import { BxiClient } from "@anthriq_dev/bxi-interface";

const client = new BxiClient<"anthriq-instinct">({
  deviceType: "anthriq-instinct",
  timeout: 30000,
  debug: false,
});
from anthriq_bxi_interface import BxiClient

client = BxiClient(
    device_type="anthriq-instinct",
    timeout=30000,
    debug=False,
)
Field
Type
Default
Purpose

deviceType

string

None

Device identifier, if not passed to initialize()

timeout

number

30000

Default request timeout in milliseconds

debug

boolean

false

Enable SDK and bridge debug logging

zmqAddress

string

ipc:///tmp/bxi-interface.sock

Request socket for the bridge

zmqLogAddress

string

ipc:///tmp/bxi-interface-logs.sock

Log subscription socket

bridgePath

string

Auto-detected

Path to the C++ bridge executable

instanceId

string

None

Per-device key for running several bridges

bridgeEnv

Record<string, string>

None

Environment variables for the spawned bridge

On Windows the default socket paths resolve under %TEMP% rather than /tmp.

Set the timeout

The default 30 seconds covers register and motor round trips. Two cases need attention.

Long operations. Motor calibration can exceed the default. Override it for one request rather than raising the client-wide value:

timeoutMs of 0 or less disables the timeout for that request.

Warning: A request with no timeout never settles if the device stops responding. The pending transaction leaks and anything awaiting it hangs. Prefer a large finite value.

Impedance calibration. A calibration run has its own timeouts per cycle and is not bounded by the client timeout. See Measure contact impedance.

Locate the bridge executable

bridgePath is searched in order:

  1. The local development build under core/cpp/build/bin/Release, then Debug.

  2. An application's bundled backend, when running inside one.

  3. The user installation at ~/.bxi-interface/bin.

Set bridgePath explicitly to pin a specific build.

The bridge also needs its device manifests and CA certificate. Both are resolved to absolute paths and passed through the environment, because the daemon changes directory to / when it detaches and any relative path it inherited would break.

Turn on logging

debug: true raises SDK logging and enables logging in the spawned bridge.

Debug output includes every request and response with its transaction id, which is what correlates a hung request against the bridge log.

Note: Enabling debug changes what the bridge does, not only what the SDK prints. The setting is passed to the daemon as it spawns, so a bridge already running with logging off keeps it off until it is respawned.

Override the socket addresses

The defaults are IPC sockets, so the SDK process and the bridge must share a host. Override both addresses to reach a bridge over TCP.

With instanceId set, the socket is derived from the daemon key rather than from zmqAddress, so each device gets a distinct path automatically.

Next steps

Last updated

Was this helpful?