carlos8agomez Posted January 23, 2023 Share Posted January 23, 2023 I have an orange pi zero 2 and I need to configure the 1-wire protocol. I need to know which gpio pin to connect to. Thanks 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted January 23, 2023 Share Posted January 23, 2023 moved 0 Quote Link to comment Share on other sites More sharing options...
ALIGMSTEN Posted January 24, 2023 Share Posted January 24, 2023 Hi, haven't tried myself, think you have to add these lines to /boot/armbianEnv.txt. Check https://linux-sunxi.org/1-Wire regards hardware, reading further not sure which pin opiz2, have you looked at manual? What have you tried? Tell us a bit more and perhaps we can help, .. uname -a etc. Which sensor? what protocol(com can be different), hook up etc.. Also read up about overlays and MOSI PH7. There's lots of info in the forums. Might not be possible with current or edge configurations etc .. without personal efforts.... overlays=w1-gpio param_w1_pin=???? param_w1_pin_int_pullup=0 0 Quote Link to comment Share on other sites More sharing options...
lampra Posted January 25, 2023 Share Posted January 25, 2023 1 Quote Link to comment Share on other sites More sharing options...
carlos8agomez Posted January 26, 2023 Author Share Posted January 26, 2023 Hi ALIGMSTEN. Those lines you say I have them on. The sensor is the DS18B20. The problem is that nowhere does it indicate where to put the data cable and what pin to put in the file. 0 Quote Link to comment Share on other sites More sharing options...
ALIGMSTEN Posted January 26, 2023 Share Posted January 26, 2023 Hi @carlos8agomez, which module are you using, assuming w1_gpio? There is an alternative that supports your sensor type, kernel driver w1_therm (W1_THERM_DS18B20, 0x28). For example, you could try MOSI, PH7, pin 19, gpio 231 (apparently better transfer, I have no clue though, can’t verify, not tried anything) this is SPI 1 bus, which could add to your complications. Unfortunately that is not enabled by default in the current or edge images, and will require you to do this. @orangepizero2:~ $ ls -l /dev/spidev* ls: cannot access '/dev/spidev*': No such file or directory @orangepizero2:~ $ dmesg | grep spi* [ 1.599280] sun6i-spi 5010000.spi: Failed to request TX DMA channel [ 1.599290] sun6i-spi 5010000.spi: Failed to request RX DMA channel For a user to do that you will have added an overlay, this is again not by default for Zero2 here now, and note what @lampra advised at the beginning of mainline development. You could probably be better off looking at PC10, however there could also be issues that would require you to dig deeper, and there is an overlay to write, paying attention to compatible = "allwinner,sun50i-h616 "; and its nodes. If you struggle with any of this I would suggest at least, reading the documentation, pin outs and their respective assignments, and trying @lampra suggestion above. Sorry I can’t be more helpful, than suggestions, I have not actually tried to do this for One wire sensors on opiz2. 0 Quote Link to comment Share on other sites More sharing options...
lampra Posted January 26, 2023 Share Posted January 26, 2023 (edited) @carlos8agomez It seems that you do not read. You have all the info from me and@ALIGMSTEN but you keep asking the same question. In my post, I write: [ 5.576315] sun50i-h616-pinctrl 300b000.pinctrl: pin PC9 already requested by onewire@0; cannot claim for 300b000.pinctrl:73 ..... modprobe w1-gpio-cl m1="gdt:73" Edited January 26, 2023 by lampra 0 Quote Link to comment Share on other sites More sharing options...
carlos8agomez Posted January 27, 2023 Author Share Posted January 27, 2023 Thank you @lampra. I wouldn't be asking if I saw a clear answer. I've read everything but it's not answered in a simple way. The conclusion is that it can't be done yet as no one has succeeded. Thanks 0 Quote Link to comment Share on other sites More sharing options...
lampra Posted January 31, 2023 Share Posted January 31, 2023 @carlos8agomez No this is not the answer, to your question. The answer is connect to pin PC9 that is GPIO 73 and use w1-gpio-cl 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.