diff --git a/.gitignore b/.gitignore index b9b82d76..b7d730a3 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ dist/ # test file pygatt/bluegiga/test.py .tox +.eggs/ diff --git a/LICENSE b/LICENSE index dd364d24..70e16fcd 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/Makefile b/Makefile index e543ebad..a1272a09 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # # Source:: https://github.com/ampledata/pygatt # Author:: Greg Albrecht -# Copyright:: Copyright 2015 Orion Labs +# Copyright:: Copyright 2015 Orion Labs, Inc. # License:: Apache License, Version 2.0 # diff --git a/pygatt/backends/gatttool/gatttool.py b/pygatt/backends/gatttool/gatttool.py index 2b440738..dffbbbed 100644 --- a/pygatt/backends/gatttool/gatttool.py +++ b/pygatt/backends/gatttool/gatttool.py @@ -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. @@ -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 @@ -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 diff --git a/requirements.txt b/requirements.txt index 735ae110..dcb98150 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # # Source:: https://github.com/ampledata/pygatt # Author:: Greg Albrecht -# Copyright:: Copyright 2015 Orion Labs +# Copyright:: Copyright 2015 Orion Labs, Inc. # License:: Apache License, Version 2.0 diff --git a/setup.py b/setup.py index 17621515..40f4917f 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,10 @@ def publish(): 'pyserial', 'enum34' ], + setup_requires=[ + 'coverage >= 3.7.1', + 'nose >= 1.3.7' + ], extras_require={ 'GATTTOOL': ["pexpect"], },