Firmware update

Discussion related to "under the hood" OpenMV topics.
atuor
Posts: 7
Joined: Sun Sep 18, 2016 8:45 am

Firmware update

Postby atuor » Sun Sep 18, 2016 9:02 am

Does anyone have a more detailed description on how to update to lates fw ?

I installed IDE 1.1 downloaded from the website, on Linux (latest?)

When trying to connect it says :

--------------------------------------------
OpenMV IDE must upgrade your OpenMV Cam's firmware to continue.
--------------------------------------------

When I press OK it always says :

----------------------------------------
Unable to connect to the bootloader!
This fails sometimes - please try again a few times before giving up.
---------------------------------------

And I can't continue to connect with old fw
(btw with the old IDE (1.5... strangely versioned), I can connect though
Any clue how to update this fw ?
Thanks
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Sep 18, 2016 10:05 am

Hi, I'm working on releasing an updated IDE very soon. The current IDE has some serial issues that make it difficult to connect.

The new IDE can connect but is trying to update the firmware which it's unable to.

I'll have the new IDE out by the end of the day (hopefully). Think you can wait till then?
Nyamekye,
atuor
Posts: 7
Joined: Sun Sep 18, 2016 8:45 am

Re: Firmware update

Postby atuor » Sun Sep 18, 2016 11:09 am

Great Thanks ;-)
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Sep 18, 2016 10:49 pm

Hi Atuour,

I almost had the release out today but ran into issues with Mac. So, for right now I just have linux and windows done:

http://openmv.io/upload/openmv-ide-wind ... -1.2.0.exe
http://openmv.io/upload/openmv-ide-linu ... -1.2.0.run
http://openmv.io/upload/openmv-ide-linu ... -1.2.0.run
Nyamekye,
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Sep 18, 2016 10:50 pm

If you have problems with the drive not being found on linux let me know where it's mounted. Right now I filter out all paths not under "/media". I'll be adding "/run/media" for Arch Linux.
Nyamekye,
GOB
Posts: 16
Joined: Fri Oct 30, 2015 11:59 pm

Re: Firmware update

Postby GOB » Thu Sep 22, 2016 11:33 am

Im using windows 7 and get an "unable to connect to bootloader" error when I try the new software.
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Thu Sep 22, 2016 11:46 am

Hi, I accidentally overwrote that software with a test version recently.

I just finished debugging the whole issue and figured out the root cause and we'll have the release done for all OSes by Friday. I can have the windows version up by tonight.
Nyamekye,
GOB
Posts: 16
Joined: Fri Oct 30, 2015 11:59 pm

Re: Firmware update

Postby GOB » Thu Sep 22, 2016 12:12 pm

Thanks!
GOB
Posts: 16
Joined: Fri Oct 30, 2015 11:59 pm

Re: Firmware update

Postby GOB » Thu Sep 22, 2016 12:55 pm

overclocking seems to be an issue with the new software. Crashes the IDE and have to cycle power to the cam.

Disconnecting also seems to be an issue now. Crashes the IDE when hit the disconnect icon.
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Thu Sep 22, 2016 1:52 pm

Yeah, the version I uploaded used to work, but then I was testing the overwrote it with another bad testing version.

Anyway, we bought a USB analyzer to figure out the problem. The next IDE will be rock solid.
Nyamekye,
User avatar
iplayfast
Posts: 18
Joined: Thu Sep 22, 2016 1:38 pm

Re: Firmware update

Postby iplayfast » Thu Sep 22, 2016 2:10 pm

looking forward to the linux version. (going to robotics club tonight to show off this board, so if it's possible to have it done sooner rather then later?)
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Thu Sep 22, 2016 2:22 pm

The linux version in the link above should work fine. I only broke the windows version in the link above.
Nyamekye,
User avatar
iplayfast
Posts: 18
Joined: Thu Sep 22, 2016 1:38 pm

Re: Firmware update

Postby iplayfast » Thu Sep 22, 2016 2:39 pm

nope. constantly getting the failed to connect to the bootloader error.
The board disconnects/reconnects and the mounted drive appears along with the /dev/ttyACM0 (or sometimes /dev/ttyACM1)
Then the ide says it couldn't connect.

I am able to talk to the board with an arduino ide so I think the hardware is working.

Where is the firmware file located?
found it

Code: Select all

find . -iname "*bin"
./share/qtcreator/firmware/OMV7/openmv.bin
./share/qtcreator/firmware/OMV7/bootloader.bin
./share/qtcreator/firmware/OMV7/firmware.bin
./share/qtcreator/firmware/OMV2/openmv.bin
./share/qtcreator/firmware/OMV2/bootloader.bin
./share/qtcreator/firmware/OMV2/firmware.bin
So which would I use, if I was trying to use the tools option. (or is that just a bad idea).
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Thu Sep 22, 2016 4:16 pm

Firmware dev: https://github.com/openmv/openmv/wiki/F ... evelopment.

And another guide. https://github.com/openmv/openmv/wiki/U ... r-firmware

If you're having problems with the newest Linux IDE I uploaded I'm not sure if the new IDE fixes will help... we'll see. There will be connection issues if the PC can't enumerate the Cam fast enough. For example, you can't use the boot loader through VMs because there's a 500 ms window to connect to the Cam.
Nyamekye,
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Thu Sep 22, 2016 4:17 pm

Use the OMV2/openmv.bin if you're using the manual tools. The firmware.bin is only good if you have the bootloader connection working.
Nyamekye,
Ben
Posts: 2
Joined: Fri Sep 23, 2016 3:30 pm

Re: Firmware update

Postby Ben » Fri Sep 23, 2016 4:24 pm

I still could not upgrade the firmware with 1.2.0 IDE. Without the upgrade, I can't make connection to the board. Please help. Thanks.
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Fri Sep 23, 2016 4:35 pm

Hi, did you try out the latest release? https://openmv.io/download/

I just finished releasing the IDE with my changes. Serial communication is rock solid now. But, the boot loader only has a 500 ms window for the IDE to connect and the computer takes longer than 500 ms sometimes to enumerate. I think there's a little bit more I can do to increase the connection chance in the future...

Let me know what platform you're on and if you're using the IDE that you can download from the website.

If you're using windows I you can use the DFU tool to manually upgrade the firmware here: https://github.com/openmv/openmv/wiki/U ... r-firmware
Nyamekye,
Ben
Posts: 2
Joined: Fri Sep 23, 2016 3:30 pm

Re: Firmware update

Postby Ben » Fri Sep 23, 2016 4:58 pm

Thanks for a quick response. But, you should open the window to 2 seconds or so. My PC can't enumerate a USB device in 500 ms.
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Fri Sep 23, 2016 5:00 pm

Yeah, the problem is that we can't update it. The bootloader was programmed by the factory into every board. For the next batch of OpenMV Cams we make this will be fixed.

Can you use the DFU tool? It's really easy to use on Windows. Once the firmware is updated the IDE will stop asking.
Nyamekye,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: Firmware update

Postby iabdalkader » Fri Sep 23, 2016 8:05 pm

Hi,

We're going to try to make the IDE do *less* work when scanning the com ports so it doesn't miss the 500ms window. In the mean time, I'm attaching a bootloader with 1000ms delay, if you upload this to your cam you'll be able to use the IDE later to update the firmware images.
Attachments
bootloader.dfu.zip
(9.59 KiB) Downloaded 125 times
User avatar
iplayfast
Posts: 18
Joined: Thu Sep 22, 2016 1:38 pm

Re: Firmware update

Postby iplayfast » Wed Sep 28, 2016 7:06 pm

Ya bastards! (not really)
Last week I borrowed a windows computer installed usb drivers and got past the bootloader problem. Back to Linux and all is well.

This week I get an email saying all is fixed and I should use the new ide.
OK I use the new ide, and it insists on a new bootloader! And it doesn't work the same as it used to not work.

Why not make the ide send dialog saying, bootloader update is available, attempt to upload it? And if you click No, it just continues without trying to upload it. (at my own risk).
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Wed Sep 28, 2016 7:44 pm

So, we changed the debug API around a bit going from version v1.4 (release version) to v1.7. It's just easier to do the IDE without trying to support multiple firmwares.

That said, this assumes everyone can use the bootloader. Which I fear isn't going to be possible given that it's only active for 500 ms. When we build new hardware that will get updated to 1000 ms or more. But, for all the cams in the wild now were stuck with the current bootloader.

So, this is what I'll do. I can make connect not need the bootloader. And I'll change the firmware version label into a tool button so when you click on it the system's firmware will get updated. If the firmware you are using is out of date the version label will turn red and say click on me to update or something like that.

In the mean time, just change the firmware version in the file here for the IDE to ignore your cams firmware:

<OpenMVIDAAppDir>/share/qtcreator/firmware/version.txt
Nyamekye,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: Firmware update

Postby iabdalkader » Wed Oct 05, 2016 12:47 pm

Hey, just a quick update on this issue....

We found a few issues with the way the IDE handles the bootloader process (which causes the "Unable to connect to the bootloader! This fails sometimes...." message) we're pretty sure we can fix this in the next release, so the IDE will be able to connect to the bootloader even if it only waits for 250m. As soon as we have more time we'll work on a new release.
atuor
Posts: 7
Joined: Sun Sep 18, 2016 8:45 am

Re: Firmware update

Postby atuor » Sun Nov 13, 2016 9:47 am

This is starting to get really annoying; I've let it aside some time and just saw the new IDE 1.3
Installs fine
Connects to the board (says No valid drives were found to associate with your OpenMV Cam!)
Mentions my firmware 1.8.0 is out of date
Clicked to upgrade (says Connecting, cancelled after 15 minutes as nothing happened)

Tried the proposed DFU Bootloader option, which gave this error message :
_____________________
- DFU firmware update failed!
- The command "/MyDocuments/Apps/openmv_v1.3/share/qtcreator/pydfu/pydfu.py" terminated with exit code 1.
- Traceback (most recent call last):
File "/MyDocuments/Apps/openmv_v1.3/share/qtcreator/pydfu/pydfu.py", line 20, in <module>
import usb.core
ImportError: No module named usb.core

- PyDFU requires the following libraries to be installed:

sudo apt-get install libusb-1.0 python-pip
sudo pip install pyusb
___________________
python-pip is installed, as well as pysub

What's wrong ? Any idea ?
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 10:09 am

The error message literally tells you what you need to install:

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

Please see this link: https://github.com/openmv/openmv/wiki/L ... stallation
Nyamekye,
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 10:10 am

pydfu the dfu upgrade script requires you to install some things that I can't install for you.
Nyamekye,
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 10:12 am

Oh, wait, I see that you have them installed in your message. Please check that link and confirm you have the versions in the link installed.
Nyamekye,
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 10:18 am

Okay, make sure you've done all this for pydfu to work. I would have preferred a better solution but this is the best we can do for now:

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 <openmv-install-dir>/share/qtcreator/pydfu
sudo cp 50-openmv.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

So, basically have all the pyusb stuff installed and make sure that your udev rules have been updated.
Nyamekye,
atuor
Posts: 7
Joined: Sun Sep 18, 2016 8:45 am

Re: Firmware update

Postby atuor » Sun Nov 13, 2016 10:36 am

Well done all this and versions are ok (minor differences)

launching pydfu still says :

Traceback (most recent call last):
File "pydfu.py", line 20, in <module>
import usb.core



PS : I use OpenSuse Leap 42.1
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 10:57 am

Mmm, I don't know then. Ibrahim will have to answer this. It seems the script cannot import the pyusb library. But, running all the commands I mentioned should give you 100% of what you need. On a Ubuntu machine running all that stuff works for me... Googled around a bit on it: https://www.google.com/webhp?sourceid=c ... b+opensuse. Can't seem to find anything that may be a good answer.

Do you have a windows computer around? The IDE has DfuSE (STM Tool) builtin on windows which has an 100% chance of upgrading the firmware. Also, since you're at version 1.8.0 you don't need to update the firmware to use the Cam with the IDE. The com protocol is stable for v1.7.0 and up.

...

And... I'm sorry about this still, I have really been trying to get all this 100% working for everyone. Setting the serial timeout to connect to the boot loader to 500 ms has.... cost me a lot of time... The next run of OpenMV Cams will have a much, much, higher timeout value.

Otherwise, beside for the bootloader issue v1.3 should be really good. However, I'm confused on why the IDE didn't find the OpenMV Cam flash drive. On linux the IDE assumes the drive is in either /run/* /mnt/* or /media/*. Does OpenSuse mount he flash drive somewhere else?
Nyamekye,
atuor
Posts: 7
Joined: Sun Sep 18, 2016 8:45 am

Re: Firmware update

Postby atuor » Sun Nov 13, 2016 11:21 am

I'll try on a Windows machine; as for the mount, it now seems to work, it's in run/media

My concern is that I've talked to someone in my town who owns an electronics shop, because I think it could be a great product for him; I just want to make sure the cams reach enough maturity so as it can be easy to set-up, show and help out if necessary
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 11:36 am

Yeah, I know exactly how you feel. I want to start advertising online but we're not quite there yet.

With the next rev of the cam I think it will be ready for your friend. We're going to be posting about a new Cortex M7 version soon which will have the bootloader issue fix along with a better USB connector and a bunch of other minor fixes. We get the dev boards back next week form MacroFab for this.

If your friend is using windows then things are pretty solid for that.

...

As for the mounting issue. The IDE checks all those paths I mentioned for a FAT flash drive when you connect. If it doesn't find one it gives that error. Simply wait for everything to be mounted before connecting for that problem to go away. Also, you can click on the drive label in the lower right hand corner of the IDE and it will search for drives again.
Nyamekye,
atuor
Posts: 7
Joined: Sun Sep 18, 2016 8:45 am

Re: Firmware update

Postby atuor » Sun Nov 13, 2016 11:47 am

Yep it worked fine on Windows and brought it to v2

as for the mount issue, it works sometimes... just tried it and gave the error although it was mounted ( /run/media/user/2989-0800> )

PS : By the way, not sure if it has a link, but in Windows, the leds flash continuously when it's plugged in, but in Linux, it flashes a few secs. and then stops, (I can still connect though), and here and then a quick short fred flash

Strange
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Firmware update

Postby kwagyeman » Sun Nov 13, 2016 11:55 am

When the blue led is flashing the OpenMV Cam is running a script that blinks the blue led. When the red led flashes that's the OS looking at the flash drive on the cam. The blue led should be flashing when the cam is connected until the IDE connects which stops that script. The red led should flash randomly, that's completely up to the OS.

Mmm, as for the mount problem I guess I can make that error silent. It will still fail but I can just not warn you. I can also make the IDE tell you to click on the drive button to search for drives. That should make it less annoying.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests