Giter Site home page Giter Site logo

hbldh / pymetawear Goto Github PK

View Code? Open in Web Editor NEW
43.0 12.0 19.0 5.94 MB

Community developed SDK around the Python bindings for the C++ SDK

Home Page: https://hbldh.github.io/pymetawear/

License: MIT License

Python 97.91% Shell 0.99% Makefile 1.10%
imu accelerometer gyroscope sensors sensor ble bluetooth magnetometer motion temperature

pymetawear's Introduction

PyMetaWear

https://img.shields.io/pypi/v/pymetawear

PyPI - License

https://dev.azure.com/hbldh/github/_apis/build/status/hbldh.pymetawear?branchName=master https://coveralls.io/repos/github/hbldh/pymetawear/badge.svg?branch=master

PyMetaWear is a community developed Python SDK started by Henrik Blidh . MbientLab does not provide support for this SDK.

Python package for connecting to and using MbientLab's MetaWear boards.

PyMetaWear can, from version 0.11.0, be used from both Windows and Linux. This is thanks to that the metawear package package is now depending on a new BLE library called PyWarble instead of gattlib. See installation instructions for more details about how to make it build on Windows.

Capabilities and Limitations

PyMetaWear was previously a wrapper around the MetaWear C++ API, providing a more Pythonic interface. In version 0.9.0 it instead becomes a wrapper around MetaWear's official Python SDK, doing the very same thing. The official SDK handles the actual board connections and communication while PyMetaWear aims to remove the low level feeling of interacting with the MetaWear board.

Installation

$ pip install pymetawear

Since version 0.11.0, the installation requirements for pymetawear has changed. See documentation for details on requirements for Linux and Windows respectively.

Documentation

Available in the Github pages of this repository.

Basic Usage

The MetaWear client can be used in two ways: either as Pythonic convenience class for handling a MetaWear board or as a simple communication client governed by the libmetawear C++ library.

Creating a client, and thus also setting up a Bluetooth connection to the MetaWear board, is equal for both the two usage profiles:

from pymetawear.client import MetaWearClient
c = MetaWearClient('DD:3A:7D:4D:56:F0')

Example

Blinking with the LED lights can be done like this with the convenience methods:

pattern = c.led.load_preset_pattern('blink', repeat_count=10)
c.led.write_pattern(pattern, 'g')
c.led.play()

or like this using the raw libmetawear shared library:

from ctypes import byref
from pymetawear import libmetawear
from mbientlab.metawear.cbindings import LedColor, LedPreset

pattern = Led.Pattern(repeat_count=10)
libmetawear.mbl_mw_led_load_preset_pattern(byref(pattern), LedPreset.BLINK)
libmetawear.mbl_mw_led_write_pattern(c.board, byref(pattern), LedColor.GREEN)
libmetawear.mbl_mw_led_play(c.board)

Bluetooth Low Energy Scanning

Actual addresses to your MetaWear board can be found by scanning with the included discover_devices method:

from pymetawear.discover import discover_devices
out = discover_devices()
print(out)
[(u'DD:3A:7D:4D:56:F0', u'MetaWear'), (u'FF:50:35:82:3B:5A', u'MetaWear')]

See the examples folder for more examples on how to use the libmetawear library with this client.

Modules

All functionality of the MetaWear C++ API is able to be used using the PyMetaWear client, and some of the modules have had convenience methods added to simplify the use of them. Below is a list of modules which have had their convenience methods written and one of modules that are awaiting such focus.

Completed Modules Unimplemented Modules
Accelerometer GPIO
Gyroscope NeoPixel
Haptic Color Detector
Switch Humidity
LED iBeacon
Barometer I2C
Magnetometer  
Temperature  
Settings  
Ambient Light  

pymetawear's People

Contributors

azure-pipelines[bot] avatar bgromov avatar dependabot-preview[bot] avatar dmatthes1982 avatar fragwuerdig avatar hbldh avatar lkasso avatar morgil avatar scaryghost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymetawear's Issues

Battery state cannot be read

Reading battery state with

libmetawear.mbl_mw_settings_read_battery_state(c.board)

leads to exception in the C++ library:

terminate called after throwing an instance of 'std::out_of_range'
    what():  _Map_base::at

Gyroscope + Accelerometer Integration

Thank you for this nice work. I am using it to get data from the sensor to Raspberry pi. Is it also possible to read both Accelerometer and Gyroscope values at once?

Data returned from sensor not valid json

  • pymetawear version: latest
  • Python version: 3.8
  • Operating System: windows 10

Description

{'epoch': 1583781566117, 'value': {x : 0.108, y : 0.768, z : 0.689}}

I am trying to parse this but it is not valid json. So I can not solve for x.
data['value']['x'] this fails.
I don't understand why data is semi json? Is there an extraction of x example?

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Sensor fusion callback only working intermittent?

I am using one of the metawear R sensors with an Ubuntu laptop (16.04) with pymetawear. The accelerometer and gyroscope examples are working fine at the moment, but the sensor fusion example is only working on an intermittent basis (more often than not, it is problematic). I can run the code a few times and everything is working then the code will run, but not streaming any data (I can connect to the sensor but the callback does not seem to be returning anything). I am out of ideas. Was wondering if anyone has run into the same problem.

Issues with other modules?

I have two scrips that work fine independently. Once uses OpenCV and one uses PyMetawear. When I try to combine them, things stop working.
Here is something similar to what I'm doing in open cv: https://gist.github.com/fraguada/42eeba928cf85b8ecc989b74d69d3635
Here is something similar to what I'm doing with PyMetawear: https://gist.github.com/fraguada/71456b09cf585c57206a52814e93c2ce

Both of these work independently. Now when I try to do something like this: https://gist.github.com/fraguada/e773518448ed1b7a6e34ea7cee0a68da (just importing the pymetawear modules) the script stops working. I do not get any errors, the script doesn't open the opencv window. If I get out of the script with keyboard interrupt, the camera is unavailable on the next run.

I'm on a Raspberry Pi 3 running Raspbian Debian Jessie and using Python 3.4.2 and I'm obviously not well versed in python, its modules, etc. Any pointers on how I could debug this would be appreciated.

Re-setting notifications for sensor fusion module

  • pymetawear version: v0.11.0
  • Python version: 2.7.10
  • Operating System: Linux / macOS

