On Tue, Apr 18, 2023 at 03:52:02PM +0000, Miod Vallat wrote: | > After updating my RPi4 to a newer snap, it lost its humidity sensor. | > | > dmesg from before and after the update both detect this: | > | > uhidev1 at uhub1 port 2 configuration 1 interface 1 "RDing TEMPERHUM1V1.2" rev 2.00/0.01 addr 3 | > uhidev1: iclass 3/1 | > ugold0 at uhidev1 | > ugold0: 2 sensors type si7006 (temperature and humidity) | > | > But the new install only has the temperature sensor available: | > | > [weerd@raspberry] $ sysctl hw.sensors.ugold0 | > hw.sensors.ugold0.temp0=22.32 degC (inner) | | Sorry about that. Can you try the following diff and report if it brings | the humidity sensor back?
It does! Thanks :) hw.sensors.ugold0.temp0=22.58 degC (inner) hw.sensors.ugold0.humidity0=40.69% (RH) Cheers, Paul | Miod | | Index: ugold.c | =================================================================== | RCS file: /OpenBSD/src/sys/dev/usb/ugold.c,v | retrieving revision 1.22 | diff -u -p -r1.22 ugold.c | --- ugold.c 2 Apr 2023 17:03:14 -0000 1.22 | +++ ugold.c 18 Apr 2023 15:51:13 -0000 | @@ -432,7 +432,7 @@ ugold_si700x_intr(struct uhidev *addr, v | temp = ugold_si700x_temp(sc->sc_type, buf[2], buf[3]); | sc->sc_sensor[UGOLD_INNER].value = (temp * 1000) + 273150000; | sc->sc_sensor[UGOLD_INNER].flags &= ~SENSOR_FINVALID; | - if (sc->sc_type != UGOLD_TYPE_GOLD && buf[1] >= 6) { | + if (sc->sc_type != UGOLD_TYPE_GOLD) { | rhum = ugold_si700x_rhum(sc->sc_type, buf[4], buf[5], temp); | sc->sc_sensor[UGOLD_HUM].value = rhum; | sc->sc_sensor[UGOLD_HUM].flags &= ~SENSOR_FINVALID; -- >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+ +++++++++++>-]<.>++[<------------>-]<+.--------------.[-] http://www.weirdnet.nl/