Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with BSEC enabled #2

Open
palla89 opened this issue Jun 26, 2021 · 3 comments
Open

Not working with BSEC enabled #2

palla89 opened this issue Jun 26, 2021 · 3 comments

Comments

@palla89
Copy link

palla89 commented Jun 26, 2021

Hi, I have a problem while running the sample script forced_mode.py (and other scripts) with BSEC enabled, here the error:

TESTING FORCED MODE WIT BSEC
INITIALIZED BME68X
VARIANT = BME68X_VARIANT_GAS_HIGH
INITIALIZED BSEC
BSEC VERSION: 2.0.6.1
SENSOR_SETTINGS.OP_MODE = 0x1
SENSOR_SETTINGS.HEATER_TEMPERATURE = 320
SENSOR_SETTINGS.HEATER_DURATION = 197
SET BME68X CONFIG
SET HEATER CONFIG (FORCED MODE)
**Traceback (most recent call last):
  File "forced_mode.py", line 17, in <module>
    data = bme.get_bsec_data()
SystemError: <method 'get_bsec_data' of 'bme68x.BME68X' objects> returned NULL without setting an error**

Unfortunately I didn't found out what's wrong. Do you have any advice?

@palla89
Copy link
Author

palla89 commented Jul 3, 2021

Update of 03/07/21, still same error also pulling new code :(

@meirim-pt
Copy link

There is get_data defined but no get_bsec_data

`
../bme68x/bme68x-python-library/examples $ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from bme68x import BME68X
import bme68xConstants as cnst
import bsecConstants as bsec
from time import sleep

bme = BME68X(cnst.BME68X_I2C_ADDR_LOW, bsec.BSEC_ENABLE)
INITIALIZED BME68X
VARIANT = BME688
SET BME68X CONFIG
SET HEATER CONFIG (FORCED MODE)

print(dir(bme))

['class', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'bme68x', 'conf', 'data', 'del_period', 'get_data', 'heatr_conf', 'linux_device_handle', 'n_fields', 'op_mode', 'rslt', 'sample_count', 'set_conf', 'set_heatr_conf', 'set_temp_offset', 'temp_offset', 'time_ms', 'use_bsec']

`

@meirim-pt
Copy link

Somehow I had a previous installed version 1.0.4 (??)
After removing that version, the version 1.0.5 became active and working.

Tested with this piece of code (on 0x76):
from bme68x import BME68X
bme=BME68X(0x76, 1)
print (bme.get_bsec_data())
print (bme.get_variant())


(pip3 freeze|grep bme)

/bme68x-python-library $ pip3 uninstall bme68x
Found existing installation: bme68x 1.0.4
Uninstalling bme68x-1.0.4:
Would remove:
/home/pi/.local/include/python3.7m/bme68x/bme68x.h
/home/pi/.local/include/python3.7m/bme68x/bme68x_defs.h
/home/pi/.local/include/python3.7m/bme68x/internal_functions.h
/home/pi/.local/lib/python3.7/site-packages/bme68x-1.0.4.dist-info/*
/home/pi/.local/lib/python3.7/site-packages/bme68x.cpython-37m-arm-linux-gnueabihf.so
/home/pi/.local/lib/python3.7/site-packages/bme68xConstants.py
/home/pi/.local/lib/python3.7/site-packages/bsecConstants.py
Proceed (Y/n)? Y
Successfully uninstalled bme68x-1.0.4
pi@raspberrypi:~/bme68x-python-library $ pip3 uninstall bme68x
Found existing installation: bme68x 1.0.5
Uninstalling bme68x-1.0.5:
Would remove:
/usr/local/lib/python3.7/dist-packages/bme68x-1.0.5-py3.7-linux-armv7l.egg
Proceed (Y/n)? n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants