Category:LinuxHostTest2

Bluetooth Low Energy Wiki Main Page

Introduction
Due to the high demand regarding how to use the Bluetooth Low Energy solution from Texas Instruments under Linux, this script pretends to demonstrate how to manage from a terminal an USB dongle flashed with the HostTestRelease firmware.

This software consists of three parts: the user interface (bluetooth.py), a device-related class (BTDevice.py) and an event structure (HCIEvents.py) to capture all what happens within the BLE master during the several BLE states. Please remember to adjust the ttyACM* link within the code to fit your needs.

This linuxHostTest2 is less static than linuxHostTest, which simply executes in a sequential, non-variable way (which in turn can be useful for other purposes). The software is a little bit like a state machine.

Thanks to Harper04 for sharing this code! :) Good luck with your energy saving project.

Readme
Serial python package required (pyserial). Usage:


 * ls /dev/ttyACM*.
 * write the correct entry it into bluetooth.py. It can be also useful to "dmesg | grep ttyACM".
 * start with "python bluetooth.py".
 * type "d" for discovery.
 * type "e" for establishing the link.
 * type "1" for activating all notifications. "2" deactivates the notifications.
 * enjoy and type "t" for terminating the link.

Download
- linuxHostTest2.zip - Give it a try