> For the complete documentation index, see [llms.txt](https://docs.anthriq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anthriq.com/bxi-studio/developer/overview/get-started/configuration.md).

# 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

{% tabs %}
{% tab title="Node.js" %}

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

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

{% endtab %}

{% tab title="Python" %}

```python
from anthriq_bxi_interface import BxiClient

client = BxiClient(
    device_type="anthriq-instinct",
    timeout=30000,
    debug=False,
)
```

{% endtab %}
{% endtabs %}

| 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:

{% tabs %}
{% tab title="Node.js" %}

```typescript
await client.invoke({
  feature: "motors",
  operation: "calibrate",
  payload: { motor_id: 0 },
  timeoutMs: 120000,
});
```

{% endtab %}

{% tab title="Python" %}

```python
await client.invoke({
    "feature": "motors",
    "operation": "calibrate",
    "payload": {"motor_id": 0},
    "timeoutMs": 120000,
})
```

{% endtab %}
{% endtabs %}

`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](/bxi-studio/developer/overview/features/impedance.md).

## 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.

{% tabs %}
{% tab title="Node.js" %}

```typescript
const client = new BxiClient<"anthriq-instinct">({
  deviceType: "anthriq-instinct",
  debug: true,
});
```

{% endtab %}

{% tab title="Python" %}

```python
client = BxiClient(device_type="anthriq-instinct", debug=True)
```

{% endtab %}
{% endtabs %}

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

* [Read device information](/bxi-studio/developer/overview/get-started/device-info.md)
* [Install and connect](/bxi-studio/developer/overview/get-started/connect.md)
