missing dir /sys/devices/bone_capemgr.9/slots in BBB img

5,219 views
Skip to first unread message

hgi

unread,
Dec 7, 2014, 4:21:24 PM12/7/14
to beagl...@googlegroups.com

Robert-C-Nelson's image the BBB-eMMC-flasher-ubuntu-14.04.1-console-armhf-2014-10-29-2gb.img.xz
and flash it into BBB A6A eMMC,
BUT after a short preparations, 
I have noticed for a missing directory: /sys/devices/bone_capemgr.9/  

it seems a bug, but could I missed something ?
someone's assist ?

Actually I'm trying to solve the auto load DT on boot,
I planned to use script capemgr-ubuntu.sh I DL from:  init_scripts
the script read on boot the file (/etc/default/capemgr) content 
and load the relevant device-tree-overlay


2) 
where planned Robert-C-Nelson to put capemgr-ubuntu.sh script, in order to be executed on boot ?

many thanks in adavance
H.

William Hermans

unread,
Dec 7, 2014, 4:30:28 PM12/7/14
to beagl...@googlegroups.com
I have noticed for a missing directory: /sys/devices/bone_capemgr.9/ 

Have you tried

$ ls -al  /sys/devices/bone_capemgr.*

??

The path is not guaranteed to be at  /sys/devices/bone_capemgr.9 it could even be at
 /sys/devices/bone_capemgr.8.

--
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.

hgi

unread,
Dec 7, 2014, 4:37:03 PM12/7/14
to beagl...@googlegroups.com
@William Hermans
thnx,
but there is no /sys/devices/bo* at all

actually, I'm using BBB Ubuntu 13.04 and 13.10 for a while
in both of them, the /sys/devices/bone_capemgr.8/  and /sys/devices/bone_capemgr.9/
dir do exist, respectively 

H.

William Hermans

unread,
Dec 7, 2014, 4:40:24 PM12/7/14
to beagl...@googlegroups.com
Ok, so I am not familiar with that image. Which kernel is it using ?

hgi

unread,
Dec 7, 2014, 4:43:02 PM12/7/14
to beagl...@googlegroups.com
the 3.14 kernel :
root@centralSite1:/home/ubuntu# uname -a
Linux centralSite1 3.14.22-ti-r31 #1 SMP PREEMPT Sat Oct 25 01:30:27 UTC 2014 armv7l armv7l armv7l GNU/Linux

William Hermans

unread,
Dec 7, 2014, 4:44:12 PM12/7/14
to beagl...@googlegroups.com
That is why, There is no capemgr in kernels 3.14.x, 3.15.x, or 3.17 or above.

William Hermans

unread,
Dec 7, 2014, 4:48:40 PM12/7/14
to beagl...@googlegroups.com
So, I've never done this myself but Robert has made post on this group many times saying you need to edit the main board device tree file and add #include statement to load various device tree files.

I'll leave it up to you to search these groups to find this information.

hgi

unread,
Dec 7, 2014, 4:49:03 PM12/7/14
to beagl...@googlegroups.com
Which means that I can not use RCN's trick for loading dt-overlay on boot.

    but shall I expect to find the base dir for device-tree-overlay ?

regards
H.

William Hermans

unread,
Dec 7, 2014, 4:50:07 PM12/7/14
to beagl...@googlegroups.com
Yeah give me a few minutes to see if i can find some information.

William Hermans

unread,
Dec 7, 2014, 4:54:26 PM12/7/14
to beagl...@googlegroups.com
Seems like you only need to worry about the loading in uEnv.txt. No need to build from scratch unless you have a custom device tree source file.

William Hermans

unread,
Dec 7, 2014, 4:55:30 PM12/7/14
to beagl...@googlegroups.com
By the way, that was found second hit using google . . . but of course it helps if you know the differences exist to begin with.

hgi

unread,
Dec 7, 2014, 4:56:42 PM12/7/14
to beagl...@googlegroups.com
Thank you William.
I'll look into it, or just keep and use the Ubuntu 13.10 ,

I tried to find a solution for auto loading BBB DT on boot

thnx
H.

William Hermans

unread,
Dec 7, 2014, 4:58:47 PM12/7/14
to beagl...@googlegroups.com
Well, I was just saying you probably did not know what to search for so . . . but since I read at least half the posts on this group, i know this difference exists, and knew what to search for ;)

hgi

unread,
Dec 7, 2014, 5:02:07 PM12/7/14
to beagl...@googlegroups.com
William,
Yes I read all these links,
But there are a lot of posts that uEnv.txt way, do have problems, too

