Closed kingtimm closed 10 years ago
Yeah, from what I hear pretty much all the IO drivers have changed on the BeagleBone Black with the switch to the 3.8 kernel. I have not had a chance to look into it yet, so for the time being PyBBIO is definitely not compatible... but it will be!
I can not wait for compatibility.
+1
There may also be a problem with UART rx and tx. omap_mux is needed in those modules as well.
This looks like a brilliant piece of work...! Hopefully the compatibility issue is being worked? If so, any ideas of how long to a fix? If not, any ideas of how to backup to a previous version of Angstrom? Regards, Wisar
PyBBIO will be compatible with the 3.8 kernel soon. I hadn't really had much time to work on it since the BBB came out, but I should hopefully be able to get it working in the next couple (maybe few) weeks.
If you want to go back for now, older Angstrom BealgeBone images are in the archive directory here: http://downloads.angstrom-distribution.org/demo/beaglebone/ .
Sorry for the delay and thanks to everyone who's been reporting details of what's changed with the new kernel!
Thanks for the quick response. I bought the BB to prototype something that I want to do in Python so will 'def go backwards. Can I trouble you to ask what the latest "good for pyBBIO" version was? It looks like I would need to go back quite a ways from browsing the archive.
On an editorial note...as I researched the BB I was somewhat surprised to see their choice of JavaScript as a primary development language. JavaScript???
Anyway, thanks again and I will look forward to you breaking a little time lose! I wish I were technical enough to help but alas....
Wisar
I haven't tried it myself, but lazychino has reported a working image here: https://github.com/alexanderhiam/PyBBIO/issues/20#issuecomment-18311306
Hey, don't knock JavaScript! :) node.js is based on the V8 engine, which is really fast, and in some ways is a more sensible choice than Python this sort of thing. The reason I chose to write PyBBIO is because I don't think node's event-driven nature is always the right approach for the sort of stuff one might want to do with the BeagleBone, and I'd imagine it could be a bit of a hurdle for beginners. At the risk of starting a flame war, I think Python is one of the best languages for beginners.
Less knocking JavaScript than not thinking of it as being a natural for the stuff that one might want to do in the physical interface space. I had actually not known about node.js but as powerful as it may be it seems to target the same space that JavaScript has always targeted...event driven web apps. In any case I am looking forward to trying your Python interface as I am looking for something that would be easier to support than a development in either C (Arduino) or JavaScript (BBB).
Cheers, Wisar
From: Alexander Hiam notifications@github.com To: alexanderhiam/PyBBIO PyBBIO@noreply.github.com Cc: Wisar1111 willkostelecky@yahoo.com Sent: Saturday, June 1, 2013 8:37 PM Subject: Re: [PyBBIO] PWM Bindings changed on Beaglebone Black. (#18)
I haven't tried it myself, but lazychino has reported a working image here: #20 Hey, don't knock JavaScript! :) node.js is based on the V8 engine, which is really fast, and in some ways is a more sensible choice than Python this sort of thing. The reason I chose to write PyBBIO is because I don't think node's event-driven nature is always the right approach for the sort of stuff one might want to do with the BeagleBone, and I'd imagine it could be a bit of a hurdle for beginners. At the risk of starting a flame war, I think Python is one of the best languages for beginners. — Reply to this email directly or view it on GitHub.
Has this issue been resolved? I am curious because Adafruit has a tutorial using PYBBIO pwm and im wondering if its bogus. I will hopefully try this tonight so i can let people know if it is working.
http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/pwm
Thanks
I have been working with the Adafruit tutorial you linked to, @Mango-Kid, and successfully addressed 4 PWM pins (you can check out my code here https://github.com/AKAMEDIASYSTEM/speedtest ) quite reliably; I'm not sure if other pwm pins are yet available.
One thing I noticed, though, is some weirdness in keeping a PWM pin going (as in, if you have a loop that continually updates a PWM pin via set_duty_cycle()). In my experiences this past week, simply using set_duty_cycle after calling BBIO.PWM.start(pin, duty_cycle, freq) once does not work reliably - after three or four loops, the PWM pin freezes and becomes unresponsive.
However, I have solved this (and have yet to regret it!) by simply calling start(pin, duty_cycle, freq) every time that I would normally just update an already-started pin. Please let me know if you think I'm doing something unwise ;-)
(I'm eagerly hoping for help getting PPM and servo control working on BBB, so any help/advice would be appreciated off-list)
AKA
It's certainly not bogus, but it is a different library: https://github.com/adafruit/adafruit-beaglebone-io-python (PyBBIO is imported as lowercase 'bbio' ). They wrote that recently to go with their web IDE (I believe), and it has an API similar to RPIO for the Raspberry Pi.
Using the IO pins is pretty much the same on the 3.8 kernel, what's changed is that they removed the user-space pinmux driver, and all of the pinmuxing is done through cape configuration. The way the Adafruit library works, which is certainly viable, is to just use a default pinmux configuration, e.g. the PWM1A pin can't also be used as GPIO1_18, even though it could potentially be muxed that way. This can be taken one step further by creating a virtual cape with the desired pinmux settings, which would then require a reboot after installing.
The reason PyBBIO is not doing the same thing is that, well, I'm stubborn. I really like the idea of pinmuxing from user-space, and I'm still looking for a way to do it. This is looking more and more like a lost cause, however, so I think I will try to get a pinmux-less version up and running soon.
FWIW @AKAMEDIASYSTEM, that's odd, you may want to open an issue on the Adafruit repo.
Whoa, thanks @alexanderhiam, it is very helpful to hear your account of the differences between yours and adafruit's libraries! Now I will have to read up on what pinmuxing means... ;-)
On a slight tangent...the irony is that this change also broke the library that is part of the standard O/S distribution for the BBB and supports analog IO from the Cloud9 IDE. They have supposedly fixed this but not built a new image yet (though I have been bugging them).
Cheers, Will
From: AKA notifications@github.com To: alexanderhiam/PyBBIO PyBBIO@noreply.github.com Cc: Will Kostelecky willkostelecky@yahoo.com Sent: Tuesday, June 25, 2013 5:38 PM Subject: Re: [PyBBIO] PWM Bindings changed on Beaglebone Black. (#18)
Whoa, thanks @alexanderhiam, it is very helpful to hear your account of the differences between yours and adafruit's libraries! Now I will have to read up on what pinmuxing means... ;-) — Reply to this email directly or view it on GitHub.
Well thanks for the answers guys. I guess i should have spent more time reading the tutorial.
I have had a lot of problems with the Cloud9 IDE and using hardware. The LED example is one case, you can run the program once if you are lucky but usually it does nothing. That being said i have been messing with the software pretty hard so it could be my own doing.
The Adafruit library is great but i hate to use up 4 timers just to create PWM signals. I have done some work on a soft PWM library but its pretty unreliable.
@AKAMEDIASYSTEM I believe that bug is with the PWM driver (Adafruit_BBIO author here..). There are custom PWM driver and firmware here: https://github.com/SaadAhmad/beaglebone-black-cpp-PWM. They allow you to change the period in real time. The reason you need to call start() is due to that bug, I believe. There is so much in flux with the 3.8 kernel right now that we're kind of taking a patient approach to things, like @alexanderhiam is with PyBBIO.
Regarding userspace pinmuxing...I haven't found a single good way of doing it yet either with 3.8. Bonescript isn't even doing it (but they're looking into it soon, I hear).
Also, to reduce confusion with PyBBIO (an excellent library!), we renamed the Adafruit library to Adafruit_BBIO. We built it due to having so much code using RPi.GPIO, and needing to port it easily.
@jwcooper I have just installed Adafruit BBIO per your tutorial. GPIO works great in a simple test. however, no luck with the PWM routines. When I enter the PWM start code (from the tutorial) PWM.start("P9_14", 50) I get no errors thrown, but no waveform on my 'scope on P9 pin 14. When I add PWM.set_frequency("P9_14",100) I get the error "runtime error: you must start() the PWM channel first." This doesnt make sense to me, given that I already have issued the PWM.start command Also, the examples that come with the install all use the line Import BBIO.xxx This is out of date, given the new adafruit library Adafruit_BBIO Any idea what Is wrong? ( at my end probably) Many thanks.
@bmillier I've created an issue at the adafruit repository https://github.com/adafruit/adafruit-beaglebone-io-python/issues/6 so as not to confuse this PyBBIO issue. Thanks!
I am trying BBB with the Adafruit_BBIO 0.0.15 library and Ubuntu 13.04 kernel 3.8.13 result: RuntimeError: You must start() the PWM channel first
Any way to fix this?
Thanks.
I am getting the same as above ^
Angle (0 to 180 x to exit):12
Traceback (most recent call last):
File "test.py", line 18, in
I am using Ubuntu 3.8.13-bone20 fresh install with the required packages for the tutorial here http://learn.adafruit.com/controlling-a-servo-with-a-beaglebone-black/writing-a-program
I am fairly new to this sort of thing so any help/solution would be great ! Thanks.
@AdrianIRL it looks like jwcooper has figured this out: https://github.com/adafruit/adafruit-beaglebone-io-python/issues/6
@alexanderhiam Thanks for getting back to me. I have been searching for most of the evening making a few attempts to get this to work. I really would appreciate it if anyone knows of a Ubuntu bone-24/> .img that can boot from SD card instead of needing to flash the emmc. For various reasons I can't stand Angstrom !
:+1:
Make sure that your kernel has full PWM support! In fact, some Ubuntu kernels do not have it enabled. To check if this is your case, try this (after a fresh reboot!):
echo am33xx_pwm > /sys/devices/bone_capemgr.*/slots
echo bone_pwm_P8_13 > /sys/devices/bone_capemgr.*/slots
ls /sys/devices/ocp.*/pwm_test_P8_13/
(those actions are done by the Adafruit library usually) If in the list you are missing period and duty, then you have a Kernel that was compiled without the flag CONFIG_EHRPWM_TEST. To fix that, you will have to recompile the Kernel by following the steps on elinux and uncomment the CONFIG_EHRPWM_TEST defconfig. Hope it helps!
PyBBIO has been working on 3.8 kernels for a while now, closing issue.
Hi Alexander: I first contacted you about the PWM problem I had with PYBBIO months back when I was using Angstrom (which is why I was on the mailing list for this email distro.). I gave up on Angstrom, and have since switched to Debian. When I got your email, I decided to try again to get the PWM to work. I followed the installation proc. on your wiki exactly. The "which dtc" command responded usr/local/bin/dtc , so I assume DTC was OK. My kernel version is 3.8.13 I am running as root.
The blink.py program works OK.
The fade.py program won't run: error thrown is Name error: name 'run' is not defined
If I manually enter the following PWM code in python 2.7 , I get the error shown.
Python 2.7.3 (default, Mar 14 2014, 17:55:54) [GCC 4.6.3] on linux2 Type "copyright", "credits" or "license()" for more information.
from bbio import * PyBBIO initialized analogWrite(PWM1A,100)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in
I also tried analog_test.py, with the following error thrown:
root@debian-armhf:/usr/local/lib/PyBBIO/examples# python analog_test.py
Traceback (most recent call last):
File "analog_test.py", line 47, in
While I can get the Adafruit BBIO python library to work on some
functions, their PWM function doesn't show any output on my scope on P9_14, although it does not throw any errors either. From the sounds of your email, the issue is closed, so I guess I am the only one having a problem. Thanks
Brian Millier Computer Interface Consultants 31 Three Brooks Drive Hubley N.S. B3Z 1A3
CELL: (902)403-6329 RES: (902) 876-8645 bmillier1@gmail.com
On 04/08/2014 6:39 PM, Alexander Hiam wrote:
PyBBIO has been working on 3.8 kernels for a while now, closing issue.
— Reply to this email directly or view it on GitHub https://github.com/alexanderhiam/PyBBIO/issues/18#issuecomment-51121570.
Can you post the output of # ls /lib/firmware/PyBBIO*
?
Then do a full wipe of PyBBIO with:
# rm -r /lib/firmware/PyBBIO-*
# rm -r /usr/local/lib/PyBBIO/
# pip uninstall PyBBIO
and just to be sure:
# rm -r /usr/local/lib/python2.7/dist-packages/PyBBIO*
# rm -r /usr/local/lib/python2.7/dist-packages/bbio
Then install through pip with # pip install PyBBIO
and post the entire output.
Brian Millier Computer Interface Consultants 31 Three Brooks Drive Hubley N.S. B3Z 1A3
CELL: (902)403-6329 RES: (902) 876-8645 bmillier1@gmail.com
On 05/08/2014 5:17 PM, Alexander Hiam wrote:
Can you post the output of |# ls /lib/firmware/PyBBIO*|?
OK- attached file alexlisting1
Then do a full wipe of PyBBIO with:
|# rm -r /lib/firmware/PyBBIO-*
rm -r /usr/local/lib/PyBBIO/
pip uninstall PyBBIO
and just to be sure:
|# rm -r /usr/local/lib/python2.7/dist-packages/PyBBIO*
rm -r /usr/local/lib/python2.7/dist-packages/bbio
entire output.
all output, including the rm commands and uninstall/install in file alexlisting2
A quick test gives identical results as before.- i.e. same errors as I quoted in 1st email. Thanks
— Reply to this email directly or view it on GitHub https://github.com/alexanderhiam/PyBBIO/issues/18#issuecomment-51253374.
root@debian-armhf:/lib/firmware# rm -r /lib/firmware/PyBBIO- root@debian-armhf:/lib/firmware# rm -r /usr/local/lib/PyBBIO/ root@debian-armhf:/lib/firmware# pip uninstall PyBBIO Uninstalling PyBBIO: Proceed (y/n)? y Successfully uninstalled PyBBIO root@debian-armhf:/lib/firmware# rm -r /usr/local/lib/python2.7/dist-packages/PyBBIO root@debian-armhf:/lib/firmware# rm -r /usr/local/lib/python2.7/dist-packages/bbio root@debian-armhf:/lib/firmware# pip install PyBBIO Downloading/unpacking PyBBIO Downloading PyBBIO-0.9.tar.gz (94Kb): 94Kb downloaded Running setup.py egg_info for package PyBBIO
Requirement already satisfied (use --upgrade to upgrade): pyserial in /usr/local/lib/python2.7/dist-packages (from PyBBIO) Requirement already satisfied (use --upgrade to upgrade): smbus in /usr/lib/python2.7/dist-packages (from PyBBIO) Installing collected packages: PyBBIO Running setup.py install for PyBBIO PyBBIO device tree overlay directory not found, creating... Generating and compiling GPIO overlays... Done! Generating and compiling ADC overlays... Done! Installing PyBBIO... building 'bbio.platform.util._sysfs' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bbio/platform/util/_sysfs.c -o build/temp.linux-armv7l-2.7/bbio/platform/util/_sysfs.o gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv7l-2.7/bbio/platform/util/_sysfs.o -o build/lib.linux-armv7l-2.7/bbio/platform/util/_sysfs.so building 'bbio.platform.util._spi' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bbio/platform/util/spimodule.c -o build/temp.linux-armv7l-2.7/bbio/platform/util/spimodule.o gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv7l-2.7/bbio/platform/util/spimodule.o -o build/lib.linux-armv7l-2.7/bbio/platform/util/_spi.so
install finished with 0 warnings
PyBBIO is now installed on your BeagleBone >=3.8, enjoy!
Successfully installed PyBBIO Cleaning up... root@debian-armhf:/lib/firmware# root@debian-armhf:/lib/firmware# ls -l /lib/firmware/PyBBIO* -rw-r--r-- 1 root root 737 Aug 5 14:35 /lib/firmware/PyBBIO-ADC-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN0-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN1-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN2-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN3-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN4-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN5-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN6-00A0.dtbo -rw-r--r-- 1 root root 672 Aug 5 14:35 /lib/firmware/PyBBIO-AIN7-00A0.dtbo -rw-r--r-- 1 root root 351 Aug 5 14:35 /lib/firmware/PyBBIO-ecap0-00A0.dtbo -rw-r--r-- 1 root root 351 Aug 5 14:35 /lib/firmware/PyBBIO-ecap1-00A0.dtbo -rw-r--r-- 1 root root 353 Aug 5 14:35 /lib/firmware/PyBBIO-ehrpwm1-00A0.dtbo -rw-r--r-- 1 root root 353 Aug 5 14:35 /lib/firmware/PyBBIO-ehrpwm2-00A0.dtbo -rw-r--r-- 1 root root 353 Aug 5 14:35 /lib/firmware/PyBBIO-epwmss0-00A0.dtbo -rw-r--r-- 1 root root 353 Aug 5 14:35 /lib/firmware/PyBBIO-epwmss1-00A0.dtbo -rw-r--r-- 1 root root 353 Aug 5 14:35 /lib/firmware/PyBBIO-epwmss2-00A0.dtbo -rw-r--r-- 1 root root 994 Aug 5 14:35 /lib/firmware/PyBBIO-eqep0-00A0.dtbo -rw-r--r-- 1 root root 994 Aug 5 14:35 /lib/firmware/PyBBIO-eqep1-00A0.dtbo -rw-r--r-- 1 root root 994 Aug 5 14:35 /lib/firmware/PyBBIO-eqep2-00A0.dtbo -rw-r--r-- 1 root root 994 Aug 5 14:35 /lib/firmware/PyBBIO-eqep2b-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_10-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_11-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_12-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_13-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_14-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_15-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_20-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_2-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_22-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_23-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_26-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_27-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_30-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_3-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_31-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_4-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_5-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_7-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_8-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio0_9-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_0-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_1-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_12-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_13-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_14-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_15-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_16-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_17-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_18-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_19-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_2-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_28-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_29-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_30-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_3-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_31-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_4-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_5-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_6-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio1_7-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_10-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_1-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_11-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_12-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_13-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_14-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_15-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_16-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_17-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_2-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_22-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_23-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_24-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_25-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_3-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_4-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_5-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_6-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_7-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_8-00A0.dtbo -rw-r--r-- 1 root root 2402 Aug 5 14:35 /lib/firmware/PyBBIO-gpio2_9-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio3_14-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio3_15-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio3_16-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio3_17-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio3_19-00A0.dtbo -rw-r--r-- 1 root root 2424 Aug 5 14:35 /lib/firmware/PyBBIO-gpio3_21-00A0.dtbo -rw-r--r-- 1 root root 2316 Aug 5 14:35 /lib/firmware/PyBBIO-usr0-00A0.dtbo -rw-r--r-- 1 root root 2316 Aug 5 14:35 /lib/firmware/PyBBIO-usr1-00A0.dtbo -rw-r--r-- 1 root root 2316 Aug 5 14:35 /lib/firmware/PyBBIO-usr2-00A0.dtbo -rw-r--r-- 1 root root 2316 Aug 5 14:35 /lib/firmware/PyBBIO-usr3-00A0.dtbo
/lib/firmware/PyBBIO-src: total 364 -rw-r--r-- 1 root root 856 Aug 5 14:35 PyBBIO-ADC-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN0-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN1-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN2-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN3-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN4-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN5-00A0.dts -rw-r--r-- 1 root root 578 Aug 5 14:35 PyBBIO-AIN6-00A0.dts -rw-r--r-- 1 root root 577 Aug 5 14:35 PyBBIO-AIN7-00A0.dts -rw-r--r-- 1 root root 425 Aug 5 14:35 PyBBIO-ecap0-00A0.dts -rw-r--r-- 1 root root 425 Aug 5 14:35 PyBBIO-ecap1-00A0.dts -rw-r--r-- 1 root root 444 Aug 5 14:35 PyBBIO-ehrpwm1-00A0.dts -rw-r--r-- 1 root root 444 Aug 5 14:35 PyBBIO-ehrpwm2-00A0.dts -rw-r--r-- 1 root root 422 Aug 5 14:35 PyBBIO-epwmss0-00A0.dts -rw-r--r-- 1 root root 422 Aug 5 14:35 PyBBIO-epwmss1-00A0.dts -rw-r--r-- 1 root root 422 Aug 5 14:35 PyBBIO-epwmss2-00A0.dts -rw-r--r-- 1 root root 2039 Aug 5 14:35 PyBBIO-eqep0-00A0.dts -rw-r--r-- 1 root root 1922 Aug 5 14:35 PyBBIO-eqep1-00A0.dts -rw-r--r-- 1 root root 1945 Aug 5 14:35 PyBBIO-eqep2-00A0.dts -rw-r--r-- 1 root root 1978 Aug 5 14:35 PyBBIO-eqep2b-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio0_10-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio0_11-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio0_12-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio0_13-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio0_14-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio0_15-00A0.dts -rw-r--r-- 1 root root 2489 Aug 5 14:35 PyBBIO-gpio0_20-00A0.dts -rw-r--r-- 1 root root 2420 Aug 5 14:35 PyBBIO-gpio0_2-00A0.dts -rw-r--r-- 1 root root 2435 Aug 5 14:35 PyBBIO-gpio0_22-00A0.dts -rw-r--r-- 1 root root 2435 Aug 5 14:35 PyBBIO-gpio0_23-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio0_26-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio0_27-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio0_30-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio0_3-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio0_31-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio0_4-00A0.dts -rw-r--r-- 1 root root 2414 Aug 5 14:35 PyBBIO-gpio0_5-00A0.dts -rw-r--r-- 1 root root 2468 Aug 5 14:35 PyBBIO-gpio0_7-00A0.dts -rw-r--r-- 1 root root 2426 Aug 5 14:35 PyBBIO-gpio0_8-00A0.dts -rw-r--r-- 1 root root 2426 Aug 5 14:35 PyBBIO-gpio0_9-00A0.dts -rw-r--r-- 1 root root 2402 Aug 5 14:35 PyBBIO-gpio1_0-00A0.dts -rw-r--r-- 1 root root 2402 Aug 5 14:35 PyBBIO-gpio1_1-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio1_12-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio1_13-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio1_14-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio1_15-00A0.dts -rw-r--r-- 1 root root 2429 Aug 5 14:35 PyBBIO-gpio1_16-00A0.dts -rw-r--r-- 1 root root 2429 Aug 5 14:35 PyBBIO-gpio1_17-00A0.dts -rw-r--r-- 1 root root 2429 Aug 5 14:35 PyBBIO-gpio1_18-00A0.dts -rw-r--r-- 1 root root 2429 Aug 5 14:35 PyBBIO-gpio1_19-00A0.dts -rw-r--r-- 1 root root 2402 Aug 5 14:35 PyBBIO-gpio1_2-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio1_28-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio1_29-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio1_30-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio1_3-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio1_31-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio1_4-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio1_5-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio1_6-00A0.dts -rw-r--r-- 1 root root 2408 Aug 5 14:35 PyBBIO-gpio1_7-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_10-00A0.dts -rw-r--r-- 1 root root 2414 Aug 5 14:35 PyBBIO-gpio2_1-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_11-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_12-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_13-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_14-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_15-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio2_16-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio2_17-00A0.dts -rw-r--r-- 1 root root 2444 Aug 5 14:35 PyBBIO-gpio2_2-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_22-00A0.dts -rw-r--r-- 1 root root 2447 Aug 5 14:35 PyBBIO-gpio2_23-00A0.dts -rw-r--r-- 1 root root 2441 Aug 5 14:35 PyBBIO-gpio2_24-00A0.dts -rw-r--r-- 1 root root 2477 Aug 5 14:35 PyBBIO-gpio2_25-00A0.dts -rw-r--r-- 1 root root 2438 Aug 5 14:35 PyBBIO-gpio2_3-00A0.dts -rw-r--r-- 1 root root 2414 Aug 5 14:35 PyBBIO-gpio2_4-00A0.dts -rw-r--r-- 1 root root 2444 Aug 5 14:35 PyBBIO-gpio2_5-00A0.dts -rw-r--r-- 1 root root 2420 Aug 5 14:35 PyBBIO-gpio2_6-00A0.dts -rw-r--r-- 1 root root 2420 Aug 5 14:35 PyBBIO-gpio2_7-00A0.dts -rw-r--r-- 1 root root 2420 Aug 5 14:35 PyBBIO-gpio2_8-00A0.dts -rw-r--r-- 1 root root 2420 Aug 5 14:35 PyBBIO-gpio2_9-00A0.dts -rw-r--r-- 1 root root 2465 Aug 5 14:35 PyBBIO-gpio3_14-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio3_15-00A0.dts -rw-r--r-- 1 root root 2459 Aug 5 14:35 PyBBIO-gpio3_16-00A0.dts -rw-r--r-- 1 root root 2471 Aug 5 14:35 PyBBIO-gpio3_17-00A0.dts -rw-r--r-- 1 root root 2453 Aug 5 14:35 PyBBIO-gpio3_19-00A0.dts -rw-r--r-- 1 root root 2471 Aug 5 14:35 PyBBIO-gpio3_21-00A0.dts -rw-r--r-- 1 root root 2321 Aug 5 14:35 PyBBIO-usr0-00A0.dts -rw-r--r-- 1 root root 2321 Aug 5 14:35 PyBBIO-usr1-00A0.dts -rw-r--r-- 1 root root 2321 Aug 5 14:35 PyBBIO-usr2-00A0.dts -rw-r--r-- 1 root root 2321 Aug 5 14:35 PyBBIO-usr3-00A0.dts root@debian-armhf:/lib/firmware#
OK, everything is getting installed correctly, so capemgr must be unable to load the overlays.
Do you have any other overlays loaded? What's the output of # cat /sys/devices/bone_capemgr.*/slots
?
Also post (or pastebin) the output of # dmesg
after trying to run analog_test.py
.
On 05/08/2014 7:25 PM, Alexander Hiam wrote:
OK, everything is getting installed correctly, so capemgr must be unable to load the overlays.
Do you have any other overlays loaded?
No- I have no capes per se. (just a breakout cape, but it is entirely passive- no EEPROM) I do have a 7" LCD display for it, which I've used in the past, but it was not hooked up for this test . i.e. I was using HDMI output.
What's the output of |# cat /sys/devices/bone_capemgr.*/slots|?
Also post (or pastebin) the output of |# dmesg| after trying to run |analog_test.py|.
Both are in the attached file- the first few lines are the cat command, the rest is the dmesg command. When I set up Debian on the BB, I used the root login/pwd so I am running as root. When I tried to use the Adafruit I2C routines as a normal user-not root, they don't work as root access is needed for SMBUS routines.Not sure this means anything in this case.
Thanks for your time/attention.
— Reply to this email directly or view it on GitHub https://github.com/alexanderhiam/PyBBIO/issues/18#issuecomment-51269072.
root@debian-armhf:~# cat /sys/devices/bone_capemgr.*/slots 0: 54:PF--- 1: 55:PF--- 2: 56:PF--- 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
root@debian-armhf:~# cd /usr/local/lib/PyBBIO/examples
root@debian-armhf:/usr/local/lib/PyBBIO/examples# python analog_test.py
Traceback (most recent call last):
File "analog_test.py", line 47, in
Looks like I have a similar issue: Ubuntu 13.04, kernel 3.8.13-bone26, just installed PyBBIO as instructed above. I'm trying both PyBBIO and Adafruit_BBIO 0.20, where I am able to use all four PWM pins but there setting the PWM frequency leads to issues.
analogWrite(PWM2A, 0) and analogWrite(PWM1A, 0) work fine. analogWrite(PWM2B, 0) and analogWrite(PWM1B, 0) looks like the same error that bmillier postet:
analogWrite(PWM1B, 0) Traceback (most recent call last): File "
", line 1, in File "/usr/local/lib/python2.7/dist-packages/bbio/platform/beaglebone/bone_3_8/pwm.py", line 28, in analogWrite pwmEnable(pwm_pin) File "/usr/local/lib/python2.7/dist-packages/bbio/platform/beaglebone/bone_3_8/pwm.py", line 98, in pwmEnable if (sysfs.kernelFilenameIO('%s/%s' % (helper_path, PWM_RUN)) == '1\n'): File "/usr/local/lib/python2.7/dist-packages/bbio/platform/beaglebone/sysfs.py", line 21, in kernelFilenameIO fn = glob.glob(fn)[0] What's the output of |# cat /sys/devices/bone_capemgr.*/slots|?
0: 54:PF--- 1: 55:PF--- 2: 56:PF--- 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 7: ff:P-O-L Override Board Name,00A0,Override Manuf,PyBBIO-epwmss2 8: ff:P-O-L Override Board Name,00A0,Override Manuf,PyBBIO-ehrpwm2 9: ff:P-O-L Override Board Name,00A0,Override Manuf,bone_pwm_P8_19 10: ff:P-O-L Override Board Name,00A0,Override Manuf,bone_pwm_P8_13 11: ff:P-O-L Override Board Name,00A0,Override Manuf,am33xx_pwm 13: ff:P-O-L Override Board Name,00A0,Override Manuf,PyBBIO-epwmss1 14: ff:P-O-L Override Board Name,00A0,Override Manuf,PyBBIO-ehrpwm1 15: ff:P-O-L Override Board Name,00A0,Override Manuf,bone_pwm_P9_14 16: ff:P-O-L Override Board Name,00A0,Override Manuf,bone_pwm_P9_16
Please post the full error traceback that you're getting.
Hi Alexander I replied to this email back when you sent it to me, with the info attached in a file. I didn't hear back, and was reminded of this when I was copied on a post by someone else with similar problems. I'm just letting you know that I am still unable to use the lib. as mentioned in earlier emails.
Brian Millier Computer Interface Consultants 31 Three Brooks Drive Hubley, N.S. B3Z 1A3 902 876-8645 Cell 902 473- 9499
On 05/08/2014 7:25 PM, Alexander Hiam wrote:
OK, everything is getting installed correctly, so capemgr must be unable to load the overlays.
Do you have any other overlays loaded? What's the output of |# cat /sys/devices/bone_capemgr.*/slots|?
Also post (or pastebin) the output of |# dmesg| after trying to run |analog_test.py|.
— Reply to this email directly or view it on GitHub https://github.com/alexanderhiam/PyBBIO/issues/18#issuecomment-51269072.
@smaria, @bmillier: I'm closing this issue since the original problem has been solved, please both open a new issue and we'll go from there.
I am running in to this issue with a Beaglebone black Rev C I just purchased, by default it came with: Linux version 3.8.13-bone47 (gcc version 4.6.3 (Debian 4.6.3-14) ) Debian GNU/Linux 7.4 (wheezy)
It is not the Python library, I get this same error when setting PWM manually, P8 13 does not create run, duty, period, etc interface files.
I am about to learn how to build the kernel and reflash. Any steps anyone can provide for this? @alexanderhiam I think the file is now in ti-linux-kernel-dev/patches/defconfig CONFIG_PWM_TIEHRPWM=m Thanks.
Not necessarily a PyBBIO issue, but the bindings seemed to have changed quite a bit on BBB's Angstrom Distribution. I am not too familiar with the distribution, but /sys/class/pwm does not exist.
There are some clues to what has to happen in the new bonescript: https://github.com/jadonk/bonescript/blob/master/node_modules/bonescript/index.js
This discussion board post has some information too: https://groups.google.com/d/msg/beagleboard/wjbOVE6ItNg/Dym4H4HuI8gJ