GithubHelp home page GithubHelp logo

waveplus-reader's People

Contributors

devdavidkarlsson avatar orjangj avatar urmasrahu 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waveplus-reader's Issues

Seems to die while trying to get Characteristics

I figure I must be doing something wrong here, as I would expect most people to have had this problem if it was a problem with the code....

I'm running this on a raspberry Pi 3, running

Linux hallway-pannel 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux

with blupy-v-1.2.0.
tableprint 0.8.0
python 2.7.13

And yet despite being about 5 feet from the airthings wave Plus, I get the following evertime I run.

python2 read_waveplus.py xxxxxxxxxx 60

Press ctrl+C to exit program

Device serial number: xxxxxxxxxx
╭──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────╮
│ Humidity │ Radon ST avg │ Radon LT avg │ Temperature │ Pressure │ CO2 level │ VOC level │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
Traceback (most recent call last):
File "read_waveplus.py", line 221, in
waveplus.connect()
File "read_waveplus.py", line 139, in connect
self.curr_val_char = self.periph.getCharacteristics(uuid=self.uuid)[0]
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 475, in getCharacteristics
rsp = self._getResp('find')
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 377, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 340, in _waitResp
raise BTLEException(BTLEException.COMM_ERROR, "Error from Bluetooth stack (%s)" % errcode)
bluepy.btle.BTLEException: Error from Bluetooth stack (comerr)
root@hallway-pannel:/home/pi/waveplus-reader#

Can't get it working

I've followed the readme. but in the end I'm getting this error. Scanning the device works fine.

Linux raspberrypi 5.4.83+ #1379 Mon Dec 14 13:06:05 GMT 2020 armv6l GNU/Linux
Python 2.7.16

Traceback (most recent call last):
File "read_waveplus.py", line 221, in
waveplus.connect()
File "read_waveplus.py", line 139, in connect
self.curr_val_char = self.periph.getCharacteristics(uuid=self.uuid)[0]
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 475, in getCharacteristics
rsp = self._getResp('find')
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 377, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 340, in _waitResp
raise BTLEException(BTLEException.COMM_ERROR, "Error from Bluetooth stack (%s)" % errcode)
bluepy.btle.BTLEException: Error from Bluetooth stack (comerr)

ValueError: Invalid conversion specification

I followed the guide, just had to use

sudo pip uninstall backports.functools_lru_cache
sudo pip install backports.functools_lru_cache==1.3

in oder to get the script up and running.

Before it was

  File "/usr/local/lib/python2.7/dist-packages/wcwidth/wcwidth.py", line 79, in <module>
    from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache

But now when I start the script I get (SN was replaced by original one):

sudo python2 read_waveplus.py SN 60
Traceback (most recent call last):
File "read_waveplus.py", line 215, in
print tableprint.header(header, width=12)
File "/usr/local/lib/python2.7/dist-packages/tableprint/printer.py", line 191, in header
upper = hrule(len(headers), widths, tablestyle.top)
File "/usr/local/lib/python2.7/dist-packages/tableprint/printer.py", line 287, in hrule
[('{:%s^%i}' % (linestyle.hline, width)).format('')for width in widths]
ValueError: Invalid conversion specification

If using sudo python2 read_waveplus.py SN 60 pipe > /tmp/airthings the file stays empty.

Any ideas about?

Best regards
Marc

Two seperate versions of Wave plus devices with different readings (one invalid?)

Two different W+ devices with different serial numbers, have different readings.

Some differences are ok, but the newest seems to have invalid readings.

One W+ device with a SNR dating back a year ago and one W+ device delivered to me in march 2019 with a newer SNR show different behaviour. According to Airthings support there should be no differences either in the FW or the HW

I have experienced multiple issues with android phone apps , the dashboard and bluetooth syncing so now I have been testing on a PI 3B+
Phones tested Samsung J6, Huawei 10 lite and Sony Xperia, all fails especially after the updates in march. Both the W+ devices were updated with new FW and the phone Apps, even to the beta version on one phone.

