momenso/node-dht-sensor

node-dht-sensor broken on RPI4

jgarvey955 opened this issue · 9 comments

After updating to buster on my RPI3B+ my system was running fine. All other peripherals work fine except the DHT11 and when i shift the 3B+ out for the 4B i get an 2835 MMAL error saying that memory can not be mapped. when i swap the 4B back to the 3B+ it runs fine. Is there something new???

  • Error is
    bcm2835_init: gpio mmap failed: Cannot allocate memory
    Segmentation fault

Have verified DHT11 works with RPI4B through a python script. Am currently on node 12.6.0 - am going to try to drop to latest stable 10.15.2 and see.

Have verified same issue with node 10.15.2

We had a similar problem reported in #16.

Perhaps you can run a simple test code (e.g. the First Example from the README file) to confirm if you still have the problem.

I have confirmed with Raspberry Pi Org that the bcm2835 library will need to be rewritten for the rpi4b due to changes with the chip.

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=245107&p=1495602&sid=2abe572cd359aafd8155eec8705e1f5d#p1495602

Thanks for the update @jgarvey955!

How would you use this library with the new bcm2835 1.60 version? Is an update of this library needed?

I have the same problem. Is there any workaround?

image

I am experiencing the same issue. I am using DHT22 and raspberry pi 4.

Due to the limited availability of the RPi 4 I have been unable to work on this issue. If any lucky owner of a RPi4 is interested in working on this issue it will be most welcome! If not, I am stuck waiting for my order to be fullfilled, hopefully soon.

Excited for the update! This is my current workaround
Screen Shot 2019-09-01 at 1 21 16 PM

Fix for running node-dht-sensor on the Raspberry Pi 4 is now released.
Please make sure you upgrade to version 0.4.0 and check if it works for you.