Description

I would like to selectively enable/disable notifications for the Sensor Fusion module, but with the current API / implementation it seems impossible.

What I Did

# Enable the following callbacks
self.mwc.sensorfusion.notifications(
    quaternion_callback = self.mwc_quat_cb,
    corrected_acc_callback = self.mwc_acc_cb,
    corrected_gyro_callback = self.mwc_gyro_cb)

# Disable just one
self.mwc.sensorfusion.notifications(
    quaternion_callback = self.mwc_quat_cb,
    corrected_acc_callback = None,
    corrected_gyro_callback = self.mwc_gyro_cb)

The second call to sensorfusion.notifications() results in exception:

Subscription to {0} signal already in place!

Obviously, if I omit the other two callback parameters the respective callbacks would be also disabled.

Is there a way to selectively enable/disable these notifications?

Thanks!

Bluetooth connection fails

Established connection (pygatt or pybluez) fails after random periods of time - particularly short if connected to multiple metawears and using acc, mag, gyr.

No matching distribution found for gattlib==0.20171002 (from metawear)

Noob here. I run on raspbian-stretch-lite... on a raspberrypi zero w

I have installed all the dependencies for gattlib and as you can see, gattlib version 0.20171002 was successfully installed.

These are the commands I typed in the terminal.

$ pip install git+https://github.com/mbientlab/pygattlib.git@master#egg=gattlib
$ pip install metawear

  • Successfully installed gattlib-0.20171002
  • pi@raspberrypi:~ $ pip install metawear
  • Collecting metawear
  • Collecting gattlib==0.20171002 (from metawear)
  • Could not find a version that satisfies the requirement gattlib==0.20171002 (from metawear) (from versions: 0.20150119.linux-x86_64, 0.20150119, 0.20150130, 0.20150131, 0.20150805) No matching distribution found for gattlib==0.20171002 (from metawear)

What did I do wrong?

I also tried $ pip install metawear --process-dependency-links and it gave the same error message

cannot import name 'discover_devices'

After building with python setup.py build and trying

from pymetawear.client import discover_devices

I get,

ImportError: cannot import name 'discover_devices'

System

python 3.6 from conda Fedora 25

Logging Support

Add functions at the Python level to wrap data signal logging and download.

Segmentation fault when connecting to an already connected device

If you call connect() for a MetaWearClient when it is already connected, Python dumps core.

I would expect some sort of clean failure, presumably an exception.

The underlying C++ library seems to throw an exception 'BLEPP::SocketConnectFailed'; Python does not handle it correctly.

If the existing MetaWearClient is disconnected, then the new MetaWearClient works correctly

$ .venv/bin/python3
>>> import pymetawear.client
>>> addr = 'EB:02:78:03:58:9D'
>>> dev = pymetawear.client.MetaWearClient(addr)
error 1603337254.958039: Error on line: 296 (src/blestatemachine.cc): Operation now in progress
Connected
Services disconvered
Characteristics discovered
Descriptors found
>>> dev.connect()
error 1603338727.078311: Error on line: 296 (src/blestatemachine.cc): Device or resource busy
terminate called after throwing an instance of 'BLEPP::SocketConnectFailed'
  what():  Device or resource busy
Aborted (core dumped)

Versions
pymetawear: 0.12.0
Python: python3
OS: Ubuntu 20.04

$ .venv/bin/pip3 freeze
certifi==2020.6.20
chardet==3.0.4
idna==2.10
metawear==0.7.0
pymetawear==0.12.0
requests==2.24.0
tqdm==4.50.2
urllib3==1.25.11
warble==1.2.0

Implement bluepy backend

Pygatt is based on parsing text output from gatttool and pymetawear should use a more direct C-binding approach.
PyBlueZ/pygattlib has proven problematic on newer platforms running newer BlueZ versions and it does not seem to be in active development.

A backend using bluepy should be implemented to try to overcome these problems, at least on Raspberry Pi. Might alleviate problems described in #7.

Accelerometer and Gyroscope Log data and download

  • pymetawear version: 0.11.0
  • Python version: 2.7
  • Operating System: Ubuntu 18.04.2 LTS

Description

I attempted to start logging data with specific parameters for the accelerometer and the gyroscope on my MMC board. The accelerometer settings are 25 Hz and 2.0 range and the gyroscope settings are 25 Hz and 2000.0 range.

After I stop the logging, I attempt to download the logged data and that is when I get the error shown in the traceback message.

My Code

from __future__ import division
from __future__ import print_function
from __future__ import absolute_import

import time

from pymetawear.client import MetaWearClient
from pymetawear.exceptions import PyMetaWearException, PyMetaWearDownloadTimeout
import pandas as pd

client = MetaWearClient('E6:36:15:BD:D1:44', debug=False)

print("Write accelerometer settings...")
client.accelerometer.set_settings(data_rate=25.0, data_range=2.0)
client.gyroscope.set_settings(data_rate=25.0, data_range=2000.0)

client.accelerometer.high_frequency_stream = False
client.gyroscope.high_frequency_stream = False

client.accelerometer.start_logging()
client.gyroscope.start_logging()

print("Logging accelerometer and gyroscope data...")

time.sleep(10.0)

client.accelerometer.stop_logging()
client.gyroscope.stop_logging()
print("Logging stopped.")

print("Downloading accelerometer data...")
download_done = False
n = 0
data = None
while (not download_done) and n < 3:
    try:
        data = client.accelerometer.download_log()
        download_done = True
    except PyMetaWearDownloadTimeout:
        print("Download of log interrupted. Trying to reconnect...")
        client.disconnect()
        client.connect()
        n += 1
if data is None:
    raise PyMetaWearException("Download of logging data failed.")


df=pd.DataFrame(data)
df.to_csv('Accelerometer_10.csv')

time.sleep(5.0)

print("Downloading gyroscope data...")
download_done = False
n = 0
dataG = None
while (not download_done) and n < 3:
    try:
        dataG = client.gyroscope.download_log()
        download_done = True
    except PyMetaWearDownloadTimeout:
        print("Download of log interrupted. Trying to reconnect...")
        client.disconnect()
        client.connect()
        n += 1
if data is None:
    raise PyMetaWearException("Download of logging data failed.")

