"BrickPiRx Error : -2" trying to run LEGO-Motor Test.py

I received my BrickPi today (yay!) but I haven’t had much luck with it so far. I’ve had everything lock up several times (detailed elsewhere), and when trying to run “LEGO-Motor Test.py” I get nothing but:

BrickPiRx Error : -2
BrickPiRx Error : -2
BrickPiRx Error : -2
Retry Failed

…over and over. And no motor activity. I get similar behavior from the other sensor examples.

I’m currently running Raspbian. I’ve disabled the serial console (and the corresponding getty), and the LED.py and LED PWM.py tests work just fine.

First, I’m sorry to hear about this issue. I’ll try to walk you through as best as I can.
It sounds like you’re not using our distribution of Raspbian. Is that true? If not, did you walk through our “Modify your Own Image” of this page? http://www.dexterindustries.com/BrickPi/getting-started/pi-prep/

The LEDs of the BrickPi are driven directly by GPIO pins on the RPi. These would probably work even if you hadn’t followed the steps outlined on the page.

If the UART Clock Speed, setting up Wiring Pi and enabling Serial Pins aren’t done or not done properly,

-2 I believe means there’s a communications error between the BrickPi and the RPi.

I’m having the same problem as Lars. I’m using the Dexterindustries version of raspbian and have followed the getting started instructions all the way through.

I’ve tried all different powering options: a 9v cell, 9v cell + USB simultaneously and even powering the Pi and BrickPi from a bench power supply. I’ve even removed the wifi dongle to reduce power consumption, but I can’t get the motors to turn. I’ve got two new motors and neither will work in any of the motor ports. I just get the BrickPIRx Error -2 as Lars describes.

If I step through the code through the python command line interpreter everything seems to work OK until I get to the BrickPiSetupSensors() call which returns -1.

Any ideas?

topshed, What happens when you run one of the LED examples, or a sensor example? Do you have the same failures?

I figured out the problem (all my fault). Although I was using the BrickPi raspbian build, the first thing I did was update the packages through apt-get (force of habit). This overwrote the config.txt and so all the UART clock speed mods were missing. I added them back in manually and the motors spun up after a reboot.

Thanks for letting us know! I did not know that it did that; I’m going to try it out right now. Thanks for reporting it back!

topshed, one more question: I just went ahead and tried to run sudo apt-get update on the BrickPi image. I did not see a change in config.txt. Did you do anything else in there? Or am I calling the wrong command?

Yep you then need to run

apt-get upgrade

To actually install any new packages.

Ok, thanks a lot. I will try this out today.