1# BBTC Client 2 3## Overview 4 5This is a Python implementation of Bluetooth-Based Thread Commissioning client, based on Thread's TCAT (Thread Commissioning over Authenticated TLS) functionality. 6 7## Installation 8 9If you don't have the poetry module installed (check with `poetry --version`), install it first using: 10 11```bash 12python3 -m pip install poetry 13``` 14 15Thread uses Elliptic Curve Cryptography (ECC), so we use the `ecparam` `openssl` argument to generate the keys. 16 17``` 18poetry install 19``` 20 21This will install all the required modules to a virtual environment, which can be used by calling `poetry run <COMMAND>` from the project directory. 22 23## Usage 24 25In order to connect to a TCAT device, enter the project directory and run: 26 27```bash 28poetry run python3 bbtc.py {<device specifier> | --scan} 29``` 30 31where `<device specifier>` can be: 32 33- `--name <NAME>` - name advertised by the device 34- `--mac <ADDRESS>` - physical address of the device's Bluetooth interface 35 36Using the `--scan` option will scan for every TCAT device and display them in a list, to allow selection of the target. 37 38For example: 39 40``` 41poetry run python3 bbtc.py --name 'Thread BLE' 42``` 43 44The application will connect to the first matching device discovered and set up a secure TLS channel. The user is then presented with the CLI. 45 46## Commands 47 48The application supports the following interactive CLI commands: 49 50- `help` - Display available commands. 51- `commission` - Commission the device with current dataset. 52- `thread start` - Enable Thread interface. 53- `thread stop` - Disable Thread interface. 54- `hello` - Send "hello world" application data and read the response. 55- `exit` - Close the connection and exit. 56- `dataset` - View and manipulate current dataset. See `dataset help` for more information. 57