BTW, I loaded the my costumed DT (compile my dts to dtbo) within my c program.
but I want to the DT auto load, in the 'right way' as it was planned in the first place.

regards
H.

Robert Nelson

unread,
Dec 7, 2014, 5:04:35 PM12/7/14
to Beagle Board


On Dec 7, 2014 3:56 PM, "hgi" <site...@gmail.com> wrote:
>
> Thank you William.
> I'll look into it, or just keep and use the Ubuntu 13.10 ,
>
> I tried to find a solution for auto loading BBB DT on boot

Or you could just install 3.8 from the debian repo:

sudo apt-get update
sudo apt-get install linux-3.8.13-bone68
sudo reboot

Regards,

Robert Nelson

unread,
Dec 7, 2014, 5:05:38 PM12/7/14
to Beagle Board

sudo apt-get install linux-image-3.8.13-bone68
> sudo reboot

Opps, small correction, i've only had a dozen of this same reply this week i should remember. ;)

Regards,

William Hermans

unread,
Dec 7, 2014, 5:06:48 PM12/7/14
to beagl...@googlegroups.com
Hence why I only read 50-75% of the posts on this group hahaah

Regards,

--

hgi

unread,
Dec 7, 2014, 5:09:51 PM12/7/14
to beagl...@googlegroups.com
thanks Robert,

I'll do it,  [sudo apt-get install linux-image-3.8.13-bone68]

sorry for the bother 
regards
Haggai

hgi

unread,
Dec 7, 2014, 5:13:08 PM12/7/14
to beagl...@googlegroups.com
Robert,   could you pls direct me, where to put the capemgr-ubuntu.sh script
   in order to be exec. on boot ?

regards
H.

Robert Nelson

unread,
Dec 7, 2014, 5:15:15 PM12/7/14
to Beagle Board


On Dec 7, 2014 4:09 PM, "hgi" <site...@gmail.com> wrote:
>
> thanks Robert,
>
> I'll do it,  [sudo apt-get install linux-image-3.8.13-bone68]
>
> sorry for the bother 

It's no bother.. ;)

It just helps prove i'm loosing my mind. ;)

Regards,

hgi

unread,
Dec 7, 2014, 5:27:26 PM12/7/14
to beagl...@googlegroups.com
Yes,
the sudo apt-get install linux-image-3.8.13-bone68  then reboot
did the trick, 


And with 3.8.13, I assumes that right line in uEnv.txt should auto load the overlay on boot ?

H.

Robert Nelson

unread,
Dec 7, 2014, 5:44:55 PM12/7/14
to Beagle Board


On Dec 7, 2014 4:27 PM, "hgi" <site...@gmail.com> wrote:
>
> Yes,
> the sudo apt-get install linux-image-3.8.13-bone68  then reboot
> did the trick, 
>
>
> And with 3.8.13, I assumes that right line in uEnv.txt should auto load the overlay on boot ?

Correct! Only change was to have 3.14 by default in those images, everything else is the same underneath.

>
> H.
>
>
> On Monday, December 8, 2014 1:05:38 AM UTC+3, RobertCNelson wrote:
>>
>>
>> On Dec 7, 2014 4:04 PM, "Robert Nelson" <robert...@gmail.com> wrote:
>>
>> >
>> >
>> > On Dec 7, 2014 3:56 PM, "hgi" <site...@gmail.com> wrote:
>> > >
>> > > Thank you William.
>> > > I'll look into it, or just keep and use the Ubuntu 13.10 ,
>> > >
>> > > I tried to find a solution for auto loading BBB DT on boot
>> >
>> > Or you could just install 3.8 from the debian repo:
>> >
>> > sudo apt-get update
>> > sudo apt-get install linux-3.8.13-bone68
>> sudo apt-get install linux-image-3.8.13-bone68
>> > sudo reboot
>>
>> Opps, small correction, i've only had a dozen of this same reply this week i should remember. ;)
>>
>> Regards,
>

hgi

unread,
Dec 7, 2014, 5:54:05 PM12/7/14
to beagl...@googlegroups.com
Robert

great, 
   I'll look into it tomorrow morning (4-5hrs)
I'm happy to use a newest Ubuntu ver.
(although, I wanted to used one of latest Debian flavor :)


thanks
Haggai

eshaan...@gmail.com

unread,
Jun 9, 2016, 3:57:18 PM6/9/16
to BeagleBoard
I have tried this method. I read your post in many places about downgrading it. but when i try to do the sudo apt-get install linux-3.8.13-bone68, it shows couldn't find any package
What needs to be done? I am running on kernel 4.4

Robert Nelson

unread,
Jun 9, 2016, 4:03:02 PM6/9/16
to Beagle Board, eshaan...@gmail.com
Look at the message right after that one..
Regards,


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

Robert Nelson

unread,
Jun 10, 2016, 3:45:02 PM6/10/16
to Eshaan Ghosh, Beagle Board
On Fri, Jun 10, 2016 at 2:35 PM, Eshaan Ghosh <eshaan...@gmail.com> wrote:
> Thank you. Robert. I did try downloading that version and it worked. But
> after everything the reason why i started looking into the problem actually
> didn't solve my problem. I am trying to generate PWM using python and I am
> getting this error
>
> Getting IOError: [Errno 2] No such file or directory: '/slots'

Adafuit library?

It's being worked on..

https://github.com/adafruit/adafruit-beaglebone-io-python/commits/master

https://github.com/adafruit/adafruit-beaglebone-io-python/issues/103

Eshaan Ghosh

unread,
Jun 10, 2016, 4:11:29 PM6/10/16
to Robert Nelson, Beagle Board
Yes it is Adafruit. SO what is the best way to implement PWM? Do I mount the image of linux 3.8 on the SD card and then try it? If it doesn't work then i shall use the tree overlay?!

Eshaan Ghosh

unread,
Jun 10, 2016, 4:11:42 PM6/10/16
to Robert Nelson, Beagle Board
Thank you. Robert. I did try downloading that version and it worked. But after everything the reason why i started looking into the problem actually didn't solve my problem. I am trying to generate PWM using python and I am getting this error

Getting IOError: [Errno 2] No such file or directory: '/slots' 

How do I solve this problem?

William Hermans

unread,
Jun 10, 2016, 4:20:50 PM6/10/16
to beagl...@googlegroups.com
Eshaan,

I take it you're not exactly a programmer, or one who does not know python very well ?


The reason why I ask is that PWM is controlled via sysfs directories / files, and python like all programming languages should have file system libraries. The point here is that this would be really really easy to implement yourself.

--
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.

Eshaan Ghosh

unread,
Jun 10, 2016, 4:27:40 PM6/10/16
to Beagle Board
Hey William

I have been programming in TI F28335 DSP and Microchip MCUs. I recently moved to raspberry pi and now beaglebone. So I am not exactly familiar with python, but the implementation of PWM is not clear. I have been using MCUs to run industrial converters. But the prospect of IoT with beaglebone makes me want to move to these small credit card sized devices.
So I shall give it a try. I tried programming the beaglebone using python, Node_red, bonescript. In all case i get some different failure messages. So I am not clear of how to proceed with this!

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/OG1_tts4OcU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORoRAyUuG1hqmmqc7OWiHjeu-XnCE9HvJwseGhHMu375yA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--

ESHAAN GHOSH

William Hermans

unread,
Jun 10, 2016, 4:59:06 PM6/10/16
to beagl...@googlegroups.com
OK, well I'm not saying anything bad, just noticing that you're struggling. I was in your shoes around 3.5 years ago too.

In fact, I've not written any code for PWM on the BBB yet, but I know it's possible, and I know how. Just not all the exact details.

So, what you need to understand is how the sysfs PWM file system works. Then all you need to understand is how a good file system library for the programming language you're using works. Me, I've done this for most every "normal" peripheral except PWM, but in C, and Javascript ( Nodejs ). PWM I wont do until I get a good "test jig" to make sure I've done everything correctly.

And here is another where a person talks about how this is done from the command line. Which would be really easy to "wrap" in C, or any language with a good file system library. I've also no doubt python has at least one . . . https://briancode.wordpress.com/2015/01/06/working-with-pwm-on-a-beaglebone-black/

So if you do not understand what I mean by "wrap", here:

"use strict";
var fs = require('fs');
var path = "/sys/bus/iio/devices/iio:device0/in_voltage";

exports.read = function(ch, callback){   
        fs.access(path + ch + "_raw", fs.F_OK, (err) => {
        if(err){throw err;}
    });

    fs.readFile(path + ch + "_raw", (err, data) => {
                if(err){data = null;}
       
                callback(data);
    });
};


This is for the ADC, and this is written in Javascript for Nodejs. But the point, in code I'm using the sysfs "object" exactly how it's used from the command line with cat. Or as close as possible, while still remaining flexible.


William Hermans

unread,
Jun 10, 2016, 5:22:31 PM6/10/16
to beagl...@googlegroups.com
And ah, ok your main concern:


Getting IOError: [Errno 2] No such file or directory: '/slots' 

The Adafruit library was written for kernel 3.8.x, and with kernel 4.x that path for capemgr slots is different. You can fix this by going in and editing the code, or just manually load the cape yourself, and do as I suggest above. Write your own code to manipulate the PWM.

William Hermans

unread,
Jun 10, 2016, 5:27:17 PM6/10/16
to beagl...@googlegroups.com
My personal feeling about this Adafruit library is that it needs to die. The original maintainer has not even bothered to update his code at all. Which, I personally have very . . . Yeah I do not know I will  just say this. I wont touch this code to fix it because I have very mixed feeling about this project situation. #1 someone at Adafruit put the Adafruit name on it, so it needs to be fixed by Adafruit employees. I'm not in business making them money, for free.

Eshaan Ghosh

unread,
Jun 29, 2016, 10:48:17 AM6/29/16
to beagl...@googlegroups.com
I finally used the image 3.8.13 as explained by Robert (https://goo.gl/Odm1HU) and it did work. Infact i made the PWMs work too. I used both Adafruit 
and PyBBIO libraries and it worked seamless

And William, thank you for the suggestions. You really made me dig down and study more about the architecture of the BBB. It helped me a lot.

This encouraged me to moved further look what more the BBB can do. I found that it has a PRU. I have tried to access the PRU and program it for over a week but again no success. I went through the book by Derek Molly and also some forums where I saw your and Robert's post. I tried most of them. But again little did i get success. I suppose if I could unleash the real strength of BBB eHRPWM using PRU-ICSS, it could be used to run a motor.

lakshmi

unread,
Jul 13, 2017, 7:10:37 AM7/13/17
to BeagleBoard, eshaan...@gmail.com
Hi Robert,
 Iam using ubuntu 16.04 in beaglebone black , and i need to enable serial ports. I tried so many methods to enable ports as manually also but not succeeded.
Actually in ubuntu16.04 i have the slots path like this
/sys/devices/platform/bone_capemgr/slots
If i try to echo BB-UART1 to slots file it was not responding and got hanged.
By editing uEnv.txt file also serial ports are not enabled.

Can you please tell me the solution to enable serial ports in beaglebone black with ubuntu 16.04 

Thanks

Robert Nelson

unread,
Jul 13, 2017, 11:36:13 AM7/13/17
to Beagle Board, lakshmidev...@gmail.com
On Thu, Jul 13, 2017 at 6:10 AM, lakshmi
<lakshmidev...@gmail.com> wrote:

> Hi Robert,
> Iam using ubuntu 16.04 in beaglebone black , and i need to enable serial
> ports. I tried so many methods to enable ports as manually also but not
> succeeded.
> Actually in ubuntu16.04 i have the slots path like this
> /sys/devices/platform/bone_capemgr/slots
> If i try to echo BB-UART1 to slots file it was not responding and got
> hanged.
> By editing uEnv.txt file also serial ports are not enabled.
>
> Can you please tell me the solution to enable serial ports in beaglebone
> black with ubuntu 16.04

That image has switch to u-boot overlays:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

to enable, BB-UART1, in /boot/uEnv.txt set:

uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo

and reboot

lakshmi

unread,
Jul 14, 2017, 12:45:08 AM7/14/17
to BeagleBoard, lakshmidev...@gmail.com
Hi Robert,

Thanks for your reply..
This method also not working to enable or echo BB-UART1 to /sys/devices/platform/bone_capemgr/slots file.

Please help me.
Thank you.

lakshmi

unread,
Jul 17, 2017, 1:11:06 AM7/17/17
to BeagleBoard, lakshmidev...@gmail.com
Thank You soo much Robert..Its really works for me..


On Thursday, July 13, 2017 at 9:06:13 PM UTC+5:30, RobertCNelson wrote:

lakshmi

unread,
Jul 17, 2017, 1:15:00 AM7/17/17
to BeagleBoard
Hi Robert,

Am using UBUNTU 16.04 on Beaglebone Black board

When i use UBUNTU 12.04 i ran applications on startup by adding the applications in /etc/xdg/lxsession/LXDE/autostart file

But in UBUNTU 16.04 this method is not working and no applications are running at startup..

Please tell me the solution to add applications at startup in UBUNTU 16.04

Thank You
Reply all
Reply to author
Forward
0 new messages