df2=pd.DataFrame(dataG)
df2.to_csv('Gyroscope_10.csv')

print("Disconnecting...")
client.disconnect()

What I Did

From my understanding based on the traceback error message shown below is that in the pymetawear.modules.base.py the default callback only takes one argument and that is why only the accelerometer data is downloaded and the traceback error is given.

So it would be a logical assumption that if that issue is solved then it would work. But I wanted to ask if there is another way to log the data of different sensors on the MMC and download them without going through that hassle.

Thank you.

The traceback error message:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
TypeError: wrapper() takes exactly 1 argument (2 given)

LED.py doesn't work

I'm getting the following message when I run LED.py

edison@ubilinux:/home/pymetawear/examples$ sudo python led.py Traceback (most recent call last): File "led.py", line 21, in <module> from pymetawear.client import discover_devices, MetaWearClient, libmetawear File "/home/pymetawear/pymetawear/client.py", line 30, in <module> from pymetawear.backends.pygatt import PyGattBackend File "/home/pymetawear/pymetawear/backends/pygatt/__init__.py", line 22, in <module> from pymetawear.backends.pygatt.gatttool import PyMetaWearGATTToolBackend File "/home/pymetawear/pymetawear/backends/pygatt/gatttool.py", line 18, in <module> import pygatt File "/usr/local/lib/python2.7/dist-packages/pygatt/__init__.py", line 3, in <module> from .backends import BGAPIBackend, GATTToolBackend # noqa File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/__init__.py", line 2, in <module> from .bgapi.bgapi import BGAPIBackend # noqa File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/bgapi/bgapi.py", line 9, in <module> import serial ImportError: No module named serial edison@ubilinux:/home/pymetawear/examples$

gattlib error

sudo pip install gattlib gives error:

``edison@ubilinux:/home/pymetawear$ sudo pip install gattlib
Downloading/unpacking gattlib
Downloading gattlib-0.20150805.tar.gz (1.7Mb): 1.7Mb downloaded
Running setup.py egg_info for package gattlib

Installing collected packages: gattlib
Running setup.py install for gattlib
building 'gattlib' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/gattservices.cpp -o build/temp.linux-i686-2.7/src/gattservices.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/beacon.cpp -o build/temp.linux-i686-2.7/src/beacon.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bindings.cpp -o build/temp.linux-i686-2.7/src/bindings.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/gattlib.cpp -o build/temp.linux-i686-2.7/src/gattlib.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/lib/uuid.c -o build/temp.linux-i686-2.7/src/bluez/lib/uuid.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/attrib/gatt.c -o build/temp.linux-i686-2.7/src/bluez/attrib/gatt.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/attrib/gattrib.c -o build/temp.linux-i686-2.7/src/bluez/attrib/gattrib.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/attrib/utils.c -o build/temp.linux-i686-2.7/src/bluez/attrib/utils.o
src/bluez/attrib/utils.c: In function ‘gatt_connect’:
src/bluez/attrib/utils.c:66:15: error: ‘BDADDR_LE_RANDOM’ undeclared (first use in this function)
src/bluez/attrib/utils.c:66:15: note: each undeclared identifier is reported only once for each function it appears in
src/bluez/attrib/utils.c:68:15: error: ‘BDADDR_LE_PUBLIC’ undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;file='/home/pymetawear/build/gattlib/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-APzINk-record/install-record.txt:
running install

running build

running build_ext

building 'gattlib' extension

creating build

creating build/temp.linux-i686-2.7

creating build/temp.linux-i686-2.7/src

creating build/temp.linux-i686-2.7/src/bluez

creating build/temp.linux-i686-2.7/src/bluez/lib

creating build/temp.linux-i686-2.7/src/bluez/attrib

creating build/temp.linux-i686-2.7/src/bluez/src

creating build/temp.linux-i686-2.7/src/bluez/src/shared

creating build/temp.linux-i686-2.7/src/bluez/btio

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/gattservices.cpp -o build/temp.linux-i686-2.7/src/gattservices.o

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/beacon.cpp -o build/temp.linux-i686-2.7/src/beacon.o

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bindings.cpp -o build/temp.linux-i686-2.7/src/bindings.o

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/gattlib.cpp -o build/temp.linux-i686-2.7/src/gattlib.o

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/lib/uuid.c -o build/temp.linux-i686-2.7/src/bluez/lib/uuid.o

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/attrib/gatt.c -o build/temp.linux-i686-2.7/src/bluez/attrib/gatt.o

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/attrib/gattrib.c -o build/temp.linux-i686-2.7/src/bluez/attrib/gattrib.o

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bluez/attrib/utils.c -o build/temp.linux-i686-2.7/src/bluez/attrib/utils.o

src/bluez/attrib/utils.c: In function ‘gatt_connect’:

src/bluez/attrib/utils.c:66:15: error: ‘BDADDR_LE_RANDOM’ undeclared (first use in this function)

src/bluez/attrib/utils.c:66:15: note: each undeclared identifier is reported only once for each function it appears in

src/bluez/attrib/utils.c:68:15: error: ‘BDADDR_LE_PUBLIC’ undeclared (first use in this function)

error: command 'gcc' failed with exit status 1


Command /usr/bin/python -c "import setuptools;file='/home/pymetawear/build/gattlib/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-APzINk-record/install-record.txt failed with error code 1 in /home/pymetawear/build/gattlib
Storing complete log in /root/.pip/pip.log
edison@ubilinux:/home/pymetawear$

pip.zip

Serialize Board State

At least serialize the board state after initialization and deserialize if available after connect. This will shortcut the API initialization if the board's firmware has not changed.

Minor mistake on documentation

  • pymetawear version:
  • Python version:
  • Operating System:

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

I just wanted to let you know there is a minor mistake in the documentation. For the discovering addresses API example you import from "pymetawear.client". Not sure if there was some change on the code of client.py, but the discovery_devices() method is on the discover.py file. Therefore the example should import from "pymetawear.discover"

Implement Adafruit Python BluefruitLE backend

Pygatt is based on parsing text output from gatttool and pymetawear should use a more direct C-binding appraoch.
PyBlueZ/pygattlib has proven problematic on newer platforms running newer BlueZ versions and it does not seem to be in active development.

