Port-arm archive

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

Re: Using 1-wire on ODROID C2



Thanks for the information!
I've copied almost the same lines from arch/amd64/conf/GENERIC, and attached gpioow in /etc/gpio.conf instead of giving an offset in the kernel config. I've also had a look at envstat.c and talking to sysmon directly looks simple, I'll do this.
Also, the sensor being slow isn't an issue for my use case.

On 20/09/2022 01:01, Brad Spencer wrote:
Some of the onewire and related infrastructure hasn't been modularized
yet, hence the lack of kmods.  I do this on RPIs:

# 1-Wire support
gpioow*        at gpio0 offset 25 mask 0x1
onewire*       at gpioow?

# 1-Wire devices
owtemp*        at onewire?

The offset is the GPIO pin.

You will then see a device with the envstat command called owtemp0 (or
whatever, if you have more then one).  The DS18B20 and friends is a very
slow device, and it will take almost a second for envstat to return
anything.  I have a bunch of scripts that parse envstat output and feed
it to a Elasticsearch instance as there is no other interface to the
device, so that part really isn't hard ... just string parsing...  or
you could use the XML output envstat can provide.

If you need something that responses faster than the DS18B20 then you
will want to use one of the I2C temperature sensors.  There are a number
of drivers for several of them (and more will come in the next year or
so) in -current.



Home | Main Index | Thread Index | Old Index