Skip to content

Commit

Permalink
Merge remote-tracking branch 'ampledata/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
peplin committed Oct 19, 2015
2 parents 375ed83 + 8c73d62 commit 29c2144
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ dist/
# test file
pygatt/bluegiga/test.py
.tox
.eggs/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pygatt:

Copyright 2015 Stratos Inc.
Copyright 2015 Orion Labs
Copyright 2015 Orion Labs, Inc.
Copyright 2014 Christopher Peplin
Copyright 2013 Michael Saunby

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Source:: https://github.com/ampledata/pygatt
# Author:: Greg Albrecht <[email protected]>
# Copyright:: Copyright 2015 Orion Labs
# Copyright:: Copyright 2015 Orion Labs, Inc.
# License:: Apache License, Version 2.0
#

Expand Down
9 changes: 6 additions & 3 deletions pygatt/backends/gatttool/gatttool.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class GATTToolBackend(BLEBackend):
"""
_GATTTOOL_PROMPT = r".*> "

def __init__(self, hci_device='hci0', gatttool_logfile=None):
def __init__(self, hci_device='hci0', gatttool_logfile=None,
cli_options=None):
"""
Initialize.
Expand All @@ -54,6 +55,7 @@ def __init__(self, hci_device='hci0', gatttool_logfile=None):
input and output.
"""
self._hci_device = hci_device
self._cli_options = cli_options
self._connected_device = None
self._gatttool_logfile = gatttool_logfile
self._receiver = None # background notification receiving thread
Expand All @@ -75,12 +77,13 @@ def start(self):
self.reset()

# Start gatttool interactive session for device
gatttool_cmd = ' '.join([
gatttool_cmd = ' '.join(filter(None, [
'gatttool',
self._cli_options,
'-i',
self._hci_device,
'-I'
])
]))
log.debug('gatttool_cmd=%s', gatttool_cmd)
self._con = pexpect.spawn(gatttool_cmd, logfile=self._gatttool_logfile)
# Wait for response
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Source:: https://github.com/ampledata/pygatt
# Author:: Greg Albrecht <[email protected]>
# Copyright:: Copyright 2015 Orion Labs
# Copyright:: Copyright 2015 Orion Labs, Inc.
# License:: Apache License, Version 2.0


Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def publish():
'pyserial',
'enum34'
],
setup_requires=[
'coverage >= 3.7.1',
'nose >= 1.3.7'
],
extras_require={
'GATTTOOL': ["pexpect"],
},
Expand Down

0 comments on commit 29c2144

Please sign in to comment.