A backend using Adafruit Python BluefruitLE should be implemented to try to overcome these problems. Might alleviate problems described in #7.

Problems with epoch time for accelerometer

  • pymetawear version: 0.12.0
  • Python version: 3.7.6
  • Operating System: Windows 10

Description

I was getting the accelerometer data, and I noticed that there were some packet lost which is expected from bluetooth from what I hear. I was trying to find the lost packages by using the difference between epoch times, but this time is pretty sporadic and can vary between 0 ms and a couple hundred. Because of this, I don't know where the packets are being lost.

What I Did

I initially had much more complicated code that could be causing problems with the epoch numbers and data transmission, so I wrote the simplest code possible to test my problem.

Code

from pymetawear.client import MetaWearClient
from time import sleep

c = MetaWearClient('C2:B2:CE:9B:B7:C6', debug=True)

sample_rate = 25.0

c.accelerometer.set_settings(data_rate=sample_rate, data_range=8)

def callback(data):
    print(data["epoch"])

c.accelerometer.notifications(callback) #Start Notifications

sleep(1.0) 

c.accelerometer.notifications() #Turn off Notifications

c.disconnect()

Run

python test.py

2020-04-02 12:17:44,329 DEBUG Added a logging handler to logger: pymetawear
2020-04-02 12:17:44,330 INFO Creating MetaWearClient for C2:B2:CE:9B:B7:C6...
2020-04-02 12:17:44,345 DEBUG Client started for BLE device C2:B2:CE:9B:B7:C6...
2020-04-02 12:17:49,330 DEBUG Setting Accelerometer ODR to 25.0
2020-04-02 12:17:49,330 DEBUG Setting Accelerometer FSR to 8.0
2020-04-02 12:17:49,342 DEBUG Subscribing to Accelerometer changes. (Sig#: 2791206498272)
2020-04-02 12:17:49,348 DEBUG Start Sampling (Accelerometer)
1585801069638
1585801069639
1585801069698
1585801069758
1585801069759
1585801069818
1585801069878
1585801069879
1585801069938
1585801069998
1585801069999
1585801070118
1585801070119
1585801070119
1585801070178
1585801070238
1585801070239
1585801070298
2020-04-02 12:17:50,350 DEBUG Unsubscribing to Accelerometer changes. (Sig#: 2791206498272)

To make the results more readable, I put it in the table below.

Sample Number epoch (ms) Time Between Timestamps (ms)
1 1585801069638
2 1585801069639 1
3 1585801069698 59
4 1585801069758 60
5 1585801069759 1
6 1585801069818 59
7 1585801069878 60
8 1585801069879 1
9 1585801069938 59
10 1585801069998 60
11 1585801069999 1
12 1585801070118 119
13 1585801070119 1
14 1585801070119 0
15 1585801070178 59
16 1585801070238 60
17 1585801070239 1
18 1585801070298 59

Note that since the sample rate is 25 samples per second and the sample period was 1 second, the number of samples should be about 25. This also means that the time between timestamps should be about 40 ms.

While I can estimate data that is lost, but I don't know where the samples were lost.

When I use the metawear app on my iPhone, I don't notice any problems with time between samples being wrong or major differences between expected number of samples and actual number of samples, so I don't think this is a problem with the hardware.

Thanks!

Can't import 'FnVoid_DataP' from 'mbientlab.metawear.cbindings'

  • pymetawear version: 0.12.0
  • Python version: 3.7
  • Operating System: ubuntu 20.04

Description

I'm trying to run metawear_node.py in ROS (noetic version) hosted by a Raspberry Pi 4. An import error came up saying "cannot import name 'FnVoid_DataP' from 'mbientlab.metawear.cbindings'". I paste the error message as below.

ubuntu@ubuntu:~/lciii_ws$ rosrun metawear_ros metawear_node.py 
Traceback (most recent call last):
  File "/home/ubuntu/lciii_ws/src/metawear_ros-master/scripts/metawear_node.py", line 9, in <module>
    from pymetawear.client import MetaWearClient
  File "/usr/local/lib/python3.7/dist-packages/pymetawear/client.py", line 22, in <module>
    from pymetawear import add_stream_logger, modules
  File "/usr/local/lib/python3.7/dist-packages/pymetawear/modules/__init__.py", line 16, in <module>
    from .base import PyMetaWearModule, Modules
  File "/usr/local/lib/python3.7/dist-packages/pymetawear/modules/base.py", line 22, in <module>
    from mbientlab.metawear.cbindings import FnVoid_DataP, DataTypeId, \
ImportError: cannot import name 'FnVoid_DataP' from 'mbientlab.metawear.cbindings' (/usr/local/lib/python3.7/dist-packages/mbientlab/metawear/cbindings.py)

What I Did

I checked the metawear cbindings.py file and found there was no class or variable called FnVoid_DataP (see the screenshot below). I noticed that this file was generated by MetaWear C++ API. So I tried to re-install the Metawear python package but it still didn't work.

Screenshot from 2023-05-30 01-01-20

Hope you can share some clues to help me address the issue.

Reading analog input

Would pymetawear be able to read analog signal from the board? I had a pulse sensor attached to it, and I was wondering if it is possible to read the signal through python.

No output from accelerometer example

I am able to successfully connect to my MetawearRG using my Raspberry Pi Zero, and subsequently blink the led using the led script. However, when running the accelerometer example, I am not seeing any output from the notification callback function. Even when running in debug mode, nothing happens after running the c.accelerometer.notifications(acc_callback) line. Is this a known issue, or am I missing something here? Thanks!

No bluetooth device found on Ubuntu bash (this is a new feature in Windows 10)

Hi,

Is there any solution please to be able to activate the Bluetooth device from the Ubuntu bash?
hcitool dev
gives no device

By running your example led.py from Spyder I get this error:

runfile('/mnt/c/Users/iLivi/Documents/Linux/pymetawear/examples/led.py', wdir=r'/mnt/c/Users/iLivi/Documents/Linux/pymetawear/examples')
Discovering nearby Bluetooth Low Energy devices...
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile
execfile(filename, namespace)
File "/mnt/c/Users/iLivi/Documents/Linux/pymetawear/examples/led.py", line 22, in
address = scan_and_select_le_device()
File "discover.py", line 26, in scan_and_select_le_device
ble_devices = discover_devices(timeout=timeout)
File "/mnt/c/Users/iLivi/Documents/Linux/pymetawear/pymetawear/client.py", line 70, in discover_devices
os.kill(p.pid, signal.SIGINT)
OSError: [Errno 3] No such process

May you please help out? Thanks!

Error at "building wheel" when installing

  • pymetawear version: most recent
  • Python version: 3.7
  • Operating System: Windows 10

Description

I tried to install the build with pip in cmd run as admin, I got a build error when "building wheel". Something with the MetaWear.Win32.dll file.

What I Did

I have installed VS2017 community, the win to sdk version, warble and pywarble without errors. Now suddenly can't get any further. than the errors from the command in cmd.

Help is very much appreciated, I am new to programming but I am studying it a lot right now. I am very exited to use python with my metamotion!
/Greetings from Sweden

C:\WINDOWS\system32>py -m pip install pymetawear
Collecting pymetawear
  Using cached https://files.pythonhosted.org/packages/c9/cc/dbc0eede0db795848ffd3b51a170a818df40420466b256361a66b9281e1c/pymetawear-0.11.0-py2.py3-none-any.whl
Requirement already satisfied: tqdm in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from pymetawear) (4.25.0)
Collecting metawear==0.5.0 (from pymetawear)
  Using cached https://files.pythonhosted.org/packages/cc/47/ace0feea8cb880b4dfe4b7a2099a0b89cc9a76acdaa23ea87d25bbcdc2ff/metawear-0.5.0.tar.gz
Requirement already satisfied: warble<2.0,>=1.1 in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from metawear==0.5.0->pymetawear) (1.1.0)
Requirement already satisfied: requests in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from metawear==0.5.0->pymetawear) (2.19.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from requests->metawear==0.5.0->pymetawear) (2018.8.24)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from requests->metawear==0.5.0->pymetawear) (1.23)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from requests->metawear==0.5.0->pymetawear) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in c:\users\thors\appdata\local\programs\python\python37-32\lib\site-packages (from requests->metawear==0.5.0->pymetawear) (2.7)
Building wheels for collected packages: metawear
  Running setup.py bdist_wheel for metawear ... error
  Complete output from command C:\Users\thors\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\thors\\AppData\\Local\\Temp\\pip-install-th0eyhsa\\metawear\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\thors\AppData\Local\Temp\pip-wheel-ug99r3st --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  Microsoft (R) Build Engine version 15.8.168+ga8fba1ebd7 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.

  Build started 2018-09-13 18:29:08.
  Project "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" on node 1 (default targets).
  PrepareForBuild:
    Creating directory "build\Win32\Release\MetaWear.Win32\".
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    Creating directory "dist\Release\lib\Win32\".
    Creating directory "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\".
  InitializeBuildStatus:
    Creating "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
  ClCompile:
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\CL.exe /c /Zi /nologo /W3 /WX- /diagnostics:classic /O2 /Oi /Oy- /GL /D METAWEAR_DLL_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"build\Win32\Release\MetaWear.Win32\\" /Fd"build\Win32\Release\MetaWear.Win32\vc141.pdb" /Gd /TP /analyze- /FC /errorReport:queue src\metawear\core\cpp\anonymous_datasignal.cpp src\metawear\core\cpp\datasignal.cpp src\metawear\core\cpp\debug.cpp src\metawear\core\cpp\event.cpp src\metawear\core\cpp\logging.cpp src\metawear\core\cpp\macro.cpp src\metawear\core\cpp\moduleinfo.cpp src\metawear\core\cpp\responseheader.cpp src\metawear\core\cpp\settings.cpp src\metawear\core\cpp\timer.cpp src\metawear\core\cpp\version.cpp src\metawear\dfu\cpp\dfu_operations.cpp src\metawear\dfu\cpp\dfu_operations_details.cpp src\metawear\dfu\cpp\dfu_utility.cpp src\metawear\dfu\cpp\file_operations.cpp src\metawear\dfu\cpp\miniz.cpp src\metawear\impl\cpp\datainterpreter.cpp src\metawear\impl\cpp\metawearboard.cpp src\metawear\peripheral\cpp\haptic.cpp src\metawear\peripheral\cpp\ibeacon.cpp src\metawear\peripheral\cpp\led.cpp src\metawear\peripheral\cpp\neopixel.cpp src\metawear\platform\cpp\async_creator.cpp src\metawear\platform\cpp\memory.cpp src\metawear\platform\cpp\task.cpp src\metawear\platform\cpp\threadpool.cpp src\metawear\processor\cpp\dataprocessor.cpp src\metawear\processor\cpp\dataprocessor_config.cpp src\metawear\sensor\cpp\accelerometer.cpp src\metawear\sensor\cpp\accelerometer_bosch.cpp src\metawear\sensor\cpp\accelerometer_mma8452q.cpp src\metawear\sensor\cpp\ambientlight_ltr329.cpp src\metawear\sensor\cpp\barometer_bosch.cpp src\metawear\sensor\cpp\colordetector_tcs34725.cpp src\metawear\sensor\cpp\conductance.cpp src\metawear\sensor\cpp\gpio.cpp src\metawear\sensor\cpp\gyro_bmi160.cpp src\metawear\sensor\cpp\humidity_bme280.cpp src\metawear\sensor\cpp\magnetometer_bmm150.cpp src\metawear\sensor\cpp\multichanneltemperature.cpp src\metawear\sensor\cpp\proximity_tsl2671.cpp src\metawear\sensor\cpp\sensor_fusion.cpp src\metawear\sensor\cpp\serialpassthrough.cpp src\metawear\sensor\cpp\switch.cpp src\metawear\sensor\cpp\utils.cpp
    anonymous_datasignal.cpp
    datasignal.cpp
    debug.cpp
    event.cpp
    logging.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\logging.cpp(318): warning C4244: 'initializing': conversion from 'float' to 'uint32_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\logging.cpp(674): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    macro.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\macro.cpp(41): warning C4267: 'argument': conversion from 'size_t' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    moduleinfo.cpp
    responseheader.cpp
    settings.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\settings.cpp(89): warning C4244: '/=': conversion from 'float' to 'uint16_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    timer.cpp
    version.cpp
    dfu_operations.cpp
    dfu_operations_details.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\dfu_operations_details.cpp(76): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    dfu_utility.cpp
    file_operations.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\file_operations.cpp(43): warning C4244: '=': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\file_operations.cpp(76): warning C4244: '=': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\file_operations.cpp(157): warning C4244: '=': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    miniz.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\miniz.cpp(4867): warning C4244: '=': conversion from 'mz_uint64' to 'size_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    datainterpreter.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\impl\cpp\datainterpreter.cpp(265): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\program files (x86)\windows kits\10\include\10.0.17134.0\ucrt\stdio.h(1774): note: see declaration of 'sprintf'
    metawearboard.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\impl\cpp\metawearboard.cpp(651): warning C4267: '=': conversion from 'size_t' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    haptic.cpp
    ibeacon.cpp
    Compiling...
    led.cpp
    neopixel.cpp
    async_creator.cpp
    memory.cpp
    task.cpp
    threadpool.cpp
    dataprocessor.cpp
    dataprocessor_config.cpp
    accelerometer.cpp
    accelerometer_bosch.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\accelerometer_bosch.cpp(529): warning C4244: '=': conversion from 'float' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\accelerometer_bosch.cpp(534): warning C4244: '=': conversion from 'float' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    accelerometer_mma8452q.cpp
    ambientlight_ltr329.cpp
    barometer_bosch.cpp
    colordetector_tcs34725.cpp
    conductance.cpp
    gpio.cpp
    gyro_bmi160.cpp
    humidity_bme280.cpp
    magnetometer_bmm150.cpp
    multichanneltemperature.cpp
    Compiling...
    proximity_tsl2671.cpp
    sensor_fusion.cpp
    serialpassthrough.cpp
    switch.cpp
    utils.cpp
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\utils.cpp(20): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\program files (x86)\windows kits\10\include\10.0.17134.0\ucrt\stdio.h(1774): note: see declaration of 'sprintf'
  c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\utils.cpp(26): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\program files (x86)\windows kits\10\include\10.0.17134.0\ucrt\string.h(133): note: see declaration of 'strcpy'
  Link:
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"dist\Release\lib\Win32\MetaWear.Win32.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"dist\Release\lib\Win32\MetaWear.Win32.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG:incremental /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"dist\Release\lib\Win32\MetaWear.Win32.lib" /MACHINE:X86 /SAFESEH /DLL build\Win32\Release\MetaWear.Win32\anonymous_datasignal.obj
    build\Win32\Release\MetaWear.Win32\datasignal.obj
    build\Win32\Release\MetaWear.Win32\debug.obj
    build\Win32\Release\MetaWear.Win32\event.obj
    build\Win32\Release\MetaWear.Win32\logging.obj
    build\Win32\Release\MetaWear.Win32\macro.obj
    build\Win32\Release\MetaWear.Win32\moduleinfo.obj
    build\Win32\Release\MetaWear.Win32\responseheader.obj
    build\Win32\Release\MetaWear.Win32\settings.obj
    build\Win32\Release\MetaWear.Win32\timer.obj
    build\Win32\Release\MetaWear.Win32\version.obj
    build\Win32\Release\MetaWear.Win32\dfu_operations.obj
    build\Win32\Release\MetaWear.Win32\dfu_operations_details.obj
    build\Win32\Release\MetaWear.Win32\dfu_utility.obj
    build\Win32\Release\MetaWear.Win32\file_operations.obj
    build\Win32\Release\MetaWear.Win32\miniz.obj
    build\Win32\Release\MetaWear.Win32\datainterpreter.obj
    build\Win32\Release\MetaWear.Win32\metawearboard.obj
    build\Win32\Release\MetaWear.Win32\haptic.obj
    build\Win32\Release\MetaWear.Win32\ibeacon.obj
    build\Win32\Release\MetaWear.Win32\led.obj
    build\Win32\Release\MetaWear.Win32\neopixel.obj
    build\Win32\Release\MetaWear.Win32\async_creator.obj
    build\Win32\Release\MetaWear.Win32\memory.obj
    build\Win32\Release\MetaWear.Win32\task.obj
    build\Win32\Release\MetaWear.Win32\threadpool.obj
    build\Win32\Release\MetaWear.Win32\dataprocessor.obj
    build\Win32\Release\MetaWear.Win32\dataprocessor_config.obj
    build\Win32\Release\MetaWear.Win32\accelerometer.obj
    build\Win32\Release\MetaWear.Win32\accelerometer_bosch.obj
    build\Win32\Release\MetaWear.Win32\accelerometer_mma8452q.obj
    build\Win32\Release\MetaWear.Win32\ambientlight_ltr329.obj
    build\Win32\Release\MetaWear.Win32\barometer_bosch.obj
    build\Win32\Release\MetaWear.Win32\colordetector_tcs34725.obj
    build\Win32\Release\MetaWear.Win32\conductance.obj
    build\Win32\Release\MetaWear.Win32\gpio.obj
    build\Win32\Release\MetaWear.Win32\gyro_bmi160.obj
    build\Win32\Release\MetaWear.Win32\humidity_bme280.obj
    build\Win32\Release\MetaWear.Win32\magnetometer_bmm150.obj
    build\Win32\Release\MetaWear.Win32\multichanneltemperature.obj
    build\Win32\Release\MetaWear.Win32\proximity_tsl2671.obj
    build\Win32\Release\MetaWear.Win32\sensor_fusion.obj
    build\Win32\Release\MetaWear.Win32\serialpassthrough.obj
    build\Win32\Release\MetaWear.Win32\switch.obj
    build\Win32\Release\MetaWear.Win32\utils.obj
       Creating library dist\Release\lib\Win32\MetaWear.Win32.lib and object dist\Release\lib\Win32\MetaWear.Win32.exp
    Generating code
    All 9417 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
    Finished generating code
    MetaWear.Win32.vcxproj -> C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\dist\Release\lib\Win32\MetaWear.Win32.dll
  FinalizeBuildStatus:
    Deleting file "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\unsuccessfulbuild".
    Touching "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\MetaWear.Win32.lastbuildstate".
  Done Building Project "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" (default targets).

  Build succeeded.

  "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" (default target) (1) ->
  (PrepareForBuild target) ->
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]


  "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" (default target) (1) ->
  (ClCompile target) ->
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\logging.cpp(318): warning C4244: 'initializing': conversion from 'float' to 'uint32_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\logging.cpp(674): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\macro.cpp(41): warning C4267: 'argument': conversion from 'size_t' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\core\cpp\settings.cpp(89): warning C4244: '/=': conversion from 'float' to 'uint16_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\dfu_operations_details.cpp(76): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\file_operations.cpp(43): warning C4244: '=': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\file_operations.cpp(76): warning C4244: '=': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\file_operations.cpp(157): warning C4244: '=': conversion from 'double' to 'int', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\dfu\cpp\miniz.cpp(4867): warning C4244: '=': conversion from 'mz_uint64' to 'size_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\impl\cpp\datainterpreter.cpp(265): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\impl\cpp\metawearboard.cpp(651): warning C4267: '=': conversion from 'size_t' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\accelerometer_bosch.cpp(529): warning C4244: '=': conversion from 'float' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\accelerometer_bosch.cpp(534): warning C4244: '=': conversion from 'float' to 'uint8_t', possible loss of data [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\utils.cpp(20): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    c:\users\thors\appdata\local\temp\pip-install-th0eyhsa\metawear\metawear-sdk-cpp\src\metawear\sensor\cpp\utils.cpp(26): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]

      16 Warning(s)
      0 Error(s)

  Time Elapsed 00:00:40.82
  error: [Errno 2] No such file or directory: 'C:\\Users\\thors\\AppData\\Local\\Temp\\pip-install-th0eyhsa\\metawear\\MetaWear-SDK-Cpp\\dist\\release\\lib\\x86\\MetaWear.Win32.dll'

  ----------------------------------------
  Failed building wheel for metawear
  Running setup.py clean for metawear
