LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Closed Thread
  Search this Thread
Old 10-30-2025, 03:08 PM   #1
VladTs
LQ Newbie
 
Registered: Oct 2025
Location: Belgrade, Serbia
Distribution: debian
Posts: 7

Rep: Reputation: 0
DHT11 kernel driver problem


Hello!

I'm using kernel 6.1.115-vendor-rk35xx from armbian on Orange Pi 3B v2.1, it has rk3566 chip. I try to use DHT11 humidity and temperature module on GPIO3-D0 pin with kernel driver drivers/iio/humidity/dht11.c.

Oscilloscope shows that signal has correct waveform - 20 ms low, then 42 pulses with correct timings. But kernel driver fails to count pulses edges, and reports error in dmesg. Exact amount of detected edges changes each time. Also I see, that sometimes it detects high->low and next again high->low. It definetly means that kernel misses some of edges and this is root of trouble.

Code:
[ 2504.491143] dht11 dht11@0: current timeresolution: 41ns
[ 2508.023547] dht11 dht11@0: 45 edges detected:
[ 2508.023607] dht11 dht11@0: 1: 69125 ns low
[ 2508.023640] dht11 dht11@0: 2: 161875 ns low
[ 2508.023668] dht11 dht11@0: 3: 67958 ns high
[ 2508.023696] dht11 dht11@0: 4: 13125 ns low
[ 2508.023724] dht11 dht11@0: 5: 47834 ns high
[ 2508.023751] dht11 dht11@0: 6: 47541 ns low
[ 2508.023778] dht11 dht11@0: 7: 160417 ns high
[ 2508.023804] dht11 dht11@0: 8: 67375 ns low
[ 2508.023831] dht11 dht11@0: 9: 49291 ns high
[ 2508.023857] dht11 dht11@0: 10: 46083 ns low
[ 2508.023883] dht11 dht11@0: 11: 160417 ns high
[ 2508.023910] dht11 dht11@0: 12: 65625 ns low
[ 2508.023936] dht11 dht11@0: 13: 51916 ns low
[ 2508.023963] dht11 dht11@0: 14: 161584 ns low
[ 2508.023989] dht11 dht11@0: 15: 67083 ns low
[ 2508.024015] dht11 dht11@0: 16: 12250 ns low
[ 2508.024041] dht11 dht11@0: 17: 160708 ns low
[ 2508.024067] dht11 dht11@0: 18: 67083 ns low
[ 2508.024094] dht11 dht11@0: 19: 163333 ns low
[ 2508.024121] dht11 dht11@0: 20: 67375 ns low
[ 2508.024147] dht11 dht11@0: 21: 165084 ns high
[ 2508.024173] dht11 dht11@0: 22: 15166 ns low
[ 2508.024199] dht11 dht11@0: 23: 172083 ns high
[ 2508.024225] dht11 dht11@0: 24: 66209 ns high
[ 2508.024252] dht11 dht11@0: 25: 12541 ns high
[ 2508.024278] dht11 dht11@0: 26: 168875 ns high
[ 2508.024303] dht11 dht11@0: 27: 66208 ns low
[ 2508.024331] dht11 dht11@0: 28: 161875 ns low
[ 2508.024357] dht11 dht11@0: 29: 66792 ns low
[ 2508.024383] dht11 dht11@0: 30: 162458 ns low
[ 2508.024409] dht11 dht11@0: 31: 74958 ns high
[ 2508.024436] dht11 dht11@0: 32: 54542 ns high
[ 2508.024463] dht11 dht11@0: 33: 58333 ns low
[ 2508.024489] dht11 dht11@0: 34: 163041 ns low
[ 2508.024515] dht11 dht11@0: 35: 16625 ns high
[ 2508.024542] dht11 dht11@0: 36: 74375 ns high
[ 2508.024568] dht11 dht11@0: 37: 47542 ns high
[ 2508.024595] dht11 dht11@0: 38: 43750 ns low
[ 2508.024621] dht11 dht11@0: 39: 160708 ns low
[ 2508.024647] dht11 dht11@0: 40: 65333 ns low
[ 2508.024675] dht11 dht11@0: 41: 47834 ns high
[ 2508.024701] dht11 dht11@0: 42: 45208 ns low
[ 2508.024726] dht11 dht11@0: 43: 11375 ns high
[ 2508.024752] dht11 dht11@0: 44: 156333 ns low
[ 2508.024780] dht11 dht11@0: Only 45 signal edges detected
There should be 83 edges (low->high and high->low), according to source:
Code:
/*
 * Note that when reading the sensor actually 84 edges are detected, but
 * since the last edge is not significant, we only store 83:
 */
Did anyone used this driver and if you had same issue, how it fixed?

Thank you!
 
Old 10-30-2025, 05:43 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 14,197
Blog Entries: 48

Rep: Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553Reputation: 3553
Moderator Response

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with kernel DHT11 driver on Orange PI VladTs Linux - Embedded & Single-board computer 9 11-01-2025 07:51 AM
Driver core binding device to driver and Udev loading driver module-difference? ayyasprings Linux - Embedded & Single-board computer 0 01-23-2016 01:44 PM
[Network Driver] Would be interested to know about Filter driver or Hookup driver Siddalingesh Nallur Linux - Kernel 0 05-14-2015 01:44 PM
Problem in compiling a char device driver formerly for kernel 2.4 on kernel 2.6 payretep Linux - Newbie 6 09-24-2007 05:43 AM
fglrx-driver vs ATI kernel driver for ATI Radeon 9200 in Debian Debian_Poland Debian 3 02-01-2006 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 06:48 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions