# ERR failed to sample pressure sensor & packet processing error: -7

**URL:** <https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469>\
**Category:** Dev Kit Support\
**Created:** [January 22, 2025, 11:55pm UTC](https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469 "2025-01-22T23:55:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RuiqiLi](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@RuiqiLi](https://bristlemouth.discourse.group/u/RuiqiLi)\
**Post date:** [January 22, 2025, 11:55pm UTC](https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469/1 "2025-01-22T23:55:38Z")

</div>

Greetings,

Has anyone ever see this before while using terminal connect devkit?

"ERR Failed to sample pressure sensor!ERR Failed to sample pressure sensor!power | tick: 8004205, rtc: 0, addr: 67, voltage: 0.001600, current: 0.000000

power | tick: 8004207, rtc: 0, addr: 65, voltage: 24.011200, current: -0.000500

packet processing error: -7

packet processing error: -7  
"  
Our group is working on apply RP2040 microcontroller and circuit python to the Dev kit. We finished everything on the Circuiy Python Guide and everything work last month. While I am trying to connect a DS18B20 temperature, we have those error codes. We checked the circuit, and we have these error codes with or without our temperature sensor and RP2040 microcontroller.

---

<div class="post-metadata">

**Author:** ![zachary](https://yyz1.discourse-cdn.com/flex029/user_avatar/bristlemouth.discourse.group/zachary/32/31_2.png) [@zachary](https://bristlemouth.discourse.group/u/zachary)\
**Post date:** [January 23, 2025, 7:31pm UTC](https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469/2 "2025-01-23T19:31:32Z")

</div>

Hi! 👋

These two errors come from two different places in the code.

The dev kit breakout board has a BME280 pressure sensor on the I2C bus. When we try and fail to read it, we print an error here:

> <https://github.com/bristlemouth/bm_protocol/blob/f399b21df83448ced57b97beb2adbe76dda0b9ae/src/lib/sensor_sampler/pressureSampler.cpp#L60>

You’d need to look at the hardware to understand why it’s failing to read.

The “packet processing error” comes from the `serial_bridge` app that you’re using to talk to the RP2040. It’s printed here:

> <https://github.com/bristlemouth/bm_protocol/blob/f399b21df83448ced57b97beb2adbe76dda0b9ae/src/apps/bm_devkit/serial_bridge/user_code/user_code.cpp#L54>

It prints that when the message received from the RP2040 has valid COBS encoding but an error in processing the packet. The error codes are here:

> <https://github.com/bristlemouth/bm_serial/blob/250118ff572f8399aad025f733ecc19e2210ec7e/bm_serial.h#L116>

Code -7 is “unsupported message”, returned when the packet’s `type` field was not one of the known values here:

> <https://github.com/bristlemouth/bm_serial/blob/250118ff572f8399aad025f733ecc19e2210ec7e/bm_serial.c#L1161>

Probably you’re not sending valid `bm_serial` data from the RP2040. The python library for sending a couple of known publish messages is here:

> <https://github.com/bristlemouth/bm_serial/blob/250118ff572f8399aad025f733ecc19e2210ec7e/circuitpython/bm_serial.py>

Does that help?

---

<div class="post-metadata">

**Author:** ![RuiqiLi](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@RuiqiLi](https://bristlemouth.discourse.group/u/RuiqiLi)\
**Post date:** [January 23, 2025, 10:23pm UTC](https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469/3 "2025-01-23T22:23:59Z")

</div>

Thankyou!  
I will try solve those errors

---

<div class="post-metadata">

**Author:** ![fiestapinguino](https://yyz1.discourse-cdn.com/flex029/user_avatar/bristlemouth.discourse.group/fiestapinguino/32/34_2.png) [@fiestapinguino](https://bristlemouth.discourse.group/u/fiestapinguino)\
**Post date:** [January 24, 2025, 7:12pm UTC](https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469/4 "2025-01-24T19:12:11Z")

</div>

Hi @zachary, I’m trying to help @RuiqiLi through the devkit. If we do determine that there is a hardware issue with the BME280, is there a new firmware image for the devkit that you can provide him to completely bypass the sensor?

---

<div class="post-metadata">

**Author:** ![zachary](https://yyz1.discourse-cdn.com/flex029/user_avatar/bristlemouth.discourse.group/zachary/32/31_2.png) [@zachary](https://bristlemouth.discourse.group/u/zachary)\
**Post date:** [January 24, 2025, 11:45pm UTC](https://bristlemouth.discourse.group/t/err-failed-to-sample-pressure-sensor-packet-processing-error-7/469/5 "2025-01-24T23:45:24Z")

</div>

Hey Aadu!

OK first a question about which version of the Bristlefin we’re working with — an older one has a big, white, round, MS5803 while newer ones use the BME280. Here’s a side-by-side pic.

 ![two-baros](https://canada1.discourse-cdn.com/flex029/uploads/bristlemouth/original/1X/adb5c4a67168e00a071c4d75eb66753d0640115c.jpeg)

And then another question about the logs. If the barometer is having an issue, I would expect to see “Failed to init bristlefin” on the USB console of the mote, printed here:

> <https://github.com/bristlemouth/bm_protocol/blob/f399b21df83448ced57b97beb2adbe76dda0b9ae/src/apps/bm_devkit/bmdk_common/sensors/sensors.cpp#L37-L39>

If that is happening, then I would recommend commenting out those 3 lines. That will remove any setup of the HTU or pressure sensors.

Make sense?
