Redmi ax6s serial temperature read

hi ,

i do have Redmi ax6s and i like to integrate temperature sensor DS18B20 is similar wire 1 sensor to it, e.g HDC1080

is there a way to use the internal serial connector to connect such sensor?

Thanks

For 1-wire devices you will need an unused GPIO port.
HDC1080 has i2c interface, not 1-wire, so for that module you will either need access to native i2c interface pins on the board or two unused GPIO ports to emulate i2c over GPIO.

1 Like

It's not "serial" if you mean RS-232-like protocol, it uses the Dallas 1-wire half duplex protocol. I think you'd need to hook it to a bidirectional digital IO pin on GPIO (does that device have open pins?), install the proper drivers and configure it somehow. kmod-w1-slave-therm looks like it would be the driver.

1 Like

thanks for the first feedback.

the MediaTek MT7622B seems to not have the additional GPIO according https://techinfodepot.shoutwiki.com/wiki/MediaTek_MT7622
there is only 1 dedicated GPIO mentioned .

The ax6s device has a jtag serial interface with is listed in

dmesg  | grep tty
[    0.455641] printk: console [ttyS0] disabled
[    0.480492] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 118, base_baud = 1562500) is a ST16650V2
[    0.489826] printk: console [ttyS0] enabled

i am not sure if the kmod-w1-slave-therm can use the serial interface to connect a 1wire sensor.

Will i need a converter to convert RS232 to DS2482 i2c 1-wire?

if not how to connect such sensor to the jtag?

JTAG != serial and you don't have JTAG or RS232.

If unused GPIO pins cannot be found on the board, then probably the easiest option will be to re-purpose GPIO 102 that is currently used for "mesh" button.

You will need to edit .dts and build your own image.

thanks for clarifying. i assumed i could maybe use the jtag to reconfigure it as 1 wire interface.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.