Skip to content

Discover and connect devices

Manager owns discovery and connection resources. Applications must not cache low-level serial handles or repeatedly open the same bus for different hands.

Choose a connection path

ConditionEntry point
One hand, unknown portconnect_auto()
Known port or slave IDPass filters to connect_auto()
User must select a candidatediscover(), then connect the selection
Multiple hands or portsOne Manager owns multiple Hands

Automatic discovery time depends on the number of ports, protocols, and baud rates being probed. Production systems should store verified port aliases, protocol settings, and device IDs to avoid unnecessary scans.

Python lifecycle

python
import asyncio

from bc_revo3_sdk import main_mod as sdk


async def main():
    manager = sdk.Manager()
    hand = None
    try:
        hand = await manager.connect_auto(port="/dev/ttyUSB0", slave_id=127)
        info = hand.device_info
        layout = hand.joint_layout
        if info is None or layout is None:
            raise RuntimeError("Device metadata is unavailable")
        print(info.serial_number, layout.layout_id, layout.joint_count)
    finally:
        if hand is not None:
            await hand.close()
        await manager.close()


asyncio.run(main())

Read-only preflight

Connecting does not send a motion command. Before motion, verify:

  1. Model, side, and serial number in device_info.
  2. Layout ID and joint count in joint_layout.
  3. firmware_info against the project baseline.
  4. State and Health for faults.
  5. Touch layout when the application uses tactile data.

Reconnect after a disconnect

Always close the old Hand before reconnecting. Old motion handles, subscriptions, and Servo sessions are invalid after a disconnect. See the core API for exact entries.

Help