c.man Posted May 27, 2018 Posted May 27, 2018 Hi, I installed a armbian on Orange pi PC. The initial screen shoot is: Quote ___ ____ _ ____ ____ / _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) | _ \ / ___| | | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | |_) | | | |_| | | | (_| | | | | (_| | __/ | __/| | | __/| |___ \___/|_| \__,_|_| |_|\__, |\___| |_| |_| |_| \____| |___/ Welcome to ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.18-sunxi System load: 0.72 0.46 0.18 Up time: 2 min Memory usage: 5 % of 1000MB IP: 10.0.0.12 CPU temp: 41°C Usage of /: 16% of 7.1G After I upgradeed the system: Quote sudo apt-get update sudo apt-get upgrade I want to use DS18B20 sensor; so I loadeed this driver: Quote sudo modprobe w1-sunxi but I see this message error: Quote modprobe: FATAL: Module w1-sunxi not found in directory /lib/modules/4.14.18-sunxi Why ? How to I can to resolve ?
c.man Posted May 28, 2018 Author Posted May 28, 2018 On 5/27/2018 at 5:43 PM, c.man said: How to I can to resolve ? A update: I tried to install an other kernel version for my Orange pi pc: Armbian Xenial desktop legacy kernel 3.4.y and sudo modprobe w1-sunxi work perfectly. So I think that is a bug of 4.14.18-sunxi kernel. Anyone can tell me if is it is a really a bug ?
zador.blood.stained Posted May 28, 2018 Posted May 28, 2018 1 hour ago, c.man said: Anyone can tell me if is it is a really a bug ? Everything is correct. There is no w1-sunxi module on mainline, w1-gpio is used with Device Tree overlays instead of it.
c.man Posted May 28, 2018 Author Posted May 28, 2018 ok. So how I can to read temperature from ds18b20 sensor (1-wire protocol) ? Is it possible ?
c.man Posted May 29, 2018 Author Posted May 29, 2018 ok. I have enabled "system -> hardware -> w1-gpio". But, If I go in: cd /sys/bus/w1/devices/ I see: 00-4b3000000000 w1_master_add w1_master_remove 00-8b3000000000 w1_master_attempts w1_master_search driver w1_master_max_slave_count w1_master_slave_count power w1_master_name w1_master_slaves subsystem w1_master_pointer w1_master_timeout uevent w1_master_pullup w1_master_timeout_us root@orangepione:/sys/devices/w1_bus_master1# I don't have the 28-000...... for my ds18b20 sensor. Why ? and root@orangepione:/sys/devices/w1_bus_master1# modprobe w1_sunximodprobe: FATAL: Module w1_sunxi not found in directory /lib/modules/4.14.18-sunxi I have the same error....
chwe Posted May 29, 2018 Posted May 29, 2018 38 minutes ago, c.man said: root@orangepione:/sys/devices/w1_bus_master1# modprobe w1_sunximodprobe: FATAL: Module w1_sunxi not found in directory /lib/modules/4.14.18-sunxi On 5/28/2018 at 10:57 PM, zador.blood.stained said: There is no w1-sunxi module on mainline, w1-gpio is used with Device Tree overlays instead of it video from above, reboot fine: https://github.com/armbian/sunxi-DT-overlays/blob/3db678af0d330e68317e3b7c8ed0738c70d2c772/sun8i-h3/sun8i-h3-w1-gpio.dts#L24 sticking it to the right gpio pin is obviously also needed.
c.man Posted May 30, 2018 Author Posted May 30, 2018 what is the correct pin in GPIO ? gpios = <&pio 3 14 0>; /* PD14 */ I attacched so in GPIO: GPIO P02......... +5V GPIO P06......... GND GPIO P37......... data Is it correct ?
martinayotte Posted May 30, 2018 Posted May 30, 2018 PD14 GPIO is on pin 12 ... Make sure you have a PullUp on the data line ...
c.man Posted May 30, 2018 Author Posted May 30, 2018 thank you very match !! now work !! So is not necessary to load w1-sunxi module and pin number in GPIO is it changed. Why don't write it in updating version ? Is it crazing...
chwe Posted May 30, 2018 Posted May 30, 2018 People here write documentation for a reason. E.g. going here: https://docs.armbian.com/User-Guide_Allwinner_overlays/ you'll see: Quote Quick start Check the README.<soc-id>-overlays in /boot/dtb/overlay/ (32-bit SoCs) or /boot/dtb/allwinner/overlay/ (64-bit SoCs) for a list of provided overlays, their required and optional parameters Add names of overlays you want to activate to overlays= line in /boot/armbianEnv.txt, separated with spaces Add required parameters with their values to /boot/armbianEnv.txt, one per line Add optional parameters with their values to /boot/armbianEnv.txt if you want to change the default value, one per line If you didn’t find the required overlay or want to change one of provided overlays, refer to “Using custom overlays” section Reboot and then: nano /boot/dtb/overlay/README.sun8i-h3-overlays ### w1-gpio Activates 1-Wire GPIO master Requires an external pull-up resistor on the data pin or enabling the internal pull-up Parameters: param_w1_pin (pin) Data pin for 1-Wire master Optional Default: PD14 param_w1_pin_int_pullup (bool) Enable internal pull-up for the data pin Optional Default: 0 Set to 1 to enable the pull-up This option should not be used with multiple devices, parasite power se$ or long wires - please use external pull-up resistor instead and in the end: http://lmgtfy.com/?q=PD14+orangepi+pc where the second hit under pictures shows you exactly which pin PD14 is. It is there, where it belongs in the Documentation and even on your Armbian on the board. Okay, you probably need the documentation to know where you find it on your board, but that's what documentations are for...
Recommended Posts