UpBoard kernel 1-wire support

New Member Posts: 5

Hi,

There seems to be modules w1_gpio and w1_therm kernel modules in the linux-image-generic-hwe-16.04-upboard.

Are those fully supported? I can load them, but so far no luck getting them working with digital temperature sensor attached to GPIO pins.

Are there kernel sources available?

Br,
Jari

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • New Member Posts: 348 ✭✭✭

    Hi @Jari ,

    Could you please specify more about your setup? GPIO pin? Sensor model? Steps to load and check your sensor on Linux, etc.
    I would like to reproduce the issue here.
    Thanks!

  • New Member Posts: 5

    Hi,

    Sensor model is DS18B20. Ubuntu 16.04. Kernel and extras from here: https://wiki.up-community.org/Ubuntu.
    GPIO pin 23 has the data. I can provide you more information about wiring bit later.

    I pretty much tried to follow instructions for RPI, as I could not find anything else. There seems to be w1_gpio and w1_therm modules, like RPI has.

    I tried to set environment variable
    dtoverlay=w1-gpio,gpiopin=23

    then load modules
    sudo modprobe w1_gpio
    sudo modprobe w1_therm

    then tried to find devices
    ls /sys/bus/w1/devices/

    And nothing was found. I have no idea if dtoverlay is some RPI specific thing or is it also usable with Ubuntu.
    Pretty much followed steps described for example here: http://www.circuitbasics.com/raspberry-pi-ds18b20-temperature-sensor-tutorial/

    Br,
    Jari Penttinen

  • New Member Posts: 5
    edited January 2019

    Sensor DS18B20 is connected in non-parasitic power mode to Linux GPIO 23

  • New Member Posts: 348 ✭✭✭
    edited January 2019

    Hi @Jari ,

    If you have the correct kernel 4.15 for UPboard on Ubuntu then,
    first at all I would recommend you to double check your GPIO pin:
    echo 23 > /sys/class/gpio/export
    Input test:
    cat /sys/class/gpio/gpio23/value #should be 0
    Jump pin1 (3.3v) to pin 16 (Linux 23)
    Check again:
    cat /sys/class/gpio/gpio23/value #should be 1

  • New Member Posts: 1

    Hi,
    Is anybody here who can use the 1-wire on UPBoard? I tried with a DS18B20 sensor, but it was unsuccessful. First I tried the same way as Jary, but there is no detected device. I tried different pins and sensors but nothing. I beleive the hardware connection is OK. Pullup resistor installed, 3.3V connected to the sensor.

    ls -l /sys/bus/w1/devices

    total 0

    Ubuntu 16.04.6 LTS
    Thanks!

  • Administrator, AAEON Posts: 1,213 admin

    Have you installed our custom kernel for UP Board following the instructions from our wiki?

    https://wiki.up-community.org/Ubuntu_16.04

  • New Member Posts: 4

    Hi, I have the same problem with 1wire on my upboard and DS18B20.

    My OS: Linux sysoper-UP-CHT01 5.4.0-1-generic #0~upboard2-Ubuntu SMP Sun Oct 25 14:06:23 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux (fresh installed Ubuntu 20.04 with upboard kernel)
    BIOS: restored defaults settings
    upboard-extras: installed
    PIN (phy 7 GPIO2): tested as input - ok

    I have done (as root):

    modprobe w1_gpio
    modprobe w1_therm
    

    and checked:
    ls /sys/bus/w1/devices/
    but it's empty.

    I have checked sensor on raspberry pi and it works (it is the same pinout as upboard).

  • Administrator, AAEON Posts: 1,213 admin

    Can you try with our older 4.15 kernel if it is still the case?
    Unfortunately it works only on Ubuntu 18.04, but it is worth to check: https://launchpad.net/~aaeon-cm/+archive/ubuntu/up

  • New Member Posts: 4

    So if it works only on 18.04 and I have 20.04 on production board with services (it must be 20.04) so I cannot check it with older kerner, can I?

  • Administrator, AAEON Posts: 1,213 admin

    What I meant is that kernel 4.15 works only on Ubuntu 18.04. It is worth to check as the above replies are showing the 1-wire protocol working on that version.

    if it works with kernel 4.15 on Ubuntu 18.04, I have more information for our software dev team to look into it and find a solution on the newer release.

    Thanks

  • New Member Posts: 4

    I've installed Ubuntu 18.04 and upboard kernel as you said:
    Linux sysoper-UP-CHT01 4.15.0-37-generic #40~upboard07-Ubuntu SMP Tue Apr 7 14:30:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    I cannot install upboard-extras:

    apt install upboard-extras
    E: Unable to locate package upboard-extras
    

    is it necessary to have this package to use 1-wire?
    I've done:

    modprobe w1_gpio
    modprobe w1_therm
    

    and unfortunetly nothing.

  • New Member Posts: 4

    What is the default pin supporting 1wire on upboard, the same as raspberry pi? I think about phy#7.
    I connected phy#7 to osciloscope and checked the signal. First of all, using this pin as standard output I changed 0-1-0 and it worked. If I run modprobe (w1_gpio, w1_them) no actitivty could be observed on osciloscope. How to change 1-wire pin in upboard? Is there any config.txt file as in raspberry pi?

Welcome!

It looks like you're new here. Sign in or register to get started.
Privacy Policy