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


On my BBB running Ubuntu 14 I am using adafruit py libs to for servo control. But I get the following error. Same with P9_14. Any idea why I am getting this and what I should do to make it go away? Thanks a lot!

import Adafruit_BBIO.PWM as PWM

PWM.start(“P8_13”, 95.0, 60)

IOError: [Errno 2] No such file or directory: ‘/slots’


I don’t know if it is done in py library, if not then you need to load the corresponding overlay: (see beforehand

root@beaglebone:~# echo am33xx_pwm > /sys/devices/bone_capemgr.8/slots
root@beaglebone:~# echo bone_pwm_P8_13 > /sys/devices/bone_capemgr.8/slots

if you are using kernel 3.14.x and above, you won’t have capemgr. As said by RbertCNelson 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

if you still face errors in loading pwm device trees due to missing dtbo files, use the following steps

sudo apt-get install device-tree-compiler

If you face errors with -@ option while compiling use following steps

wget -c
chmod +x

get the missing dts files from

now at


compile required files using build file


echo “Compiling the overlay from .dts to .dtbo”

dtc -O dtb -o am33xx_pwm-00A0.dtbo -b 0 -@ am33xx_pwm-00A0.dts

dtc -O dtb -o bone_eqep0-00A0.dtbo -b 0 -@ bone_eqep0-00A0.dts

dtc -O dtb -o bone_eqep1-00A0.dtbo -b 0 -@ bone_eqep1-00A0.dts

dtc -O dtb -o bone_eqep2-00A0.dtbo -b 0 -@ bone_eqep2-00A0.dts

dtc -O dtb -o bone_pwm_P8_13-00A0.dtbo -b 0 -@ bone_pwm_P8_13-00A0.dts

dtc -O dtb -o bone_pwm_P8_19-00A0.dtbo -b 0 -@ bone_pwm_P8_19-00A0.dts

dtc -O dtb -o bone_pwm_P8_34-00A0.dtbo -b 0 -@ bone_pwm_P8_34-00A0.dts

dtc -O dtb -o bone_pwm_P8_36-00A0.dtbo -b 0 -@ bone_pwm_P8_36-00A0.dts

dtc -O dtb -o bone_pwm_P8_45-00A0.dtbo -b 0 -@ bone_pwm_P8_45-00A0.dts

dtc -O dtb -o bone_pwm_P8_46-00A0.dtbo -b 0 -@ bone_pwm_P8_46-00A0.dts

dtc -O dtb -o bone_pwm_P9_14-00A0.dtbo -b 0 -@ bone_pwm_P9_14-00A0.dts

dtc -O dtb -o bone_pwm_P9_16-00A0.dtbo -b 0 -@ bone_pwm_P9_16-00A0.dts

dtc -O dtb -o bone_pwm_P9_21-00A0.dtbo -b 0 -@ bone_pwm_P9_21-00A0.dts

dtc -O dtb -o bone_pwm_P9_22-00A0.dtbo -b 0 -@ bone_pwm_P9_22-00A0.dts

dtc -O dtb -o bone_pwm_P9_28-00A0.dtbo -b 0 -@ bone_pwm_P9_28-00A0.dts

dtc -O dtb -o bone_pwm_P9_29-00A0.dtbo -b 0 -@ bone_pwm_P9_29-00A0.dts

dtc -O dtb -o bone_pwm_P9_31-00A0.dtbo -b 0 -@ bone_pwm_P9_31-00A0.dts

dtc -O dtb -o bone_pwm_P9_42-00A0.dtbo -b 0 -@ bone_pwm_P9_42-00A0.dts

If you face errors with -@ option while compiling use following steps

wget -c
chmod +x

copy compiled dtbo files to /lib/firmware using copy file


cp -f *.dtbo /lib/firmware

load the required dtbo files using bash file load_dtbo


echo “loading device trees”

export SLOTS=/sys/devices/bone_capemgr.9/slots

export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins

modprobe pwm_test

echo am33xx_pwm > $SLOTS

echo bone_pwm_P8_19 > $SLOTS

echo bone_pwm_P9_21 > $SLOTS