Failed to build metawear
Installing collected packages: metawear, pymetawear
  Running setup.py install for metawear ... error
    Complete output from command C:\Users\thors\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\thors\\AppData\\Local\\Temp\\pip-install-th0eyhsa\\metawear\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\thors\AppData\Local\Temp\pip-record-cilr31n9\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    Microsoft (R) Build Engine version 15.8.168+ga8fba1ebd7 for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 2018-09-13 18:29:50.
    Project "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" on node 1 (default targets).
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]
    InitializeBuildStatus:
      Creating "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
    ClCompile:
      All outputs are up-to-date.
    Link:
      All outputs are up-to-date.
      MetaWear.Win32.vcxproj -> C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\dist\Release\lib\Win32\MetaWear.Win32.dll
    FinalizeBuildStatus:
      Deleting file "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\unsuccessfulbuild".
      Touching "build\Win32\Release\MetaWear.Win32\MetaWear.Win32.tlog\MetaWear.Win32.lastbuildstate".
    Done Building Project "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" (default targets).

    Build succeeded.

    "C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj" (default target) (1) ->
    (PrepareForBuild target) ->
      C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\MetaWear-SDK-Cpp\MetaWear.Win32.vcxproj]

        1 Warning(s)
        0 Error(s)

    Time Elapsed 00:00:00.40
    error: [Errno 2] No such file or directory: 'C:\\Users\\thors\\AppData\\Local\\Temp\\pip-install-th0eyhsa\\metawear\\MetaWear-SDK-Cpp\\dist\\release\\lib\\x86\\MetaWear.Win32.dll'

    ----------------------------------------
