Download raw body.
New ugold(4) device
Hello,
I got a newer ugold(4) device that's not yet recognized by the driver:
ugold0 at uhidev4
ugold0: unknown model "TEMPerHUM_V4.1"
Models TEMPerHUM_V3.9 and TEMPerHUM_V4.0 are supported, and it seems
that this 4.1 model works the same, so the patch below adds it.
With that patch, it is recognized and works fine:
ugold0 at uhidev4
ugold0: "TEMPerHUM_V4.1", 2 sensors type temperx (temperature and humidity)
$ sysctl hw.sensors.ugold0
hw.sensors.ugold0.temp0=24.73 degC (inner)
hw.sensors.ugold0.humidity0=60.58% (RH)
Note that, unlike the TEMPerHUM_V3.9 and TEMPerHUM_V4.0 models, but
similar to some others, the model name is padded with NULs instead of
spaces.
Sebastiaan
Index: sys/dev/usb/ugold.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ugold.c,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 ugold.c
--- sys/dev/usb/ugold.c 23 May 2024 03:21:09 -0000 1.28
+++ sys/dev/usb/ugold.c 26 Jul 2024 09:22:13 -0000
@@ -453,7 +453,8 @@ ugold_si700x_type(struct ugold_softc *sc
if (sc->sc_model_len >= 9 &&
memcmp(sc->sc_model, "TEMPerHUM", 9) == 0) {
if (memcmp(sc->sc_model + 9, "_V3.9 ", 16 - 9) == 0 ||
- memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0) {
+ memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0 ||
+ memcmp(sc->sc_model + 9, "_V4.1\0\0", 16 - 9) == 0) {
sc->sc_type = UGOLD_TYPE_TEMPERX;
descr = "temperx (temperature and humidity)";
goto identified;
New ugold(4) device