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

DS18b20 and Pico W causing decode error #677

Open
brentru opened this issue Jan 6, 2025 · 3 comments
Open

DS18b20 and Pico W causing decode error #677

brentru opened this issue Jan 6, 2025 · 3 comments
Assignees
Labels
bug Something isn't working ds18x

Comments

@brentru
Copy link
Member

brentru commented Jan 6, 2025

Describe the bug
Pico W connected to a ds18b20 is causing a crash

Arduino board
Raspberry Pi Pico W

Logs

Connecting a new DS18b20 to a Pico W, attempt #1

* NEW MESSAGE [Topic: Signal-DS]:
23 bytes.
[Message Type] Init. DS Sensor
Adding DS18x20 Component...Failed to find DSx sensor on specified pin.
Created OneWireBus on GPIO D14 with DS18x20 attached!
-> DS18x Init Response...Published!
Protobuf decode error: (none)
ERROR: Unable to decode DS message

Connecting a new DS18b20 to a Pico W, attempt #2

* NEW MESSAGE [Topic: Signal-DS]:
23 bytes.
[Message Type] Init. DS Sensor
Connection lost -- read failed: [Errno 6] Device not configured
Use Stop/Restart to reconnect.
Process ended with exit code 1.
MQTT Connection Error: -1
Connection failed
...
ERROR [WDT RESET IN -1]:
ERROR: Unable to connect to Adafruit.IO MQTT, rebooting soon...
#Pico rebooted and same message repeated over and over#

@tyeth I think this is from within the DS18 driver used on PicoW?

Connection lost -- read failed: [Errno 6] Device not configured
Use Stop/Restart to reconnect.

Which components are connected to your device
DS18b20 from Aliexpress

@brentru brentru added bug Something isn't working ds18x labels Jan 6, 2025
@brentru
Copy link
Member Author

brentru commented Jan 6, 2025

@tyeth Could you attempt to reproduce this issue this week?

@tyeth
Copy link
Contributor

tyeth commented Jan 6, 2025

Will do!

@tyeth
Copy link
Contributor

tyeth commented Jan 27, 2025

Just to add we may have a destructor missing issue, which presents itself when removing and adding DS18b20 devices.
Adding and removing the ds18b20 crashes on third time. Adding a PIO destructor fixes it, see
https://github.com/tyeth/pstolarz_OneWireNg/tree/pio-destructor
and
pstolarz/OneWireNg#71

Note to self, retest with fix in pstolarz/OneWireNg#71

Note to Brent, we might want to switch to the bitbanged driver for rp2040, so we can support more ds18b20 devices. There is a requirement to supply the pio number to the ds18b20 constructor, with 2 pins per pio at 4max (we might even find it crashes with 3 devices without pio num argument to constructor), whereas the bitbang implementation supports many pins (>4).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ds18x
Projects
None yet
Development

No branches or pull requests

2 participants