New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility of using One Wire again #53
Comments
We'll look into this, thanks for the suggestion! |
EDIT Sep 13, 2023: Now that #62 enables loading device tree overlays at run time. Let's make a dt overlay package for enabling one wire on GPIO19 Example device tree overlay file for one-wire on Raspberry Pi: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts @jempatel please work on this one next |
Hi @jempatel I followed the circuit setup from https://docs.onion.io/omega2-starter-kit/starter-kit-temp-sensor.html
Could you push changes to openwrt-22.03 that enable one-wire, and I'll try them out on the same circuit? |
Thanks @greenbreakfast , the issue was with the jumper cable at my end, with the new jumper cable, it works fine. I am testing new changes at my end now. |
@jempatel wanted to check in and see how's it going with one-wire |
Hi @greenbreakfast, Its done I was applying changes to load dtbo without rebooting omega2 after package installation. It's tested and usable now, Changes are pushed into MR: https://github.com/OnionIoT/OpenWRT-Packages/pull/75/files |
Thanks @jempatel, I tried it out on the beta firmware and it worked great! Can you please add some basic documentation to: https://github.com/OnionIoT/documentation/blob/main/docs/hardware-interfaces/one-wire.md @DocHardinger Please try it out and let us know how it goes! For reference, here's what I did:
I connected a DS18B20+ sensor to GPIO19 and got this kernel message:
Then I read the sensor data:
|
Great! Will check this out on the weekend |
I get these results in kernel log, but maybe there is something wrong with the hardware: [ 1268.018639] kmodloader: loading kernel modules from /etc/modules.d/* Ok my fault, i connected the sensor to GPIO 11. So its just searching for devices on GPIO19. Is it possible to change the GPIO which one wire is using, like in older firmware using insmod |
Yep, we can make that change. What GPIO would you prefer? I would avoid GPIO11 since the bootloader will always program it to output high (https://docs.onion.io/omega2-docs/using-gpios.html#reset-led-pins) |
What about GPIO41? |
@DocHardinger I'd like to keep this useful to both Omega2 and Omega2S users, so I'd prefer GPIOs that are pinned out on the Omega2 through-hole models as well: https://docs.onion.io/omega2-docs/omega2p.html#the-pins-1 What do you think about GPIOs 0, 1, 2, or 3? |
Sounds good! |
GPIO 2 is perfect for us! |
Closing this issue - I've made a new issue (#76) to track changing the GPIO for the one-wire bus master. EDIT: forgot to mention, documentation for using one-wire available at https://documentation.onioniot.com/device-tree-overlay/one-wire-devices |
Context
OpenWrt 22.03.
Motivation
Would be nice to use One Wire again in OpenWrt 22.03.
Description
In 18.06. One Wire is working. But in newer version of OpenWrt w1-gpio-custom has been removed. So would be great to find another solutin to use One Wire again.
Alternatives Considered
Find a way to use One Wire again
The text was updated successfully, but these errors were encountered: