1EXAMPLES 2======== 3 4The project includes a few simple example applications to illustrate some of the ways the library APIs can be used. 5These examples include: 6 7## `battery_service.py` 8Run a simple device example with a GATT server that exposes a standard Battery Service. 9 10## `get_peer_device_info.py` 11An app that connects to a device, discovers its GATT services, and, if the Device Information Service is found, looks for a Manufacturer Name characteristics, reads and prints it. 12 13## `keyboard.py` 14An app that implements a virtual keyboard or mouse, or can connect to a real keyboard and receive key presses. 15 16## `run_a2dp_info.py` 17An app that connects to a device, phone or computer and inspects its A2DP (Advanced Audio Profile) capabilities 18 19## `run_a2dp_source.py` 20An app that can connect to a Bluetooth speaker and play audio. 21 22## `run_a2dp_sink.py` 23An app that implements a virtual Bluetooth speaker that can receive audio. 24 25## `run_advertiser.py` 26An app that runs a simple device that just advertises (BLE). 27 28## `run_cig_setup.py` 29An app that creates a simple CIG containing two CISes. **Note**: If using the example config file (e.g. `device1.json`), the `address` needs to be removed, so that the devices are given different random addresses. 30 31## `run_classic_connect.py` 32An app that connects to a Bluetooth Classic device and prints its services. 33 34## `run_classic_discoverable.py` 35An app that implements a discoverable and connectable Bluetooth Classic device. 36 37## `run_classic_discovery.py` 38An app that discovers Bluetooth Classic devices and prints their information. 39 40## `run_connect_and_encrypt.py` 41An app that connected to a device (BLE) and encrypts the connection. 42 43## `run_controller_with_scanner.py` 44 45## `run_controller.py` 46Creates two linked controllers, attaches one to a transport, and the other to a local host with a GATT server application. This can be used, for example, to attach a virtual controller to a native stack, like BlueZ on Linux, and use the native tools, like `bluetoothctl`, to scan and connect to the GATT server included in the example. 47 48## `run_csis_servers.py` 49Runs CSIS servers on two devices to form a Coordinated Set. **Note**: If using the example config file (e.g. `device1.json`), the `address` needs to be removed, so that the devices are given different random addresses. 50 51## `run_gatt_client_and_server.py` 52Runs a local GATT server and GATT client, connected to each other. The GATT client discovers and logs all the services and characteristics exposed by the GATT server 53 54## `run_gatt_client.py` 55A simple GATT client that either connects to another BLE device or waits for a connection, then dumps its GATT database. 56 57## `run_gatt_server.py` 58A simple GATT server that either connects to another BLE device or waits for connections. 59 60## `run_hfp_gateway.py` 61A app that implements a Hands Free gateway. It can connect to a Hands Free headset. 62 63## `run_hfp_handsfree.py` 64A app that implements a Hands Free headset. It can simulate some of the events that a real headset would 65emit, like picking up or hanging up a call, pressing a button, etc. 66 67## `run_notifier.py` 68An app that implements a GATT server with characteristics that can be subscribed to, and emits notifications 69for those characteristics at regular intervals. 70 71## `run_rfcomm_client.py` 72An app that connects to an RFComm server and bridges the RFComm channel to a local TCP socket 73 74## `run_rfcomm_server.py` 75An app that implements an RFComm server and, when a connection is received, bridges the channel to a local TCP socket 76 77## `run_scanner.py` 78An app that scan for BLE devices and print the advertisements received. 79