Warning

This documentation is actively being updated as the project evolves and may not be complete in all areas.

Bluetooth Low Energy (BLE) driver

jumpstarter-driver-ble provides communication functionality via ble with the DUT. The driver expects a ble service with a write and notify characteristic to send and receive data respectively.

Installation

$ pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple jumpstarter-driver-ble

Configuration

Example configuration:

export:
  ble:
    type: "jumpstarter_driver_ble.driver.BleWriteNotifyStream"
    config:
      address: "00:11:22:33:44:55"
      service_uuid: "0000180a-0000-1000-8000-000000000000"
      write_char_uuid: "0000fe41-8e22-4541-9d4c-000000000000"
      notify_char_uuid: "0000fe42-8e22-4541-9d4c-000000000000"

Config parameters

Parameter

Description

Type

Required

Default

address

BLE address to connect to

str

yes

service_uuid

BLE service uuid to connect to

str

yes

write_char_uuid

BLE write characteristic to send data to DUT

str

yes

notify_char_uuid

BLE notify characteristic to receive data from DUT

str

yes

API Reference

class jumpstarter_driver_ble.client.BleWriteNotifyStreamClient

Client interface for Bluetooth Low Energy (BLE) WriteNotifyStream driver.

This client allows to communication with BLE devices, by leveraging a:
  • write characteristic for sending data

  • notify characteristic for receiving data

info() str

Get BLE information about the target

open() fdspawn

Open a pexpect session. You can find the pexpect documentation here: https://pexpect.readthedocs.io/en/stable/api/pexpect.html#spawn-class

Returns:

fdspawn: The pexpect session object.

pexpect()

Create a pexpect adapter context manager.

Yields:

PexpectAdapter: The pexpect adapter object.

CLI

The ble driver client comes with a CLI tool that can be used to interact with the target device.

jumpstarter ⚡ local ➤ j ble
Usage: j ble [OPTIONS] COMMAND [ARGS]...

  ble client

Options:
  --help  Show this message and exit.

Commands:
  info           Get target information
  start-console  Start BLE console