Skip to content

Commit

Permalink
Initial framework and tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
liamw9534 committed May 14, 2014
0 parents commit 9d77035
Show file tree
Hide file tree
Showing 19 changed files with 2,211 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[report]
omit =
*/pyshared/*
*/python?.?/*
*/site-packages/nose/*
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

# Sphinx documentation
docs/_build/

18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python

python:
- "2.7_with_system_site_packages"

install:
- "wget -O - http://apt.mopidy.com/mopidy.gpg | sudo apt-key add -"
- "sudo wget -O /etc/apt/sources.list.d/mopidy.list http://apt.mopidy.com/mopidy.list"
- "sudo apt-get update || true"
- "sudo apt-get install mopidy"
- "sudo pip install --allow-unverified=mopidy coveralls flake8 mopidy==dev evdev"

script:
- "flake8 $(find . -iname "*.py")"
- "nosetests --with-coverage --cover-package=mopidy_evtdev"

after_success:
- "coveralls"
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include .coveragerc
include .travis.yml
include LICENSE
include MANIFEST.in
include README.rst

recursive-include tests *.py
59 changes: 59 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
****************************
BT-Manager
****************************

.. image:: https://pypip.in/version/BT-Manager/badge.png?latest
:target: https://pypi.python.org/pypi/BT-Manager/
:alt: Latest PyPI version

.. image:: https://pypip.in/download/BT-Manager/badge.png
:target: https://pypi.python.org/pypi/BT-Manager/
:alt: Number of PyPI downloads

.. image:: https://travis-ci.org/liamw9534/BT-Manager.png?branch=master
:target: https://travis-ci.org/liamw9534/BT-Manager
:alt: Travis CI build status

.. image:: https://coveralls.io/repos/liamw9534/BT-Manager/badge.png?branch=master
:target: https://coveralls.io/r/liamw9534/BT-Manager?branch=master
:alt: Test coverage

A library for managing bluetooth devices using Python, Bluez and DBus.

Installation
============

Install by running::

pip install BT-Manager


Project resources
=================

- `Source code <https://github.com/liamw9534/BT-Manager>`_
- `Issue tracker <https://github.com/liamw9534/BT-Manager/issues>`_
- `Download development snapshot <https://github.com/liamw9534/BT-Manager/archive/master.tar.gz#egg=BT-Manager-dev>`_


Changelog
=========

v0.1.0 (UNRELEASED)
----------------------------------------

Initial release supporting:

- Bluez 4.x compatibility (via DBus)
- List of available BT adapters
- Select default BT adapter
- List BT devices associated with BT adapter
- Get BT adapter properties
- Set BT adapter properties
- BT device discovery and notifications
- Get BT device properties
- Set BT device properties
- BT pairing agent
- Full and shortened UUID decoding for identifying supported services
- Class of device decoding to device service, major and minor classes
- Device vendors codes and names for device vendor decoding
70 changes: 70 additions & 0 deletions REQUIREMENTS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Requirements
============

Basic
=====

Support bluez 4.x and bluez 5.x
Enumerate available bluetooth adapters
Scan for devices in locality
Provide device connection quality metrics
Register devices with local registry
Unregister devices from local registry
Identify devices by capabilities
Handle device pairing

Design
======

AGENT

authorize
request PIN
request PASSKEY

DEVICE

list
services
create
disconnect
discover -> XML records attrib/value pairs
class e.g., 0x240414
name e.g., BTS-06
alias e.g., BTS-06
trusted boolean
blocked boolean

ADAPTER

list
address
name
powered
pairable
discoverable
discoverableTimeout
discovering

DBUS

connect
disconnect

DAEMON (bluetoothd)

version
start
stop
restart
debug on/off

CONFIGURATION

audio.conf
main.conf
input.conf
network.conf
proximity.conf
serial.conf
rfcomm.conf
Loading

0 comments on commit 9d77035

Please sign in to comment.