Command "C:\Users\thors\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\thors\\AppData\\Local\\Temp\\pip-install-th0eyhsa\\metawear\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\thors\AppData\Local\Temp\pip-record-cilr31n9\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\thors\AppData\Local\Temp\pip-install-th0eyhsa\metawear\

C:\WINDOWS\system32>

Bluetooth RSSI value

Hi,
Is there a way to get bluetooth RSSI value using pymetawear or some other dependent libraries ?

Thanks in advance.

Aman.

SensorFusion module drifting (yaw)

  • pymetawear version: 0.11.0
  • Python version: 3.6.6
  • Operating System: Windows 10

Description

I have a metamotion C. My goal is to get pitch/roll/yaw rotation with the SensorFusion module. Pitch and roll are no problem, but the yaw seems to constantly drift depending on how we handle the sensor. I saw the same type of drifting in the metawear's metabase app, but I was wondering if I'm missing something to prevent this drifting from happening via pymetawear.

Thanks !

What I Did

I started with the example code you published and I get the data via:
c.sensorfusion.notifications(euler_angle_callback=handle_notification)

I also tried all SensorFusion modes, but even if IMUPlus seems more accurate, it always ends up drifting the yaw :
c.sensorfusion.set_mode(SensorFusionMode.IMU_PLUS)