Anyway the Pi test follows and it shows something is wrong with the newest W+ sensor readings.

Old device:
Working like a charm
│ Humidity │ Radon ST avg │ Radon LT avg │ Temperature │ Pressure │ CO2 level │ VOC level │
│ 32.0 %rH │ 46 Bq/m3 │ 0 Bq/m3 │ 22.2 degC │ 1011.02 hPa │ 702.0 ppm │ 99.0 ppb │
Long term radiation is like others have stated = 0 so I guess there are some mistakes regarding this sensor, but the other values seem to be healthy.

New device with a much higher SNR, works regarding getting the data, but some sensors are not giving the correct values and the python script reports some default "maximum values"

Newer device: Only Radon ST and Co2 appear to have valid values
│ Humidity │ Radon ST avg │ Radon LT avg │ Temperature │ Pressure │ CO2 level │ VOC level │
│ 127.5 %rH │ 37 Bq/m3 │ 0 Bq/m3 │ 655.35 degC │ 1310.7 hPa │ 536.0 ppm │ 65535.0 ppb │

Some details:

Older W+ device:
rawdata = self.curr_val_char.read()
'\x01C\x05\x00:\x00\x00\x00\x9e\x08l\xc5\xc6\x02g\x00\x00\x00a\x06'
struct.unpack('BBBBHHHHHHHH', rawdata)
(1, 67, 5, 0, 58, 0, 2205, 50543, 706, 114, 0, 1626)
│ 33.5 %rH │ 58 Bq/m3 │ 0 Bq/m3 │ 22.05 degC │ 1010.86 hPa │ 706.0 ppm │ 114.0 ppb │

Newer W+ device delivered to me around march 2019
'\x01\xff:\x00%\x00\x00\x00\xff\xff\xff\xffZ\x02\xff\xff\x00\x00\xff\xff'
(1, 255, 58, 0, 37, 0, 65535, 65535, 602, 65535, 0, 65535)
│ 127.5 %rH │ 37 Bq/m3 │ 0 Bq/m3 │ 655.35 degC │ 1310.7 hPa │ 609.0 ppm │65535.0 ppb │

All 255 values and 65535 values appears to be wrong and the values are derived directly from
self.curr_val_char.read() which calls
/usr/local/lib/python2.7/dist-packages/bluepy/btle.py(196)read()

This tells me either the data is not read the same way with these two serial numbers or the sensors do not report the correct values.

The serial numbers if needed may be provided to Airthings representatives
but I guess an in house test on different W+-devices within Airthings will show the same results
if both new and and old serial numbers are tested.

Note both W+ devices in my test were updated
to the newest FW automatically when tested with the phone app.

Raspberry pi 3B+ Python3, sudo privilege required

I've got waveplus-reader working on my RPi 3B+ using Python3. I had to reformat the print statements, run in a virtual environment, and format my call "sudo python3 read_waveplus.py serial_number 60".

I am trying to figure out why sudo privileges are required and how to avoid needing that in the future. The error I get without sudo privilege is below:

Traceback (most recent call last): File "read_waveplus.py", line 221, in <module> waveplus.connect() File "read_waveplus.py", line 119, in connect devices = scanner.scan(0.1) # 0.1 seconds scan period File "/home/pi/MyEnv/waveplus/lib/python3.7/site-packages/bluepy/btle.py", line 734, in scan self.start(passive=passive) File "/home/pi/MyEnv/waveplus/lib/python3.7/site-packages/bluepy/btle.py", line 672, in start self._mgmtCmd("le on") File "/home/pi/MyEnv/waveplus/lib/python3.7/site-packages/bluepy/btle.py", line 283, in _mgmtCmd "Failed to execute mgmt cmd '%s'" % (cmd)) bluepy.btle.BTLEException: Failed to execute mgmt cmd 'le on'

Unable to connect

