Metadata-Version: 2.5
Name: go2tool
Version: 0.1.0
Summary: Set up Unitree Go2 robots: Bluetooth Wi-Fi provisioning and LAN/BLE discovery
Project-URL: Homepage, https://github.com/jeff-hykin/go2tool
Project-URL: Repository, https://github.com/jeff-hykin/go2tool
Author: Dimensional Inc.
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: bluetooth,go2,robot,unitree,wifi
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: bleak>=1.0.0
Requires-Dist: cryptography>=42
Requires-Dist: psutil>=7.0.0
Requires-Dist: typer<1,>=0.19.2
Description-Content-Type: text/markdown

# go2tool

Set up a Unitree Go2 (Pro or Air, stock firmware) from your laptop: put it on Wi-Fi over Bluetooth and find its IP. No Unitree app, no jailbreak.

Originally the `dimos go2tool` command from [dimOS](https://github.com/dimensionalOS/dimos); this is the same tool as a standalone package.

## Install

```bash
pip install go2tool
# or run it without installing
uvx go2tool discover
```

Needs Bluetooth on the machine running it (macOS or Linux/BlueZ) for the BLE parts.

## Usage

1. Power on the Go2. It advertises over BLE immediately.

2. (Optional) make sure the robot is detected:

```bash
go2tool discover
```

3. Provision Wi-Fi (one-time per network):

```bash
go2tool connect-wifi --ssid <wifi> --password <password>
```

Scans BLE and connects to the only robot it finds, or prompts you to pick if there are several. Use `--name Go2_49060`, `--serial <serial>` or `--mac <ble-mac>` to pick one non-interactively, and `--ap` to make the robot host a hotspot with that SSID/password instead of joining one.

4. Find the robot's IP:

```bash
go2tool discover
```

Prints `SOURCE NAME IP MAC SERIAL` for every robot it sees over BLE and LAN, e.g.

```
SOURCE NAME           IP              MAC                 SERIAL
BLE    Go2_49060      -               AA:BB:CC:DD:EE:FF   B42D4000P6PC49060
LAN    -              192.168.1.42    -                   B42D4000P6PC49060
```

Options: `--lan` / `--ble` to use only one source, `--timeout 0` to keep listening, `--lan-tick` for the LAN poll interval.

LAN discovery pins the UDP multicast probe to each real network interface, so it still works with Tailscale or other VPNs up.

## Credits

BLE provisioning protocol from the [UniPwn](https://github.com/Bin4ry/UniPwn) project's reverse engineering (exploit payload removed; only the normal provisioning flow the official app uses).

## License

Apache-2.0, Copyright 2025-2026 Dimensional Inc.
