Problem getting WIFI + PWM + PYTHON/PYGAME working on the same distro.

Hi Guys, I’m looking for some help.
I’m working on a robotic project with my beaglebone black, and my problem is with which distro use.
I need to have WIFI dongle, PWM working and python and pygame installed.
I tried the latest ubuntu image (04/18/14) and the newest debian (04/23/14) and i’m having a hard time to get wifi dongles working reliable (tried using TP-LINK TL-WN823N, Edimax EW-7811Un and D-Link DWA-121).
I guess it’s because both are using the same v3.8.13 kernel. If I try to upgrade to the 3.13 I can’t get PWM to work.
I did not try the angstrom distro because i read that people have a lot of problems to make pyton and pygames to work properly.
Does anyone have a suggestion?

Beuller?

For usb wifi, 2 things..

Disable usb/wifi power managment and use a small usb extension cable
for the usb wifi adapter to get it away from the boards ground plane.

For v3.13, try v3.14 instead, not sure if pwm works in that yet either thou.

Regards,

Robert, so in the past you’ve always said to use specific chipsts etc, and that you’ve always had good experiences with these chipsets. Did you use an extension cable at that time as well ?

Nope, usually they just happen to be longer.. It's those very small
one, that barely come out of the usb shell that fun issues. (they are
also the 1-2 $ ones)

Regards,

I’ll try to disable power management, already used usb powered hub and a extension cable without success.

And i could not get the PWM working on 3.13. Do i need to compile it with a special module?

Vitor Henrique

I'll try to disable power management, already used usb powered hub and a
extension cable without success.

/sbin/iwconfig wlan0 power off

And i could not get the PWM working on 3.13. Do i need to compile it with a
special module?

First, "capemgr" hasn't been ported past v3.8. So what you did in v3.8
will not work in v3.13/v3.14. That said in v3.13/v3.14 i did enable
the pwm used by the "proto-cape"
http://elinux.org/CircuitCo:Basic_Proto_Cape

I have no idea if they work in v3.13/v3.14..

Regards,

Thanks Robert!

I’ll take a look on the power management as soon as i get back home.

For the 3.13 i guess i wont be able to use adafruit python library on the new kernel right?

Vitor Henrique

Vitor last time I checked (early April) The default device tree that comes with the 3.13 kernel registered 3 PWM channels on P9_14, P9_16 (ehprwm1a&b) & P9_42 (ecap0). But when i took a peek at the contents of the “/sys/devices/ocp.#/pwm_test_P9_14.#/” directory I do not see the ‘period’, ‘duty’, ‘run’ or ‘polarity’ files needed to control the PWM channels. Its been 2 months since I checked so it might be worth having a look at it again at this point…

As root, ‘cd’ & ‘ls’ into “/sys/devices/ocp.#/pwm_test_P9_14.#/”, “/sys/devices/ocp.#/pwm_test_P9_16.#/” and “/sys/devices/ocp.#/pwm_test_P9_42.#/” do you see ‘period’, ‘duty’ files ? if so then PWM is supported…but I highly doubt it

I very much prefer the approach of editing the device tree file directly instead of using the cape manager or even device tree overlays. It’s more complicated to pick up, but is portable across kernel versions. The cape manager is hard to support across kernel versions and is probably the main reason why BBB users stick with the 3.8 Kernel.