Updating firmware for OpenMV Cam 2

I have a Kickstarter OpenMV Cam 2 (2/9/2016) and after sitting for a few years I am trying to update the firmware using Ubuntu 16.04. I clicked on the “Firmware Version” link at the bottom of the OpenMV IDE (IDE version openmv-ide-linux-x86_64-1.8.1) and the initial attempt didn’t work so I followed the prompts in the subsequent windows. I got to the screen with instructions to add a jumper wire between the BOOT and RST pins and nothing seems to be happening. I found this post: http://forums.openmv.io/viewtopic.php?f=6&t=208 which details for a similar problem so I know the DFU process is very slow but I’ve been waiting for over an hour and nothing is happening. If I click on “OK” I get the message:
“DFU firmware update failed!” “The command “/home/nedhorning/openmvide/share/qtcreator/pydfu/pydfu.py” terminated with exit code 1.”

Next a window with: “PyDFU require the following libraries to be installed:”
“sudo apt-get install libusb-1.0 python-pip
sudo pip install pyusb”

I do have libusb-1.0 installed and ran “sudo pip install pyusb”.

Any thoughts about what I can do. Is the camera board obsolete? I’d like to create a low-power long term time lapse camera and though the OpenMV might be a good choice.

Any feedback is appreciated.


add a jumper wire between the BOOT and RST pins and nothing seems to be happening

You should disconnect the USB cable and reconnect with the jumper betweent BOOT and RST (or 3.3v out). I’m not sure if the camera has a bootloader, the IDE probably doesn’t flash the bootloader either. So let me know if it doesn’t work.

Thanks for the reply. I did disconnect the USB cable then reconnected the cable after inserting a jumper between BOOT and RST. When I reconnected the cable I didn’t see any lights flash on the camera but my understanding is that’s normal.

Yes it’s normal, you should see something like this if you run lsusb

Bus 001 Device 006: ID 0483:df11 STMicroelectronics STM Device in DFU Mode

Yes - I see that it is in DFU mode but not sure how I will know that the DFU Bootloader has enumerated. In a previous post it was noted that a message will appear if it fails or finishes. After an hour I don’t get any messages. Do I need to wait longer before I click “OK” in the “Connect - OpenMV IDE” message window that has this text “Click the Ok button after your OpenMV Cam’s DFU Bootloader has enumerated.”?

No it takes seconds to enumerate you should click ok just after you see the cam in DFU mode with lsusb.

Hi, would you like a free OpenMV Cam M7? It’s a lot better than the M4 and these issues are moot. Please send us an email with you Kickstarter backer info.

As for the M4. The IDE runs the DFU update for you and it should work more or less. If you have a windows PC then we’re able to use STs DFU update software versus our DFU update script. Anyway, it sounds like you ran it correctly the first time. However, you might not have had the right software packages installed. Also note that you absolutely have to do the udev setup as mentioned in our online documentation for DFU to work. Last, verify you have all the software packages installed.

Anyway, given the error code I saw, -1, it sounds like the DFU loader does have permission to access the device which points to the udev rules not being setup.

Thanks for the M7 offer. I will email you about that. I’ll try to find a Window machine to try the upgrade but for what it’s worth here is more detail with my Ubuntu issue.

The error after clicking “OL” in the “DFU Bootloader has enumerated” window is:

Traceback (most recent call last):
File “/home/nedhorning/openmvide/share/qtcreator/pydfu/pydfu.py”, line 20, in
import usb.core
ImportError: No module named usb.core

To try and fix that I followed the instructions in the next message window:

sudo apt-get install libusb-1.0 python-pip
sudo pip install pyusb

That didn’t work so I tried this from another post from someone with a similar problem:

sudo apt-get install python2.7 python-dev python-pip
sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
sudo pip install numpy pyserial==2.7 pyusb==1.0.0b2 Pillow

cd /share/qtcreator/pydfu
sudo cp 50-openmv.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

Checking the date on the file 50-openmv.rules it appears to have been updated.

Did you try again after everything was installed?

I did try again but I got the same result. I also rebooted the computer but that didn’t help either.

We’ll just send you an M7. The performance on the M4 is only good enough for color tracking.

By same result you mean libusb error ? Can you please try

sudo pip2 install pyusb

Note pip2.

That did the trick - thank you. I could kick myself for not thinking of using pip2 instead of pip. I appreciate the help.