By following the tutorial steps, the output in Raspberry Pi3b+ with Rasbian latest is the following:

sudo python2 read_waveplus.py 2930034778 10

Press ctrl+C to exit program

Device serial number: 2930034778
╭──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────╮
│ Humidity │ Radon ST avg │ Radon LT avg │ Temperature │ Pressure │ CO2 level │ VOC level │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
Traceback (most recent call last):
File "read_waveplus.py", line 221, in
waveplus.connect()
File "read_waveplus.py", line 137, in connect
self.periph = Peripheral(self.MacAddr)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 361, in init
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 410, in _connect
"Failed to connect to peripheral %s, addr type: %s" % (addr, addrType))
bluepy.btle.BTLEException: Failed to connect to peripheral 80:6f:b0:e4:b2:e2, addr type: public

Python 3 and MQTT support.

I have created a fork that runs on python3 and also has support for publishing data onto an mqtt server.
Would this be of interest to add to this project?

View Plus support

Is it possible to read sensor values from View Plus also using Bluetooth LE? Could we extend this library to provide an example how to do it? I was not able to achieve it with SmartPhone apps nor by modifying a Python script that works for other Airthings devices.

Introducing Unofficial Python Library

Hello World! 😄

First of all, I think it's great that @Airthings has been contributing to open source! I started working on an unofficial Python library to provide software developers a more developer-friendly library for BTLE handling of Airthings Wave devices. There are some design goals that conflict with this repository which is what led me to create this. The library wouldn't be possible without the documentation and scripts available by @Airthings. I hope to continue making updates through Airthing's continued open-source contributions.

This library uses bleak as a dependency instead of bluepy for platform cross-compatibility and support for asynchronous operation.

https://github.com/ztroop/wave-reader-utils

What does this library feature?

  • Support platform cross-compatibility. Windows, Mac and Linux.
  • Support WavePlus, Wave (Version 2) and Wave Mini devices.
  • Support operation across multiple devices asynchronously.
  • Code testing, linting, type hinting, formatting and coverage reporting.
  • Discover all Wave devices or inherit WaveDevice class for sensor readings.
  • Support interaction/operation across multiple Wave devices.
  • Fully embrace Python3 and all its wonderful features.

See the README.md for other goals. It's currently in an alpha state.

runs for 28 days and then stops - and no long term radon

So interesting, I am running my own fork of this script on a cron job where it connects, gets the values, uploads to thingspeak (IOT charting package) and then disconnects. It has been flawless for 4 weeks however after what looks like exactly 28 days it has stopped working.

2 things to note - the radon long term value never returns anything other than zero, even though the short term values fluctuate constantly above zero

Secondly after what looks like 28 days the script is returning exactly the same values on every read call for every parameter.

I am wondering if the wave plus has some internal memory history cache that need to be "emptied" in order to allow it to add new values in ? I know it stores the history as phones can connect and back-load the data so perhaps the lack of a phone pulling the history has filled up its buffer?

I can't test this theory as the wave is half the country away - all I have is my PI that I can remote into .
restarting the PI makes no difference, and it is genuinely retrieving the same values on every read call

Any thoughts?

Steve

Weird bug with the Airthings Wave Plus Hardware

Hi there,

Sorry I am putting this in the software dev part of airthings, but hopefully it will find its way to the hardware devs of the Wave Plus. I dont know where else to post this so it gets seen by the right people?

I own an Airthings Wave Plus and found a weird bug with the unit. It has been sitting on my desk in my office for the past couple of weeks and the ring light was continuously lighting up. It just would not stop. I thought it was the way it worked and was getting really annoyed and could see the batteries going down pretty fast. Then I realised that my IKEA LED lights (FLOALT) mounted on the ceiling were interfering with the light ring motion sensor. As soon as I turned off the IKEA lights it stopped glowing. It would only glow as I waved my hand across (as it's supposed too).

Even if I put a piece of cardboard on top of the Wave Plus, the IKEA lights would still interfere with the sensor to trigger the light. Only if I put something substantial between it and the light would it stop glowing when the IKEA lights are on. Right now its hiding underneath my desk. I can create a video and upload it if you want further proof :)

Regards,

loiphin.

TypeError: fromhex() argument 1 must be string or read-only buffer, not None

Got the following error when trying to read the device:

Traceback (most recent call last):
  File "read_waveplus.py", line 222, in <module>
    waveplus.connect()
  File "read_waveplus.py", line 124, in connect
    SN = parseSerialNumber(ManuData)
  File "read_waveplus.py", line 87, in parseSerialNumber
    ManuData = bytearray.fromhex(ManuDataHexStr)
TypeError: fromhex() argument 1 must be string or read-only buffer, not None

In the connect method defined on line 113 it turns out that dev.getValueText(255) returns None at some point in the for loop.

Quick Fix:

Rewrite the for-loop with an if-statement to check if the value of ManuData is None. And if that is the case, continue the for-loop without calling parseSerialNumber.

On line 121, change the for-loop to this:

for dev in devices:
                    ManuData = dev.getValueText(255)
                    if (ManuData is None):
                        continue
                    SN = parseSerialNumber(ManuData)
                    if (SN == self.SN):
                        self.MacAddr = dev.addr  # exits the while loop on next conditional check
                        break  # exit for loop

Traceback error

I get:

Traceback (most recent call last):
File "read_waveplus.py", line 215, in
print tableprint.header(header, width = 12)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-105: ordinal not in range(128)

runs for 5 minutes and then dies

not sure if this is a wave plus thing or a code thing but it runs for 5 minutes and then dies with this every time:

Traceback (most recent call last):
File "read_waveplus.py", line 211, in
sensors = waveplus.read()
File "read_waveplus.py", line 135, in read
rawdata = self.curr_val_char.read()
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 197, in read
return self.peripheral.readCharacteristic(self.valHandle)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 530, in readCharacteristic
resp = self._getResp('rd')
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 362, in _waitResp
raise BTLEDisconnectError("Device disconnected", resp)
bluepy.btle.BTLEDisconnectError: Device disconnected
pi@raspberrypi:~ $

Import error functools-lru-cache

Seems to be a python2 / python3 error when starting the script. Says import error functools-lru-cache.
Workaround:
sudo pip2 uninstall backports.functools-lru-cache
sudo apt install python-backports.functools-lru-cache

Doesn't seem to be working when devices connected to a hub

Hi,
I have installed the software and I am able to run it however it exits with the following error:

ERROR: Could not find device.
GUIDE: (1) Please verify the serial number.
(2) Ensure that the device is advertising.
(3) Retry connection.
(4) Try putting the device closer
Temporary could not connect

Does this work when the wave plus devices are paired with the hub?
Thanks!

Battery status

It would be helpful to read the battery status/charge. But there does not appear to be a standard GATT battery service advertised.

The code reads characteristic b42e2a68-ade7-11e4-89d3-123b93f75cba and I see that bytes 2-3 and 16-19 are currently ignored.. could battery status be hidden in there perhaps?

Runs for X minutes and then dies contd... (bluetooth stack instability?)

I believe the issue described in #4 is still happening as of latest Raspbian GNU/Linux 9 (stretch) + bluetooth stack components:

$ dpkg -l | grep -i blue
ii  bluealsa                              0.9                                       armhf        Bluetooth ALSA Audio backend
ii  bluej                                 3.1.7b                                    all          A simple but powerful Java IDE.
ii  bluez                                 5.43-2+rpt2+deb9u2                        armhf        Bluetooth tools and daemons
ii  bluez-firmware                        1.2-3+rpt7                                all          Firmware for Bluetooth devices
ii  libbluetooth3:armhf                   5.43-2+rpt2+deb9u2                        armhf        Library to use the BlueZ Linux Bluetooth stack
ii  lxplug-bluetooth                      0.6                                       armhf        Bluetooth plugin for lxpanel
ii  pi-bluetooth                          0.1.10                                    all          Raspberry Pi 3 bluetooth

$ bluetoothd -v 
5.43

Based on my experiences and experimentation, it appears that the issue is in the underlying code powering this script either bluepy, bluez, broadcom drivers, or some combination? Some searching online shows many others are having similar Bluetooth stack instability on Raspbian.

I've been trying to get this code running as a long-term solution for reading and sending metrics to Graphite. I should note that so far I've been prevented from running the script as-is on Python 2.7 because I was unable to install bluepy via pip package. However, I was able to get the Python3 version from piwheels so I could move forward just converting all the print statements in this script to use parentheses print().

After testing out the script on the host, I found that I had to add kernel capabilities to the bluepy_helper binary. This binary is installed as part of bluepy and must have been why the Python 2.7 version from pip could not install a wheel or compile on the Raspberry Pi.

$ sudo setcap 'cap_net_raw,cap_net_admin+eip'  /home/pi/.local/lib/python3.5/site-packages/bluepy/bluepy-helper

$ sudo getcap /home/pi/.local/lib/python3.5/site-packages/bluepy/bluepy-helper
/home/pi/.local/lib/python3.5/site-packages/bluepy/bluepy-helper = cap_net_admin,cap_net_raw+eip

After running the script for a while, I've seen various ways in which it fails or eventually hangs. This always seems to happen after some varying period of time. I've tried also adding a SystemD unit which is supposed to restart the process and reset the hci0 device, yet eventually each time the code hangs. I'm collecting the various exceptions in logs to see how to handle them.

SystemD Unit:

[Unit]
Description=Airthings WavePlus Reader (Send to Graphite)
Documentation=https://www.airthings.com/blog/wave-plus-raspberry-pi
#BindsTo=sys-subsystem-net-devices-eth0.device sys-subsystem-net-devices-wlan0.device
After=network-online.target bluetooth.target dbus-org.bluez.service sys-subsystem-net-devices-eth0.device sys-subsystem-bluetooth-devices-hci0.device [email protected] sys-subsystem-net-devices-wlan0.device ifup
Wants=network-online.target bluetooth.target [email protected] dhcpcd.service wpa_supplicant.service

[Service]
Type=simple
EnvironmentFile=/etc/default/waveplus-reader
ExecStartPre=-/bin/sh -c '/bin/echo power on | /usr/bin/bluetoothctl'
ExecStartPre=-/bin/hciconfig up hci0
User=pi
ExecStart=/usr/bin/python3 -u /home/pi/src/pub/waveplus-reader/read_waveplus.py $WAVEPLUS_SN $WAVEPLUS_SAMPLE_PERIOD
ExecStopPost=-/bin/hciconfig down hci0
ExecStopPost=-/bin/sh -c '/bin/echo power off | /usr/bin/bluetoothctl'
Restart=always
RestartSec=3
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW

[Install]
WantedBy=multi-user.target

Error examples & strace debugging:

Jun 25 11:29:43 raspberrypi python3[14770]: ERROR: <class 'bluepy.btle.BTLEManagementError'>
Jun 25 11:29:43 raspberrypi python3[14770]: Failed to execute management command 'scanend' (code: 11, error: Rejected)
Jun 25 11:29:43 raspberrypi python3[14770]: ERROR: <class 'bluepy.btle.BTLEManagementError'>
Jun 25 11:29:43 raspberrypi python3[14770]: Failed to execute management command 'scanend' (code: 11, error: Rejected)

I tried getting an strace after finding that bluepy-helper had hung:

