No Description

gwillz a173ffc473 version bump 0.10.7 3 years ago
bgapi 25cccd473d fixed bad wr_noresp_by_uuid() 3 years ago
flash 35cf0c8090 changed default baud to 115200 3 years ago
parse bba7f225e1 pylint compliant, more import fixes 3 years ago
tests 05d97ae419 passable (non-functional) unit tests, pylint passing 3 years ago
.gitignore a2faf6297a fixed callback params 3 years ago
.gitlab-ci.yml 05d97ae419 passable (non-functional) unit tests, pylint passing 3 years ago
MANIFEST.in 03470521c1 BGAPI python library from source (bgapi 0.4 - https://github.com/mjbrown/bgapi). The BGAPI library is currently compatible with BLE11X Modules only. 4 years ago
README.md a173ffc473 version bump 0.10.7 3 years ago
requirements.txt 7bf65859f0 removed mk2 code, bgutils and avent dependencies 3 years ago
setup.cfg 03470521c1 BGAPI python library from source (bgapi 0.4 - https://github.com/mjbrown/bgapi). The BGAPI library is currently compatible with BLE11X Modules only. 4 years ago
setup.py a173ffc473 version bump 0.10.7 3 years ago

README.md

bgapi_py

build status coverage report

  • README Date: 28/06/2017
  • Version: 0.10.7
  • Silicon Labs Firmware Version: 2.1.1.0
  • Project: BGM111 with external host
  • License: Mozilla Public License 2.0 (MPL 2.0)

Authors

  • Authors: Michael Brown (creator)
  • Thomas Moyle (BGM111 update)
  • Gwilyn Saunders (stability and usability upgrades)

Overview

A Python library for using the bgm111 by Silicon Labs via a host microcontroller. This library is only tested to be compatible with the bgm111 module, however it should also be compatible with any BlueGecko-based chips (bgm113, bgm121, bgm123). BGAPI documentation by Silicon Labs should be used as a guide when using this library.

Ensure up to date documentation and firmware is used. The bgapi_py is platform independent.

The library was forked from Michael Brown's bgapi.py v0.4 available here. This fork has progressed to modularize much of the code and rename many of the API calls to the new 'Gecko version' of the API/firmware. This library is also Python 3+ focused, Python 2.7 compatibility is rarely tested.

Requirements

  • python2.7 or 3.3+
  • pyserial>=3.0

Installation

sudo apt-get install python3
pip install -r requirements.txt --user
python setup.py install --user

Tests

This project is prepared for pylint testing and contains unit tests in the tests/ folder. Usage below:

python3 -Bm pylint --reports=no bgapi

python3 -Bm coverage run --source=bgapi -m unittest tests
python3 -Bm coverage report -m

Flashing

This library includes a few files for flashing the BGM and configuring a RaspberryPi in the flash/ folder.

Bgapi

The bgapi.bgproj is a standard project for installing the bgapi onto a BGM chip with flow control at 230400 baud.

Flow Control on RPi

The uart-full.dtbo can be copied to the /boot/overlays/ folder to enable the correct uart pins on boot.

cp flash/uart-full.dtbo /boot/overlays/
echo 'dtoverlay=uart-full' >> /boot/config.txt
reboot