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

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.

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.

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 :slight_smile:

thanks
Haggai

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

Look at the message right after that one..

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?

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

Regards,

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,

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.

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!

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.

However . . . Here is one example: http://stackoverflow.com/questions/29369616/beaglebone-black-pwm-using-c

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.

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.

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.

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.

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

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

Regards,

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.

Thank You soo much Robert…Its really works for me…

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