• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

auth/03-Aug-2024-3431

auth-cert/03-Aug-2024-252230

auth-generate/03-Aug-2024-415210

ble/03-Aug-2024-390318

cli/03-Aug-2024-588433

dataset/03-Aug-2024-568446

tlv/03-Aug-2024-199172

utils/03-Aug-2024-7559

GENERATING_CERTIFICATES.mdD03-Aug-20243.3 KiB10769

README.mdD03-Aug-20242.7 KiB8151

bbtc.pyD03-Aug-20245.8 KiB140120

poetry.lockD03-Aug-202419.6 KiB319286

pyproject.tomlD03-Aug-2024361 1713

README.md

1# BBTC Client
2
3## Overview
4
5This is a Python implementation of Bluetooth-Based Thread Commissioning (BBTC) 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
15```
16poetry install
17```
18
19This will install all the required modules to a virtual environment, which can be used by calling `poetry run <COMMAND>` from the project directory.
20
21## Usage
22
23To see the supported commandline arguments of BBTC client, use:
24
25```
26poetry run python3 bbtc.py --help
27```
28
29In order to connect to a TCAT device, enter the project directory and run:
30
31```bash
32poetry run python3 bbtc.py {<device specifier> | --scan}
33```
34
35where `<device specifier>` can be:
36
37- `--name <NAME>` - name advertised by the device
38- `--mac <ADDRESS>` - physical address of the device's Bluetooth interface
39
40Using the `--scan` option will scan for every TCAT device and display them in a list, to allow selection of the target.
41
42For example:
43
44```
45poetry run python3 bbtc.py --name 'Thread BLE'
46```
47
48The application will connect to the first matching device discovered and set up a secure TLS channel. The user is then presented with the CLI.
49
50## Usage with a specific TCAT Commissioner identity
51
52The TCAT Commissioner's certificate specifies what permissions it has obtained for specific features of managing a TCAT Device. By default, the identity in the `auth` directory is used. In order to use a different TCAT Commissioner certificate (identity), use the `--cert_path` argument, as follows:
53
54```bash
55poetry run python3 bbtc.py --cert_path <certs-path> {<device specifier> | --scan}
56```
57
58where `<certs-path>` is the directory where the private key, certificate, and CA certificate of the TCAT Commissioner are stored.
59
60For example to use a pre-configured identity `CommCert2` (related to Thread certification tests):
61
62```
63poetry run python3 bbtc.py --cert_path ./auth-cert/CommCert2 --name 'Thread BLE'
64```
65
66The `auth-cert` directory contains some other identities too, for testing purposes. Refer to Thread TCAT test plan documents for details.
67
68See [GENERATING_CERTIFICATES.md](GENERATING_CERTIFICATES.md) for details on generating own certificates.
69
70## TCAT Commissioner CLI Commands
71
72The application supports the following interactive CLI commands:
73
74- `help` - Display available commands.
75- `commission` - Commission the device with current dataset.
76- `thread start` - Enable Thread interface.
77- `thread stop` - Disable Thread interface.
78- `hello` - Send "hello world" application data and read the response.
79- `exit` - Close the connection and exit.
80- `dataset` - View and manipulate current dataset. Use `dataset help` for more information.
81