Hi Zach,
On Tue, Apr 28, 2015 at 1:10 PM, Zach Bussey <
zachar...@gmail.com> wrote:
>
> Frank, thanks for putting this project together. I'm looking forward to
> making some great projects with Nerves!
>
> Right now, I'm trying to setup a Raspberry Pi, Elixir configuration, with
> support for reading a OneWire temprature sensor. After a lot of trial and
> error, I'm able to get part of the way there.
Thanks for the persistence. I have not used OneWire, so it's not too
surprising that I broke support for it.
> Following the example of commit 16462b527d7d376635eb5ff974b2c4819b0069a8
> which added I2C support by default, I've added the following to the
> 3.18.defconfig files:
>
> CONFIG_W1=y
> CONFIG_W1_MASTER_DS2490=y
> CONFIG_W1_MASTER_DS2482=y
> CONFIG_W1_MASTER_DS1WM=y
> CONFIG_W1_MASTER_GPIO=y
> CONFIG_W1_SLAVE_THERM=y
>
This makes sense. You should just need the CONFIG_W1,
CONFIG_W1_MASTER_GPIO and CONFIG_W1_SLAVE_THERM lines, but that's not
the problem.
>
> I've also added a line to the /board/raspberrypi/config.txt
>
> dtoverlay=w1-gpio-pullup,gpiopin=4
>
> Now, after building the image and booting, the w1 folder is present in
> /sys/bus. However, there are no devices listed in /sys/bus/w1/devices. If
> I add the same config line to a normal Raspbian image, in the
> /boot/config.txt file, I am able to see the devices, so I don't think it is
> an issue with the sensor, or the wiring setup to the Pi.
Ok, it's great that you tried it on Raspbian. That's a huge hint. I
think that the problem is that the FAT partition with Nerves does not
contain an overlays directory. Could you manually create an overlays
directory and copy over w1-gpio-pullup-overlay.dtb to that directory?
I think that will make it work. You can get that file from a Raspbian
SDCard or from the buildroot/output/images/rpi-firmware directory.
If that works, that file can be added to the fwup.conf file to be
included automatically. Let me know, so that I know what to do to make
OneWire work out of the box with Nerves.
> Are there any suggestions of where to look next? I've been trying to find
> some more information on how to enable this, but it seems that documentation
> for buildroot configurations are pretty sparse, or I'm just looking in the
> wrong places.
Right, Buildroot is both awesome and daunting. The people on the
Buildroot IRC and mailing list are usually very friendly and helpful.
This may sound strange, but I find the Arch Wiki [1] handy when it
comes to Linux configuration with Buildroot.
Thanks,
Frank
[1]
https://wiki.archlinux.org/index.php/Main_page
--
Frank Hunleth
Troodon Software LLC
Embedded Software Development
http://troodon-software.com/