Found in a drawer getting started (again)

I had to put my openmv away and never got back to it until now.
It’s an old version from a kickstarter. Date on the mask is 2/8/2016
OpenMV Cam 2
which I guess means the board is version 2.

So I redownloaded the ide and it connected, and told me the firmware was out of date and did I want to update it.
I thought ok that’s cool, and clicked ok. A new drive opened up and it just sat there.

After some searching found compiled binaries of the firmware and downloaded it. Several versions, and I uncompressed openmv2
It’s got a bunch of files, (but the one missing is a readme)
the firmware.bin is 955.5 kb, the drive that opened up has 23K available. So I can’t just copy it onto the drive.

So how am I supposed to update the firmware? (The wiki has moved, and in it’s place is something showing how to compile firmware, I think.)

The ide already updated the firmware. The new drive is so you can drag and drop a MicroPython script onboard. You should read the getting started guide. It covers this stuff.

Sounds like you have the original camera. The feature set on that one is pretty thin and speed isn’t great. But, it will be supported forever. So, things are pretty well debugged at this point.

Note, TensorFlow isn’t supported in that version. But, it can do color tracking. So, find_blobs is mainly what you can do with it.

I don’t think the firmware is being upgraded. The ide says firmware version is 1.9 and even after upgrading it wants to upgrade. I’ve done bootloader flash and that seemed to work, but firmware still won’t upgrade.

I’ve also got another version, of the board. which is newer. It wanted to do a firmware upgrade, and that worked flawlessly, and automatically. So I think there is a problem upgrading the old board.

Any clue on how to proceed?

Ah, you probably need to use DFU mode.

Okay, do this, download the latest firmware release, unzip it, use the tools → Run Bootloader command, and select the OpenMV2/OpenMV.dfu file in the firmware release.

The ide will walk you through the upgrade steps and then the board should be good to go.

I did that. Came back with immediately with the message saying the “firmware update complete!” (I think it was lying, as it was too fast)

Same result. Things still work, still has old code on drive.
I’ve tried every combination of erase filesystem. connecting reset and boot. That I can think of.
It really likes to stay on firmware 1.9

Hi, do you have the latest IDE installed? DFU mode with the latest IDE should pop-up a terminal window and you should see text printing with status bars and it saying it’s using dfu util. It shouldn’t be instant.

Yes I downloaded it today. I saw what you are describing on another openmv that I’ve got. Worked perfectly. Just the early version seems to be having problems.

Did you connected the jumper on BOOT0 and RST?

I have both of the early M4 models and it should work. Mmm. Not sure what’s wrong. The process should go quite smoothly.

I did connect a jumper between Boot and RST. From the usb side going up it’s pin 5 and 6.
I’ll go through step by step and see if what I’m doing is different then you.

  1. I’m running on Linux
  2. Run openmvide
  3. Menu tools → Run bootloader
  4. Navigate to /home/chris/bin/openmvide/share/qtcreator/firmware/OPENMV4P/bootloader.dfu (am I using the right one? I’ve tried a couple but they all have the same results).
  5. Disconnect from usb, add jumber to boot and rst
  6. Reconnect to usb, check dmesg to see if it registerd (it does).
  7. Click ok,
    It immediately comes back with DFU update complete.
  8. Click OK, It comes back with no cameras found.
  9. Asks if I have a bricked device.
    IDE hung at this point. (Not seen this before, perhaps because I’ve been going back and forth between it and the browser and it’s lost focus?) Had to use xkill to quit.

From the console after the xkill
gClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for QWidgetWindow(0x74ec770, name=“QProgressDialogClassWindow”) which has Qt::WindowDoesNotAcceptFocus set.
The X11 connection broke: I/O error (code 1)
XIO: fatal IO error 2 (No such file or directory) on X server “:0”
after 3193449 requests (3193449 known processed) with 0 events remaining.
/home/chris/bin/openmv: line 1: 16280 Segmentation fault (core dumped) openmvide/bin/openmvide.sh

I go back into openmv
Try to connect and get firmware out of date message again.

It asks if I want to upgrade the firmware,
I say ok
it says erase the file system
I’ve tried all answers makes no difference.
It says Connecting… Hit cancel if it takes more than 5 seconds, and then opens a drive window to the board. I can see the python files there.
Nothing happens so I hit cancel, and the ide is locked up again.
from the console it says:

requestActivate() called for  QWidgetWindow(0x2e06770, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for  QWidgetWindow(0x7f83ec00da50, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for  QWidgetWindow(0x7f83ec00da50, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for  QWidgetWindow(0x2d0b450, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for  QWidgetWindow(0x2d3ec00, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for  QWidgetWindow(0x2d3ec00, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for  QWidgetWindow(0x2d3ec00, name="QProgressDialogClassWindow")  which has Qt::WindowDoesNotAcceptFocus set.

Which explains why it can’t regain focus.

In anycase the firmware doesn’t get upgraded.

You’re using the wrong file.

It’s the /OPENMV2/OpenMV.dfu file.

I mentioned this in my previous post.

You’ve been loading the bootloader file for a different STM32 cpu onto your camera. This 100% breaks the device.

Regarding the lack of focus. I set a flag on the progress dialog that prevents it from taking focus. Mmm, maybe that dialog is getting hidden behind the ide main window.

I am pushing a new IDE very soon. I’ll make sure that window stays on top.

I did try that file first. Not sure why I typed the other one. Just tried it again, same results.

It comes back so fast from the bootloader that I don’t think it did anything.
As the same program is still in memory, even if I say to erase the filesystem.

At what point should I remove the jumper?

When it works for you, what OS are you using? (BTW, looking through the examples, I’m really liking openmv which is why I backed it again for the last version (which works perfectly)). I just have a project that could use one, and thought I could get the old one working for it.

Regarding focus. You can recreate the problem I was having by getting a dialog. alt-tabbing to a different windows. click on it so the new window has focus. Then alt tab back and try to click the OK button of the dialog.

Mmm…

I use windows. Most things just work on it.

Anyway, maybe your device isn’t in DFU mode. Do this, if you have a way of checking what devices are attached look for an STM DFU device in the USB device tree. In windows it appears as an STDFU device in the windows device manager. Not sure what it appears as in linux. But, if the board is in DFU mode it won’t look like an OpenMV Cam.

The IDE should then connect to it correctly then and update it.

Success. Using with windows is a totally different experience.
It was able to update firmware without reloading the bootcode.