Balena Sense BME sensor build issue

Hey,

So, I was rebuilding my in-home air quality sensor when I encountered build issues

The build is based on https://www.balena.io/blog/build-an-environment-and-air-quality-monitor-with-raspberry-pi/

The error reported is:

[Error]         Error: The command '/bin/sh -c wget https://ae-bst.resource.bosch.com/media/_tech/media/bsec/$BSEC_FILENAME' returned a non-zero code: 8

Manually checking URL is now getting a 404.

New URL appears to be:

https://www.bosch-sensortec.com/media/boschsensortec/downloads/bsec/bsec_1-4-8-0_generic_release.zip

as I cannot edit the broken URL to:

https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1-4-8-0_GENERIC_RELEASE.zip

As it still breaks (404)

Tried changing to something similar to:

https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1-4-8-0_Generic_Release.zip
https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1-4-8-0_generic_release.zip
https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1-4-8-0_GENERIC_RELEASE.zip

But still getting 404.

I then manually edited the Dockerfile.template for sensor to read:

FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3-build

ARG BSEC_FILENAME=bsec_1-4-8-0_generic_release.zip

RUN install_packages \
        unzip
WORKDIR /usr/src/app
RUN git clone https://github.com/balena-io-playground/bsec_bme680_linux.git
RUN wget https://www.bosch-sensortec.com/media/boschsensortec/downloads/bsec/$BSEC_FILENAME

It downloads fine (I think) but the build fails.

Final log lines are:

[sensor]    Step 11/17 : RUN ./make.sh
[sensor]     ---> Running in ec68b02a2a64
[sensor]    BSEC directory missing.
[sensor]    Removing intermediate container ec68b02a2a64
[sensor]    The command '/bin/sh -c ./make.sh' returned a non-zero code: 1
[Info]      Uploading images
[Success]   Successfully uploaded images
[Error]     Some services failed to build:
[Error]       Service: sensor
[Error]         Error: The command '/bin/sh -c ./make.sh' returned a non-zero code: 1
[Info]      Built on arm01
[Error]     Not deploying release.
Remote build failed

I think this needs updating:

I think

ARCH="${VERSION}/bin/RaspberryPI/PiZero_ArmV6-32bits"

Needs to be:

ARCH="${VERSION}/bin/RaspberryPi/PiThree_ArmV6"
1 Like

Hello,

Thanks for reporting this. We were able to reproduce it. And thanks so much for the suggestions. I have made the changes

We will need to test this, especially if it still works on a Pi Zero given the changes in the latest driver release.

Thanks again for the detailed suggestions.
Cheers

1 Like

i’ll run some tests my end if I have time later this week. Thanks for response!

Hey @jamieede just to let you know a new version of balenaSense (v1.9.8) has just been merged that has the changes in to build the new version of the Bosch library. Give it a try and let us know how you get on.

1 Like

Can confirm all is now working as expected.

Thanks for resolving this quickly! Much appreciated.

1 Like