pygatt not working

Hello, I was using your previous version since last week (the original 5.0 which was on develop, not the 5.0a1) but as I've seen your latest commits, I wanted to update to the latest working version. I tried master, develop and then figured out that I maybe needed to try pygatt-py3 which is the version that I'm on now. Only problem is that even when loading your examples (accelerometer for example) well I have this error (see image).

2016-09-14-121616_1920x1080_scrot

It seems to ask for latest pygatt+gatttool (which are already installed !) so I don't get it. On master branch I had an error with "basestring" not being defined. If you need more infos about this one too let me know.

I'm on a raspberry pi 3 with latest jessie version.

segmentation fault while setting set_sample_delay in sensor fusion

i am using Pymetawear on CentOS 7 with 2 MetaMotion R boards and i am trying to get the the SensorFusion Quat working with sample delay 20 using:
device.sensorfusion.set_sample_delay(SensorFusion.DATA_QUATERION , 20)

the code runs normally and when gets to setting the the sample delay i get sensor fusion
i used some prints to trace the the source of the segmentation fault and i found out it happen from the sensor fusion module in modules when it trys to create a new data processor:
libmetawear.mbl_mw_dataprocessor_time_create(
self._data_source_signals[data_source],
mode,
delay,
Fn_VoidPtr(processor_set))

if is use device.sensorfusion.set_sample_delay(SensorFusion.DATA_QUATERION) without a sample delay it works fine but i have way of controlling the data rate of sensor fusion

any help will be appreciated i am new to this filed

LED.py doesn't work

I'm getting the following message when I run LED.py

edison@ubilinux:/home/pymetawear/examples$ sudo python led.py Traceback (most recent call last): File "led.py", line 21, in <module> from pymetawear.client import discover_devices, MetaWearClient, libmetawear File "/home/pymetawear/pymetawear/client.py", line 30, in <module> from pymetawear.backends.pygatt import PyGattBackend File "/home/pymetawear/pymetawear/backends/pygatt/__init__.py", line 22, in <module> from pymetawear.backends.pygatt.gatttool import PyMetaWearGATTToolBackend File "/home/pymetawear/pymetawear/backends/pygatt/gatttool.py", line 18, in <module> import pygatt File "/usr/local/lib/python2.7/dist-packages/pygatt/__init__.py", line 3, in <module> from .backends import BGAPIBackend, GATTToolBackend # noqa File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/__init__.py", line 2, in <module> from .bgapi.bgapi import BGAPIBackend # noqa File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/bgapi/bgapi.py", line 9, in <module> import serial ImportError: No module named serial edison@ubilinux:/home/pymetawear/examples$

C.H.I.P computer freeze using pymetawear

Hello everyone!

I'm using pymetawear on a raspberry pi model B without any problem. Everything works good and the stability is perfect.
If I try to move my project on a CHIP computer ( https://getchip.com ) the device completely freeze after acquiring a bunch of accelerometer samples. The only way I have to interact with the shell again is to turn off CHIP computer (unplugging the power adapter) an turn on it again.
Someone noticed the same problematics?
The same problem can be reproduced with accelerometer.py example setting 1hz as samplerate and incrementing the delay to wait for a freeze.
Both devices (raspberry and CHIP) have jessie installed. Not sure if the problem is related to pymetawear or C++ metawear library, or CHIP computer itself.

libmetawear.so is not being built because of -Werror

Greetings,

I am attempting to install this package and upon attempting to import any of the code I get an error,
/home/josh/git/pymetawear/pymetawear/libmetawear.so: cannot open shared object file: No such file or directory
I installed by python setup.py build.
Actually, I notice there are some warnings that appear and you have the compiler flat -Werror set which treats warnings as an error.
After removing -Werror from pymetawear/MetaWear-SDK-Cpp/config.mk everything compiles.

If you would like a list of the warning I can send these.

System

python 3.6 from conda, Fedora 25

Notifications?

I want to read the MetaEear switch state as a notification. When the switch is pressed I want to be notified. Is it supported?

[minor] Temperature module warning

Hello,
Nothing too bad hopefully, but you should change the warning on line 160 inside temperature module because for now it is saying "no battery callback is registered !" and it is quite confusing the 1st time when debugging ahah
keep up the good work !

Ignore already subscribed sensorfusion notification

Right now the sensorfusion module raises an exception if you try to subscribe to an already subscribed data signal. There is a use case (my use case) where this is not desirable:

Consider that I want to get the quaternion, but sometimes I also want acc/gyro data. I use a function like this:

    def enable_accgyro(self, enabled=True):
        if enabled:
            print("Subscribing to Sensor Fusion Quat/Acc/Gyro signal notifications...")
            self.c.sensorfusion.notifications(quaternion_callback=self.handle_quat,
                                              corrected_acc_callback=self.handle_acc,
                                              corrected_gyro_callback=self.handle_gyro)
        else:
            print("Subscribing to Sensor Fusion Quaternion signal notifications...")
            self.c.sensorfusion.notifications(quaternion_callback=self.handle_quat)

As you can see, if I have sensor.enable_accgyro(False) (which I do on startup), then, when I call it again like sensor.enable_accgyro(True), I get the exception at check_and_change_callback(self, data_signal, callback) from sensorfusion.py.

I think you should compare self._callbacks[data_signal][0] (which you don't use anywhere in your code) to the callback that gets passed to the function. However I have not been sucessful at that, so I solved it by commenting the condition that raises the exception.

pymetawear + Raspberry Pi 3

I'm having some problems connecting to a metawear sensor from a raspberry pi 3 using pymetawear. I'm hoping someone could provide feedback on their experience with this library on raspberry pi3 + jessie. Here is the test app I'm executing

from pymetawear.client import MetaWearClient
backend = 'pygatt'  # Or 'pybluez'
c = MetaWearClient('E9:D1:C1:68:0D:86', backend, 'hci0', None, True, True)

pattern = c.led.load_preset_pattern('blink', repeat_count=10)
c.led.write_pattern(pattern, 'g')
c.led.play()

And the console log output. Sometimes it also fails with a plain old timeout.

2017-04-01 13:13:21,012 DEBUG Added a <stdout> logging handler to logger: pymetawear
2017-04-01 13:13:21,013 INFO Creating MetaWearClient for E9:D1:C1:68:0D:86...
2017-04-01 13:13:21,013 INFO PyGattBackend: Creating new GATTToolBackend and starting GATTtool process...
2017-04-01 13:13:21,063 INFO PyGattBackend: Connecting to E9:D1:C1:68:0D:86 using GATTTool...
No handlers could be found for logger "pygatt.device"
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    c = MetaWearClient('E9:D1:C1:68:0D:86', backend, 'hci0', None, True, True)
  File "/usr/local/lib/python2.7/dist-packages/pymetawear/client.py", line 95, in __init__
    self.connect()
  File "/usr/local/lib/python2.7/dist-packages/pymetawear/client.py", line 128, in connect
    self.backend.connect(clean_connect=clean_connect)
  File "/usr/local/lib/python2.7/dist-packages/pymetawear/backends/pygatt.py", line 96, in connect
    super(PyGattBackend, self).connect()
  File "/usr/local/lib/python2.7/dist-packages/pymetawear/backends/__init__.py", line 96, in connect
    METAWEAR_SERVICE_NOTIFY_CHAR[1])
  File "/usr/local/lib/python2.7/dist-packages/pymetawear/backends/pygatt.py", line 145, in get_handle
    return self.requester.get_handle(characteristic_uuid) + int(notify_handle)
  File "/usr/local/lib/python2.7/dist-packages/pygatt/device.py", line 195, in get_handle
    raise exceptions.BLEError(message)
pygatt.exceptions.BLEError: No characteristic found matching 326a9006-85cb-9195-d9dd-464cfbbae75a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.