One Wire Device Tree

315 views
Skip to first unread message

Ray Madigan

unread,
Mar 5, 2016, 8:59:46 PM3/5/16
to BeagleBoard
I have been looking for way too long so maybe I don't know what to search for.

I am attempting to get the ds18B20 temperature sensor working on a rev b beaglebone black that is running jessie 4.5 that I downloaded from the official place.  I have a beaglebone rev c that uses the capemgr device tree mechanism and I know how to make that work.  I can't seem to find any reference that will get me started with the no capemgr device tree implementation.

Can someone point me to a place that will help me figure this out?  Or should I go back to the original angstrom distribution?

Thanks

Robert Nelson

unread,
Mar 5, 2016, 9:39:39 PM3/5/16
to Beagle Board, raymond...@gmail.com

William Hermans

unread,
Mar 5, 2016, 9:46:27 PM3/5/16
to beagl...@googlegroups.com
In addition to what Robert has shown you there . . . the internet is literally littered with guides, blogs, and random ramblings on getting the ds18x20 devices working on both the Beaglebone's, and the rPI . . . Heres one.

http://mkaczanowski.com/one-wire-ds1820-thermometer-with-beaglebone-black-libmicrohttpd/

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ray Madigan

unread,
Mar 6, 2016, 11:19:18 AM3/6/16
to BeagleBoard
Thank to both of you, I do appreciate the information.

I have read and implemented several of the instructions that have the cape manager in /sys/devices/cape_mgr.9/slots to read the temperature and they work sure enough.  The problem is, I have an older Rev B device that is running the image debian-8.3-ixqt and the device tree is slightly different.  I followed a couple of examples and I couldn't get it to work so I figured I needed to understand how the mechanism works because eventually I need to turn on and off some devices via a transistor and just copying something from the web doesn't tell me what each section of the device tree does. and how the two versions, different capemgr locations,  are different.  

The last example i tried suggested i put the dtbo in /boot/uEnv.txt and now the bone won't boot, all four led's stay lit so I feel it is time to stop counting on guess work and hope that what someone writes in a blog somewhere actually has worked on a recent image and figure out what I am doing.

Thanks for all of your help.

Robert Nelson

unread,
Mar 6, 2016, 11:36:23 AM3/6/16
to Beagle Board, raymond...@gmail.com

The link I gave you if for the 8.3 lxqt image..

Actually take a look at the example.sh

You'll probably need to rebuild the bb.org-overlays repo but that's explained in the eadme.MD..

Mark A. Yoder

unread,
Aug 2, 2016, 10:33:56 AM8/2/16
to BeagleBoard, raymond...@gmail.com
Robert:
  When I do:
echo BB-W1-P9.12 > $SLOTS
I get the following dmesg:
[Aug 2 10:25] bone_capemgr bone_capemgr: part_number 'BB-W1-P9.12', version 'N/A'
[  +0.000071] bone_capemgr bone_capemgr: slot #7: override
[  +0.000042] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[  +0.000046] bone_capemgr bone_capemgr: slot #7: 'Override Board Name,00A0,Override Manuf,BB-W1-P9.12'
[  +0.002030] bone_capemgr bone_capemgr: slot #7: BB-W1-P9.12 conflict P9.12 (#4:univ-emmc)
[  +0.008575] bone_capemgr bone_capemgr: slot #7: Failed verification

It looks like something already has P9_12. I've disabled the HDMI (audio and video).  What else should I do?

--Mark

TJF

unread,
Aug 3, 2016, 11:13:52 AM8/3/16
to BeagleBoard, raymond...@gmail.com
Hello Mark!


Am Dienstag, 2. August 2016 16:33:56 UTC+2 schrieb Mark A. Yoder:
Robert:
  When I do:
echo BB-W1-P9.12 > $SLOTS
I get the following dmesg:
[Aug 2 10:25] bone_capemgr bone_capemgr: part_number 'BB-W1-P9.12', version 'N/A'
[  +0.000071] bone_capemgr bone_capemgr: slot #7: override
[  +0.000042] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[  +0.000046] bone_capemgr bone_capemgr: slot #7: 'Override Board Name,00A0,Override Manuf,BB-W1-P9.12'
[  +0.002030] bone_capemgr bone_capemgr: slot #7: BB-W1-P9.12 conflict P9.12 (#4:univ-emmc)
[  +0.008575] bone_capemgr bone_capemgr: slot #7: Failed verification

It looks like something already has P9_12. I've disabled the HDMI (audio and video).  What else should I do?

Did you enable cape_universal? It claims all free pins. Perhaps you have to free that pin in the overlay (if you need cape_universal, otherwise just disable it).

BR

Mark A. Yoder

unread,
Aug 3, 2016, 1:37:17 PM8/3/16
to BeagleBoard, raymond...@gmail.com
BR:
  I got it working by adding this line:
cape_enable=bone_capemgr.enable_partno=BB-W1-P9.12
to /boot/uEnv.txt and rebooting.

Now the problem is I can't use the other gpio pins:
# config-pin -q P9_11
P9_11 pinmux file not found!
cape-universala overlay not found
run "config-pin overlay cape-universala" to load the cape
# config-pin overlay cape-universala
Loading cape-universala overlay
sudo: unable to resolve host yoder-debian-bone
bash: line 0: echo: write error: No such file or directory
Error loading device tree overlay file: cape-universala

Do I have to edit a dts file to get both working? What's the proper way to do it?

--Mark

William Hermans

unread,
Aug 3, 2016, 5:12:15 PM8/3/16
to beagl...@googlegroups.com, mark.a...@gmail.com
Mark,

I would say yes, you have to make your own overlay. I ran into this before too. The way I did this was simply merge the pin definitions I needed from both files into a single file.  A unique file of course.

Unless you know the different overlays are not going to have pin conflicts, or collisions. You should probably write your own overlay.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
Aug 3, 2016, 5:22:25 PM8/3/16
to Beagle Board
On Wed, Aug 3, 2016 at 12:37 PM, Mark A. Yoder <mark.a...@gmail.com> wrote:
> BR:
> I got it working by adding this line:
> cape_enable=bone_capemgr.enable_partno=BB-W1-P9.12
> to /boot/uEnv.txt and rebooting.
>
> Now the problem is I can't use the other gpio pins:
> # config-pin -q P9_11
> P9_11 pinmux file not found!
> cape-universala overlay not found
> run "config-pin overlay cape-universala" to load the cape
> # config-pin overlay cape-universala
> Loading cape-universala overlay
> sudo: unable to resolve host yoder-debian-bone
> bash: line 0: echo: write error: No such file or directory
> Error loading device tree overlay file: cape-universala
>
> Do I have to edit a dts file to get both working? What's the proper way to
> do it?

onewire, is an oddity, as it's not hardware backed. It's a kernel
software library that get's attached to a specified gpio.

In the case of universal-io, we'd need to either define all io as a
possble onewire device, or maybe just a set few..

Regards,

--
Robert Nelson
https://rcn-ee.com/

William Hermans

unread,
Aug 3, 2016, 5:35:38 PM8/3/16
to beagl...@googlegroups.com

onewire, is an oddity, as it's not hardware backed.  It's a kernel
software library that get's attached to a specified gpio.

In the case of universal-io, we'd need to either define all io as a
possble onewire device, or maybe just a set few..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Robert,

So if you leave that pin, or a specific set of pin out of any device tree file that you have loaded. It should work right ?

Reply all
Reply to author
Forward
0 new messages