Updating firmware to the latest version

I have a BrickPi board that was bought about an year ago.

  1. How can I know what exact version of the BrickPi board do I have? The board has 4+1 sensor connectors, 4 motor connectors and text “Dexter Industries BrickPi”. I could not find any version number printed on the board.

  2. What is the latest version of firmware? Is it 2.5? (https://github.com/DexterInd/BrickPi/tree/master/Firmware_BrickPi/Firmware_2.5)

  3. When I try to update the firmware to the version 2.5 the batch file BrickPiFW_UC1.bat fails with the message “File BrickPiFW_Compressed_Communication.cpp.hex not found”. There is no such HEX file checked in into the GitHub under Firmware 2.5. Should I compile it myself?

Or maybe I can use the BrickPiFW_Compressed_Communication.cpp.hex file from the Firmaware Version 2.0? Is it compatible with the Firmware 2.5?(https://github.com/DexterInd/BrickPi/blob/master/Firmware_BrickPi/Firmware_2.0/BrickPiFW_Compressed_Communication.cpp.hex)

Thank you in advance,
Victor

  1. The board with five sensors is a old version of BrickPi and it looks like this and whereas the latest one has four sensors called BrickPi 2 and looks like this.

The board that you have comes with the older firmware and it connects only to NXT sensors.In order to connect to EV3 sensors you need to upgrade your firmware to 2.0 or 2.5.

  1. The latest firmware version is 2.5.

  2. In order to update to version to 2.5 you have to modify the UC1.bat and UC2.bat files which are available here. In both of these files wherever you find BrickPiFW_Compressed_Communication.cpp.hex replace it with BrickPiFW_2.5_Combined_Bootloader.hex and run the batch files again.

Once you have upgraded your firmware try this to check if your firmware version now is 2.5.

For more information about the firmware there is another good discussion on the forum here.

Do let us know if it works,
-Shoban

I am having problems getting consistent EV3 sensor readings. So I am trying to upgrade the firmware to 2.5, but I am having problems doing that also.

My gears:

  • BrickPi v2.6 running firmware 2.0.
  • Raspberry Pi 3
  • Arduino UNO
  • BrickPi ISP Programmer cable ordered from your site

Following http://www.dexterindustries.com/BrickPi/about/design/brickpi-firmware-update/flash-new-brickpi-firmware-using-an-arduino/

  1. Used the Arduino IDE and uploaded ArduinoISP sketch to the Arduino UNO. I didn’t change the heartbeat() function to delay(20) since that function is different now.
  2. Connected the ribbon cable and pin 10 cable between the UNO and the BrickPi. I double/triple checked following the pictures.
  3. Powered the BrickPi using 8xAA battery pack. Also tried USB power together and separately. Is the BrickPi supposed to be connected to the Raspberry Pi? I tried both connected and not.
  4. Changed the UC1.bat script according to the above comment. Also changed the port number to what I have on my computer.
  5. Ran UC1.bat and I kept getting the below outputs. Also tried the commands inside the bat file manually on Windows and Mac. Same outputs.
    .
    Help please!

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

Hi Michael1, you should perform the update without the Raspberry Pi attached. Using the 8xAA battery pack should be fine.

Could you post a picture of your setup, and include showing how you have the cable oriented?

I also tried pushing cables down and to the side.

Thanks.

Doesn’t look like any of the conductors on the ribbon cable are cut, is that right?

I think we might have to cut one of those lines on the ribbon cable that
goes to reset. I have to check!

Hi John, no lines are cut. Am I supposed to cut one?

Hi - I have an older BrickPi board as well and need to round up the tools to upgrade the firmware. I haven’t done anything with Arduino’s so I thought I’d use the instructions for the AVR Programmer (which is also new territory). However the link to the programmer points to a product that isn’t available. What are the requirements for these programmers? Will a $15 programmer like the USBtinyISP V2 AVR ISP Programmer for Arduino work?

Thanks for your help,
Bruce

Sorry for the late response on this one folks. I had to do a little research.

I think that the directions we have up here are a not entirely right. You will need to cut one of the conductors on the ribbon cable to use the Arduino as an ISP programmer. We have these directions here:

You’ll notice the first few pictures show you which conductor to cut, you will need to be careful with the alignment. The first four pictures should help you find the correct alignment. I would recommend separating out the conductor you want to slice by splitting it out with a small knife.

Hi I’m trying to update my brickpi as well. I do not have that fancy cable you use but I do have wires like the black one to reset pin. Could you guide me which one goes where? I looked at schematics but I don’t want to guess. Does MOSI connect to MOSI or to MISO?
brickPi schematic
arduino schematic
Do I have to connect GND to GND, VCC to VCC etc? or cross MOSI with MISO?
I know that reset pin in this 3x2 pin connector should be skipped and pin10 used like in pictures above.
Will this work?

I tried to update today but I had rpi connected to brickpi and powered on, didn’t powered birckpi with batterypack, and was not sure about connecting wires. I ended up getting this err: avrdude: stk500_getsync(): not in sync: resp=0x00
Fortunately nothing got broken so I’ll try again on friday.

Hi mike2060,

You should connect GND to GND, VCC to VCC, MOSI to MOSI and MISO to MISO. This error might be because of loose contact of the jumpers with BrickPi. Hold them tight and make sure they make proper contact. You can refer to this page for further guidance.

-Shoban

Hi Shoban, thanks for reply.
So I got my hands on usbasp programmer. I figured it could work. First windows10 didn’t want to find this device, then, after hour or so of diggin and disabling enforcing secure drivers or sth like that it started but gave me error (I edited you bat file and changed device to usbasp ) :
avrdude: warning: cannot set sck period.
and it went on. Output is different than in your instructions.
google said that this warning can be ignored. Good thing that it didn’t break brickpi. Motors still work, gyro still doesn’t.
Can you help me with this programmer or should I try arduino again?

Hi @mike2060,

The difference in output is because of using a different programmer. The output here shows only the fuses and fuses seem to be written well. Can you share the output that you got while installing the Firmware and also after running the firmware update, can you run this firmware check script and post its output.

-Shoban


I only run script in folder ‘opdate firmware’

If using an Arduino as the programmer, in addition to connecting GND to GND, VCC to VCC, MOSI to MOSI and MISO to MISO, you also need to connect SCK to SCK and arduino pin 10 to BrickPi reset.

Can you post the output you get when flashing the firmware, rather than just updating the fuses?

@Matt @Shoban
I was using usbasp programmer. I can borrow arduino again next week if it will be easier but this weekend I can only use usbasp programmer. I followed your tutorial and it said only run the BrickPiFW_UC1 and UC2 scripts. Instructions end on that. What should I do now?

Edit: I’ve found firmware 2.5 folder with BrickPiFW_UC1.bat script. It looks very similar to the one I already used though. Is this the file I need to use to update firmware after updating fuses? I’m lost a bit…

@Matt @Shoban Hey guys I’d realy like to move on with my project… Could you please direct me what to do next? I redid all of your instructions but it just messes with fuses. No update. I must be doing something wrong. Which script should i use to update?

Hey @mike2060, hopping in here.

The script should change the fuses; can you post what you get back from the programmer? Either a screenshot or paste the text you get back? It’s unclear what error you’re getting.

Hey @JohnC I posted screens above. That’s all I got so far. Using usbasp and forementioned script I got what you can see on the first screen. Second screen is python script to check firmware. Its clear that it is not updated. Last screen shows which script I am using. If you want more screens tell me which script should I run.