Jun 26 09:00:16 raspberrypi python3[857]: ERROR: <class 'bluepy.btle.BTLEGattError'>
Jun 26 09:00:16 raspberrypi python3[857]: Bluetooth command failed (code: 14, error: Request attribute has encountered an unlikely error)
Jun 26 09:00:18 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    560.0 ppm │     71.0 ppb │
Jun 26 09:01:22 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    560.0 ppm │     71.0 ppb │
Jun 26 09:02:25 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    560.0 ppm │     71.0 ppb │
Jun 26 09:03:28 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    560.0 ppm │     71.0 ppb │
Jun 26 09:04:32 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    560.0 ppm │     71.0 ppb │
Jun 26 09:05:35 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    567.0 ppm │     84.0 ppb │
Jun 26 09:06:38 raspberrypi python3[857]: │     47.0 %rH │     31 Bq/m3 │      0 Bq/m3 │   19.83 degC │    837.1 hPa │    567.0 ppm │     84.0 ppb │
Jun 26 09:07:41 raspberrypi python3[857]: ERROR: <class 'bluepy.btle.BTLEGattError'>
Jun 26 09:07:41 raspberrypi python3[857]: Bluetooth command failed (code: 10, error: No attribute found within the given range)



pi@raspberrypi:~ $ sudo systemctl status waveplus-reader
● waveplus-reader.service - Airthings WavePlus Reader (Send to Graphite)
   Loaded: loaded (/etc/systemd/system/waveplus-reader.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-06-26 08:27:32 MDT; 13h ago
     Docs: https://www.airthings.com/blog/wave-plus-raspberry-pi
  Process: 854 ExecStartPre=/bin/hciconfig up hci0 (code=exited, status=0/SUCCESS)
  Process: 826 ExecStartPre=/bin/sh -c /bin/echo power on | /usr/bin/bluetoothctl (code=exited, status=0/SUCCESS)
 Main PID: 857 (python3)
    Tasks: 2 (limit: 4915)
   Memory: 10.5M
      CPU: 12h 11min 7.354s
   CGroup: /system.slice/waveplus-reader.service
           ├─ 857 /usr/bin/python3 -u /home/pi/src/pub/waveplus-reader/read_waveplus.py 2930006452 60
           └─8906 /home/pi/.local/lib/python3.5/site-packages/bluepy/bluepy-helper

$ sudo strace -p 8906

## same polling event repeated... infinite loop?
[...SNIP...]
poll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=0}], 4, -1) = 1 ([{fd=5, revents=POLLNVAL}])
poll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=0}], 4, -1) = 1 ([{fd=5, revents=POLLNVAL}])
poll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=0}], 4, -1) = 1 ([{fd=5, revents=POLLNVAL}])
poll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=0}], 4, -1) = 1 ([{fd=5, revents=POLLNVAL}])
[...SNIP...]

$ sudo strace -p 857
strace: Process 857 attached
read(6,


# That's it... nothing else.  It's waiting on bluepy-helper?
# I killed the stuck bluepy-helper and got this:

Jun 26 21:51:14 raspberrypi python3[857]: ERROR: <class 'bluepy.btle.BTLEInternalError'>
Jun 26 21:51:14 raspberrypi python3[857]: Helper exited
Jun 26 21:51:14 raspberrypi python3[857]: ERROR: <class 'BrokenPipeError'>
Jun 26 21:51:14 raspberrypi python3[857]: [Errno 32] Broken pipe
Jun 26 21:51:14 raspberrypi python3[857]: ERROR: <class 'BrokenPipeError'>
Jun 26 21:51:14 raspberrypi python3[857]: [Errno 32] Broken pipe
Jun 26 21:51:14 raspberrypi python3[857]: ERROR: <class 'BrokenPipeError'>
Jun 26 21:51:14 raspberrypi python3[857]: [Errno 32] Broken pipe
Jun 26 21:51:14 raspberrypi python3[857]: ERROR: <class 'BrokenPipeError'>
Jun 26 21:51:14 raspberrypi python3[857]: [Errno 32] Broken pipe
Jun 26 21:51:14 raspberrypi python3[857]: ERROR: <class 'BrokenPipeError'>
[...SNIP...]

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.