javalatte Posted September 2, 2018 Posted September 2, 2018 I am trying to get a DS18B20 working on an OrangePi zero running Armbian. The DS18B20 has a pull-up resistor and works on a Raspberry Pi, and is connected to PA10, +5V and Gnd. I have modified /etc/modules-load.d/modules.conf thus: g_serial w1-sunxi w1-gpio w1-therm I have modified /etc/default/cpufrequtils thus: ENABLE=true MIN_SPEED=480000 MAX_SPEED=1200000 GOVERNOR=interactive After a reboot, dmesg looks like this: [ 8.970765] g_serial gadget: Gadget Serial v2.4 [ 8.970777] g_serial gadget: g_serial ready [ 8.995601] Driver for 1-wire Dallas network protocol. [ 9.083869] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro Note the absence of anything like "[8.xxxxx] W1_SUNXI: Added w1-gpio on GPIO-10", and when I look in /sys/bus/w1/devices, there is nothing there. I ran armbianmonitor -u, and the output is at http://ix.io/1lNv. lsmod shows me this: w1_therm 16384 0 w1_gpio 16384 0 wire 20480 2 w1_gpio,w1_therm
martinayotte Posted September 2, 2018 Posted September 2, 2018 You should not load w1-* using modules.conf, but using /boot/dtb/overlay/sun8i-h3-w1-gpio.dtb overlay file, it will load modules automatically. To enable this overlay simply add the following in /boot/armbianEnv.txt : overlays=w1-gpio param_w1_pin=PA10 param_w1_pin_int_pullup=1
javalatte Posted September 24, 2018 Author Posted September 24, 2018 Thanks for the suggestion, Martin. I tried enabling w1-gpio in /boot/armbianEnv.txt. I still get the message saying that the driver for the 1-wire Dallas network protocol is loaded, but I still don't get "[8.xxxxx] W1_SUNXI: Added w1-gpio on GPIO-10", and when I look in /sys/bus/w1/devices, there is nothing there. I have an external pullup, so I first tried with param_w1_pin_int_pullup=0, and also tried with the pullup enabled. I used this guide to set it up: is there anything more up to date?
martinayotte Posted September 24, 2018 Posted September 24, 2018 Unfortunately, I don't see what is the problem, OneWire is so simple. Are you really using a Mainline kernel ? When you used overlay like I suggested, did you removed the ones in /etc/modules ? Maybe you have defective device ? BTW, the message that should be seen is not "W1_SUNXI: Added w1-gpio on GPIO-10", but something like "w1_master_driver w1_bus_master1: Attaching one wire slave 28.000005a2fac5 crc ea"
chwe Posted September 24, 2018 Posted September 24, 2018 there you go: On 9/2/2018 at 5:30 AM, javalatte said: connected to PA10, +5V and Gnd. sounds fishy.. I assume it won't harm it.. but having a bad experience with VCC 5V against something which is only 3.3V tolerant.. edit: @martinayotte most likely it's PA10 != default pin for the w1 overlay.. Edit2: (but your Env.txt should fix that)
martinayotte Posted September 24, 2018 Posted September 24, 2018 6 minutes ago, chwe said: most likely it's PA10 != default pin for the w1 overlay. That is why I've mentioned to use overlay params since default GPIO is effectively PD14 which isn't breakout on OPiZ : overlays=w1-gpio param_w1_pin=PA10 param_w1_pin_int_pullup=1
chwe Posted September 24, 2018 Posted September 24, 2018 5 minutes ago, martinayotte said: That is why I've mentioned to use overlay params saw it and added 17 minutes ago, chwe said: Edit2: (but your Env.txt should fix that) well, we might have it open at the same time.. [off-topic] after: we might need an overlay/w1 tutorial too.. Since https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1b3bd8592780c87c5eddabbe98666b086bbaee36 I actually might have an use-case for overlays.. I like mox sensors..
javalatte Posted September 27, 2018 Author Posted September 27, 2018 On 9/24/2018 at 8:46 PM, martinayotte said: Unfortunately, I don't see what is the problem, OneWire is so simple. Are you really using a Mainline kernel ? When you used overlay like I suggested, did you removed the ones in /etc/modules ? Maybe you have defective device ? BTW, the message that should be seen is not "W1_SUNXI: Added w1-gpio on GPIO-10", but something like "w1_master_driver w1_bus_master1: Attaching one wire slave 28.000005a2fac5 crc ea" I am using "5.60 stable Debian GNU/Linux 9 (stretch) 4.14.70-sunxi". Yes, I removed the w1-items from /etc/modules. The DS18B20 works fine on a Raspberry Pi. Pin PA10 on the OrangePi works fine when I connect a DHT-11 sensor. I tried on PA13 too, same problem. I tried connecting to +3.3V instead of +5V, same problem.
javalatte Posted September 27, 2018 Author Posted September 27, 2018 While trying to get an i2c device to work, I noticed that cpufrequtils had been reset to its initial value. I changed it back to the settings in my initial post, ENABLE=true MIN_SPEED=480000 MAX_SPEED=1200000 GOVERNOR=interactive and now I get these messages: [ 64.125578] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c [ 64.132874] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered. [ 127.749985] w1_master_driver w1_bus_master1: Attaching one wire slave 00.400000000000 crc 46 [ 127.759739] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered. [ 178.507484] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c00000000000 crc ca [ 178.514977] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered. [ 183.312549] xradio_wlan mmc1:0001:1: missed interrupt [ 254.928772] w1_master_driver w1_bus_master1: Attaching one wire slave 00.200000000000 crc 23 [ 254.936140] w1_master_driver w1_bus_master1: Family 0 for 00.200000000000.23 is not registered. [ 318.499787] w1_master_driver w1_bus_master1: Attaching one wire slave 00.a00000000000 crc af [ 318.507330] w1_master_driver w1_bus_master1: Family 0 for 00.a00000000000.af is not registered. [ 356.420385] w1_master_driver w1_bus_master1: Attaching one wire slave 00.600000000000 crc 65 [ 356.427372] w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered. [ 396.931063] w1_master_driver w1_bus_master1: Attaching one wire slave 00.e00000000000 crc e9 [ 396.938592] w1_master_driver w1_bus_master1: Family 0 for 00.e00000000000.e9 is not registered. [ 459.914227] w1_master_driver w1_bus_master1: Attaching one wire slave 00.100000000000 crc 9d [ 459.920797] w1_master_driver w1_bus_master1: Family 0 for 00.100000000000.9d is not registered. Still wrong, but wrong in a slightly more encouraging way....
FRANK333 Posted December 18, 2018 Posted December 18, 2018 good morning to all, I have an OPzero+ with armbian ubuntu 4.14.78-sunxi64 I connected a ds18b20+4.7k respectively to pins 25 (gnd) to pin 17 (3.3V) and to pin 12 (PA7). I activated in armbian-config w1-gpio. I added param_w1_pin=PA7 to the file /boot/armbianEnv.txt but does not recognize the sensor (in dmesg [ 52.655912] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c [ 52.659727] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.) Is there any trick to fix the bug? tnx
martinayotte Posted December 18, 2018 Posted December 18, 2018 3 hours ago, FRANK333 said: Is there any trick to fix the bug? Do you have a 3K3 pullup on W1 data line ?
FRANK333 Posted December 18, 2018 Posted December 18, 2018 yes martinayotte, i have a 4.7KΩ resistor between the data pin and the vcc pin of the ds18b20 and 40 cm of three-pole cable with 1 mm Ø wires. I've read most of your previous posts on the problem.
martinayotte Posted December 18, 2018 Posted December 18, 2018 2 hours ago, FRANK333 said: yes martinayotte, i have a 4.7KΩ resistor The, I'm running out of idea ... Perhaps it is related to cpufreq ?
FRANK333 Posted December 18, 2018 Posted December 18, 2018 I tried in cpufrequtil to put GOVERNOR=interactive but it does not work. I think it's a different gpio table and connector pins; do you know where to find an updated table?
martinayotte Posted December 18, 2018 Posted December 18, 2018 14 minutes ago, FRANK333 said: do you know where to find an updated table Ah ! I've been confused between title OPiZero and you've mentioned OPiZeroPlus ... http://linux-sunxi.org/File:ORANGE_PI-ZERO-PLUS_V1_0_Schematic.pdf But it still Pin12=PA7 ... If you have OPiZeroPlus2, then it is Pin12=PD11 ... http://linux-sunxi.org/File:ORANGE_PI-ZERO-PLUS2_V1_0.pdf
FRANK333 Posted December 18, 2018 Posted December 18, 2018 I tried also pin12=PD11, but I couldn't do it. It's a pity it doesn't work.
martinayotte Posted December 18, 2018 Posted December 18, 2018 41 minutes ago, FRANK333 said: It's a pity it doesn't work. I will check on my Zero boards, but right now, I have my OPi+2E and OPiOne+ with DS18B20, and both working fine ...
FRANK333 Posted December 18, 2018 Posted December 18, 2018 the pizero+ with cpu H5 and armbian works very well as a small server for home, I wanted to detect the temperature inside the 'cabinet without other devices, but I will have to connect a TTL-USB converter and use digitemp .
martinayotte Posted December 18, 2018 Posted December 18, 2018 3 minutes ago, FRANK333 said: pizero+ with cpu H5 Mine is OPiZero+2-H5 ...
FRANK333 Posted December 18, 2018 Posted December 18, 2018 exactly this http://www.orangepi.org/OrangePiZeroPlus/ I read that with old kernels there were no problems, in your opinion could it be that the new kernel has something that prevents it from working?
martinayotte Posted December 18, 2018 Posted December 18, 2018 20 minutes ago, FRANK333 said: in your opinion could it be that the new kernel has something that prevents it from working? I don't know, I don't have the PlusPlain, only Plus2-H3 and Plus2-H5, both are working fine with latest Dev Mainline 4.19.x. EDIT : I've just moved one of my DS18B20 from OPiOne+ onto the OPi+2-H5, and it is working fine on PD11 with its current 4.19.4 ...
FRANK333 Posted December 18, 2018 Posted December 18, 2018 Spoiler root@server:~# cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PA0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 1 (PA1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 2 (PA2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 3 (PA3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 4 (PA4): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA4 pin 5 (PA5): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA5 pin 6 (PA6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PA7): onewire@0 1c20800.pinctrl:7 function gpio_in group PA7 pin 8 (PA8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 9 (PA9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 10 (PA10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 11 (PA11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 12 (PA12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PA13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 14 (PA14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 15 (PA15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 16 (PA16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 17 (PA17): (MUX UNCLAIMED) 1c20800.pinctrl:17 pin 18 (PA18): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 19 (PA19): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 20 (PA20): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 21 (PA21): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 64 (PC0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 65 (PC1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 66 (PC2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 67 (PC3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 68 (PC4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 69 (PC5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 70 (PC6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 71 (PC7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 72 (PC8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 73 (PC9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 74 (PC10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 75 (PC11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 76 (PC12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 77 (PC13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 78 (PC14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 79 (PC15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 80 (PC16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 96 (PD0): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD0 pin 97 (PD1): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD1 pin 98 (PD2): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD2 pin 99 (PD3): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD3 pin 100 (PD4): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD4 pin 101 (PD5): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD5 pin 102 (PD6): (MUX UNCLAIMED) 1c20800.pinctrl:102 pin 103 (PD7): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD7 pin 104 (PD8): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD8 pin 105 (PD9): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD9 pin 106 (PD10): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD10 pin 107 (PD11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 108 (PD12): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD12 pin 109 (PD13): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD13 pin 110 (PD14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 111 (PD15): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD15 pin 112 (PD16): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD16 pin 113 (PD17): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD17 pin 128 (PE0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 129 (PE1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 130 (PE2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 131 (PE3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 132 (PE4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 133 (PE5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 134 (PE6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 135 (PE7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 136 (PE8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 137 (PE9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 138 (PE10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 139 (PE11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 140 (PE12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 141 (PE13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 142 (PE14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 143 (PE15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 160 (PF0): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF0 pin 161 (PF1): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF1 pin 162 (PF2): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF2 pin 163 (PF3): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF3 pin 164 (PF4): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF4 pin 165 (PF5): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF5 pin 166 (PF6): 1c0f000.mmc 1c20800.pinctrl:166 function gpio_in group PF6 pin 192 (PG0): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG0 pin 193 (PG1): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG1 pin 194 (PG2): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG2 pin 195 (PG3): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG3 pin 196 (PG4): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG4 pin 197 (PG5): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG5 pin 198 (PG6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 199 (PG7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 200 (PG8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 201 (PG9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 202 (PG10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 203 (PG11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 204 (PG12): (MUX UNCLAIMED) 1c20800.pinctrl:204 pin 205 (PG13): (MUX UNCLAIMED) (GPIO UNCLAIMED) root@server:~# Spoiler root@server:~# cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PA0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 1 (PA1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 2 (PA2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 3 (PA3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 4 (PA4): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA4 pin 5 (PA5): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA5 pin 6 (PA6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PA7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PA8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 9 (PA9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 10 (PA10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 11 (PA11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 12 (PA12): onewire@0 1c20800.pinctrl:12 function gpio_in group PA12 pin 13 (PA13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 14 (PA14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 15 (PA15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 16 (PA16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 17 (PA17): (MUX UNCLAIMED) 1c20800.pinctrl:17 pin 18 (PA18): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 19 (PA19): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 20 (PA20): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 21 (PA21): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 64 (PC0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 65 (PC1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 66 (PC2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 67 (PC3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 68 (PC4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 69 (PC5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 70 (PC6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 71 (PC7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 72 (PC8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 73 (PC9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 74 (PC10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 75 (PC11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 76 (PC12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 77 (PC13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 78 (PC14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 79 (PC15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 80 (PC16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 96 (PD0): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD0 pin 97 (PD1): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD1 pin 98 (PD2): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD2 pin 99 (PD3): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD3 pin 100 (PD4): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD4 pin 101 (PD5): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD5 pin 102 (PD6): (MUX UNCLAIMED) 1c20800.pinctrl:102 pin 103 (PD7): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD7 pin 104 (PD8): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD8 pin 105 (PD9): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD9 pin 106 (PD10): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD10 pin 107 (PD11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 108 (PD12): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD12 pin 109 (PD13): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD13 pin 110 (PD14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 111 (PD15): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD15 pin 112 (PD16): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD16 pin 113 (PD17): 1c30000.ethernet (GPIO UNCLAIMED) function emac group PD17 pin 128 (PE0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 129 (PE1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 130 (PE2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 131 (PE3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 132 (PE4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 133 (PE5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 134 (PE6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 135 (PE7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 136 (PE8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 137 (PE9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 138 (PE10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 139 (PE11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 140 (PE12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 141 (PE13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 142 (PE14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 143 (PE15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 160 (PF0): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF0 pin 161 (PF1): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF1 pin 162 (PF2): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF2 pin 163 (PF3): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF3 pin 164 (PF4): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF4 pin 165 (PF5): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF5 pin 166 (PF6): 1c0f000.mmc 1c20800.pinctrl:166 function gpio_in group PF6 pin 192 (PG0): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG0 pin 193 (PG1): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG1 pin 194 (PG2): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG2 pin 195 (PG3): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG3 pin 196 (PG4): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG4 pin 197 (PG5): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG5 pin 198 (PG6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 199 (PG7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 200 (PG8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 201 (PG9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 202 (PG10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 203 (PG11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 204 (PG12): (MUX UNCLAIMED) 1c20800.pinctrl:204 pin 205 (PG13): (MUX UNCLAIMED) (GPIO UNCLAIMED) root@server:~# ls /sys/bus/w1/devices/ w1_bus_master1 root@server:~# cat /sys/kernel/debug/gpio gpiochip1: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl: gpio-12 ( |w1 ) in hi gpio-17 ( |orangepi:red:status ) out lo gpio-102 ( |gmac-3v3 ) out hi gpio-166 ( |cd ) in lo IRQ gpio-204 ( |usb0_id_det ) in hi IRQ gpiochip0: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl: gpio-354 ( |usb0-vbus ) out lo gpio-362 ( |orangepi:green:pwr ) out hi root@server:~# the pin seems to intercept it and the ds18b20 is working if I connect it to another device, it is not defective. it is a real mystery. PS: I tried with the usual test of the resistor and the led and the small script in python; the test goes well and the led lights up!
FRANK333 Posted December 20, 2018 Posted December 20, 2018 root@server:/sys/bus/w1/devices/28-8000001f9605# cat /proc/version Linux version 4.18.8-sunxi64 (root@nightly) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #262 SMP Wed Sep 19 12:14:53 CEST 2018 root@server:/sys/bus/w1/devices/28-8000001f9605# cat w1_slave 64 01 ff ff 7f ff ff ff 02 : crc=02 YES 64 01 ff ff 7f ff ff ff 02 t=22250 root@server:/sys/bus/w1/devices/28-8000001f9605# dmesg | grep wire [ 6.252692] Driver for 1-wire Dallas network protocol. [ 6.276884] gpio-7 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 6.311040] w1_master_driver w1_bus_master1: Attaching one wire slave 28.8000001f9605 crc f0 root@server:/sys/bus/w1/devices/28-8000001f9605# with version Nightly 4.18.8 immediately recognized the sensor. now what do you advise me to do (keep the kernel nightly or wait for a stable version) before loading all the packages that I need?
martinayotte Posted December 21, 2018 Posted December 21, 2018 13 hours ago, FRANK333 said: keep the kernel nightly or wait for a stable version "stable" is always a relative vague definition ... If the nightly is stable for you use-cases, keep it as a backup for awhile, and in few months, maybe with some 4.20.y, things may be even more stable and you will decide to switch.
FRANK333 Posted December 21, 2018 Posted December 21, 2018 Ok martinayotte, I'll do as you say. I ask you: could you look for the differences between the two versions (nightly and mainline) in the 1wire software or is it an impossible procedure?
martinayotte Posted December 21, 2018 Posted December 21, 2018 4 hours ago, FRANK333 said: differences between the two versions (nightly and mainline) in the 1wire Between 4.18.8 and 4.19.9 ? I don't think there is any diffs. Between the previous 4.14.78 and mainline ? probably there is something since it didn't work for you, but it is not obvious to find. Also, I don't care much about 4.14.78, as a developper, my interests are always to stay as much up-to-date with 4.19.y ...
FRANK333 Posted December 21, 2018 Posted December 21, 2018 16 minutes ago, martinayotte said: probably there is something since it didn't work for you, but it is not obvious to find. that's what I doubted. Thank you for answering me Martin, Happy Holidays!
mantouboji Posted January 20, 2019 Posted January 20, 2019 yaofei@opione2:~$ uname -a Linux opione2 4.19.13-sunxi #5.70 SMP Sat Jan 12 15:43:21 CET 2019 armv7l armv7l armv7l GNU/Linux yaofei@opione2:~$ ls /sys/bus/w1/devices/ 00-2c00a1004810 00-cc00a1004810 w1_bus_master1
FRANK333 Posted January 21, 2019 Posted January 21, 2019 mantouboji, must work! What kind of sensor have you connected (to92 or waterproof type) and above all is connected as in my diagram above and in the photo? Have you tried to connect the sensor on another device? https://datasheets.maximintegrated.com/en/ds/DS18S20.pdf
martinayotte Posted January 21, 2019 Posted January 21, 2019 49 minutes ago, FRANK333 said: What kind of sensor have you connected (to92 or waterproof type) In my case, I've used TO-92, both it should not make any difference...
Recommended Posts