Current-Users archive

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

Re: TEMPer and TEMPerHUM usb thermometer driver



On Wed, 24 Feb 2010, Andreas Gustafsson wrote:

Paul Goyette wrote:
Thanks, plunky, for commiting the aprint's.

As for the second problem (no sensors attached), can you rebuild with
the following patch and see what it says?

I haven't actually built with that specific patch, but based on some
debug printfs I added, I conclude it would print nothing when
attaching uthum0, and print "sensor type 0 unknown" attaching uthum1.

More specifically, uthum0 is ignored because sc->sc_flen is 0.  Then,
uthum1 is ignored because the signature read from the device in
uthum_check_sensortype() is 0x57 0x5a 0x14 0x00 0x14 0x00 0x53 0x00,
which matches neither of the two signatures the code checks for.

If I change uthum_check_sensortype() to accept the 0x57 0x5a 0x14 0x00
0x14 0x00 0x53 0x00 and return UTHUM_TYPE_SHT1x, I get the following
output from envstat:

                 Current  CritMax  WarnMax  WarnMin  CritMin Unit
  [uthum1]
         temp:    28.040                                     degC
    humidity:     15483


Yep. The signatures are the only way to figure out how to read the actual values. The temp looks "reasonable" here, although no way to tell if it is correct; humidity definitely looks wrong.

I don't have any details on these devices. Let's hope tonio can help out.


-------------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index