iio: dht11: support for more accurate DHT11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apologies if this is in bad form - it's my first kernel mailing list post!

I believe this is a question for Harald.

I am working with DHT11 temp & humidity sensors that fail the decode
logic within your driver.

The sensors I have came from two sources - The first from a 'Sensor
starter Kit' for arduino, the second was a batch of 5 from a random
Amazon seller. They all show the same behaviour.

Despite what the spec sheet says, it appears these temperature sensors
are providing accuracy to 0.1 degree which almost always fails the
check on line 155:
} else if (temp_dec == 0 && hum_dec == 0) {  /* DHT11 */

I can see from the dmesg logs that the driver has correctly read the
chip, the checksum has passed but it fails decode because temp_dec is
not equal to zero. The dmesg log from reading
/sys/bus/iio/devices/iio:device0/in_humidityrelative_input while
holding my finger over the sensor is as follows:

[ 3457.203647] dht11 dht11@17: Don't know how to decode data: 50 0 22 2
[ 3467.936584] dht11 dht11@17: Don't know how to decode data: 57 0 23 1
[ 3472.435984] dht11 dht11@17: Don't know how to decode data: 62 0 23 8
[ 3476.841252] dht11 dht11@17: Don't know how to decode data: 64 0 24 1
[ 3480.583614] dht11 dht11@17: Don't know how to decode data: 68 0 24 4
[ 3484.515841] dht11 dht11@17: Don't know how to decode data: 69 0 24 5

Has this been reported before? I can patch the driver locally easily
enough or bit-bang in userspace, but surely other people must have
stumbled upon this problem. Would you be interested in supporting
DHT11s that behave in this manner?

Cheers,
Chris




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux