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
| Condition | Entry point |
|---|---|
| One hand, unknown port | connect_auto() |
| Known port or slave ID | Pass filters to connect_auto() |
| User must select a candidate | discover(), then connect the selection |
| Multiple hands or ports | One 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:
- Model, side, and serial number in
device_info. - Layout ID and joint count in
joint_layout. firmware_infoagainst the project baseline.- State and Health for faults.
- 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.