On 3 September 2016 at 13:04, Jan Kandziora <j...@gmx.de> wrote:
> Am 03.09.2016 um 10:36 schrieb Colin Law:
>> I want to use owserver on a raspberry pi (zero) running Raspbian
>> (Jessie) using the method of direct connection to GPIO pins with a
>> pullup resistor.  Unfortunately I have found a fair amount of
>> conflicting and confusing information on this around the web.  Is
>> there an up to date and authoritative write up somewhere on how to do
>> this?
>>
> 1. You have to recall the Raspberry Pi's GPIOs are 3.3V. You'll have a
> non-standard 3.3V Onewire then. That's okay for the DS18B20, but for
> other Onewire chips, you have to check the datasheets. Same, if you
> use an external pullup, it has to go to 3.3V, not 5V.
>
> Of course, you can always use this simple level shifting circuit, should
> you need a 5V Onewire:
>
> |
> |        +5V ----.           ,-----+---- +3.3V
> |                |           |     |
> |                \         G |     \
> |                /      –––––'     /
> |                \    ––– – –––    \
> |                |     |  ^  |     |
> | 5V bus line ---+-----'  '--+-----+---- 3.3V bus line
> |                      D     S
> |
>
> The transistor is a small signal N-channel enhancement mode MOSFET, e.g. a
> 2N7000, BS170 or MMBF170. The value of the two pullup resistors depend on
> the pullup current you need, 1.5kΩ is okay for most cases.
>
>
> 2. You have to put
>
> dtoverlay=w1-gpio,gpiopin=4
>
> or
>
> dtoverlay=w1-gpio-pullup,gpiopin=4,pullup=5
>
> into your Raspberry Pi boot partition config.txt. And of course, the
> w1-gpio resp. w1-gpio-pullup dtb files have to be present in the boot
> partition overlays directory. Then reboot.
>
>
> 3. You have to use --w1 for this. The w1 kernel driver is the only way
> to use the bitbanging host adapter.
>
>
> 4. You have to update your owfs to 3.1p1 or later, because Debian Jessie
> uses kernel 3.16.x, and there was a long-unseen incompatiblity between
> post-3.16rc kernels and pre-3.1p1 owfs.
>
> You can use the owfs packages from the Raspbian testing repository. Edit
> (or create) your /etc/apt/preferences to contain:
> --------------------------------------------------------------------------
> Package: *
> Pin: release o=Raspbian,a=stable
> Pin-Priority: 500
>
> Package: *
> Pin: release o=Raspbian,a=testing
> Pin-Priority: 300
> --------------------------------------------------------------------------
> This is important so you keep stable (Jessie) for all packages but the ones
> explicitly taken from testing (Stretch).
>
>
> Then, add a line
> --------------------------------------------------------------------------
> deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib 
> non-free rpi
> --------------------------------------------------------------------------
> to your /etc/apt/sources.list to get access to the Raspbian testing
> repository.
>
> Do an
>
> $ sudo apt-get update
>
> to read the package metadata, then check
>
> $ sudo apt-cache policy
>
> whether the testing repo is there with priority 300. Then
>
> $ sudo apt-get update -t testing owserver ow-shell
>
> That should install all you need, including the startup files and systemd 
> units.
> Note you have to edit /etc/owfs.conf again to contain (this and only this)
> --------------------------------------------------------------------------
> !server: server = localhost:4304
> server: w1
> --------------------------------------------------------------------------
> Restart the owserver service after that.
>
>
> Done.

That's great Jan

Many thanks

Colin

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to