The IDE keeps saying ‘Device Busy’, when I click the USB connect button …
Yesterday I tried combinations of flashing boot, load and firmware, with resets and boot pins connected, not connected, cetera … but I was unable, to get the camera back in the states, where the IDE can the code on the camera. it keeps saying device busy.
So today I tried to keep a log, to be able to give us structured post here.
I did:
- Connect reset and boot pins with a jumper wire.
- Connect camera by USB to mac M1 laptop.
- select update to latest firmware
- Watch is the new files be written. It said success.
- The camera is now flashing green.
- The IDE asks to disconnect the camera, disconnect the jumper wire, and reconnect the camera
- The is searching for the camera, but never connect to it. I press cancel.
- Trying to connect to the camera from the IDE says ‘device busy’
Here are some screenshots:
Having a mental picture of what is going on, would greatly help me.
- What are the statuses of the flashing LED? Is there any documentation for this?
- What is the relation of boot loader and firmware? Can I load both the boot loader and firmware when the reset and boot pin are connected to the jumper wire?
In the folder of OpenMV4, there are three types of extensions … it is unclear for me what is what and how they are to be used
(maybe read me in this folder would help people, there are less knowledgeable of embedded software?)
Looking forward to your reply!
Hi,
The IDE will load known working firmware onto the camera. You should not need to select the different binary files. Please avoid doing that.
The files are listed in the README on the github in the src folder.
Okay, so it appears flashing the bootloader went fine. The issue is that after the bootloader is flashed, the IDE will then try to install the firmware. This should work without issue. It saying the device is busy means that something is preventing it from opening the serial port to flash the camera.
Since you have an M1 mac I haven’t tested our software on this. I know that it works though because I’ve asked friends to use them to test the software. But, I can’t say I’ve seen all issues.
Please email me at openmv@openmv.io and we’ll schedule some time to live debug.
FYI the release bootloader is broken, use the dev-firmware one.
1 Like
@Nick223 - I’ll walk you through how to fix this on Monday. Alternatively, if you want to do it this weekend:
https://github.com/openmv/openmv/releases/download/development/firmware_OPENMV4P.zip
You need to copy these files over the IDE config resources. The folder should be ~/.config/OpenMV IDE/openmvide/firmware/OPENMV4P.
After doing that the IDE will pull the new bootloader and release firmware when resetting it back to default.
Then it should do what you expect.
I created a stable patch release so no else uses the broken bootloader again.
My camera again got stuck, So I flashed it again …
But this time, the Mac OS, Is no longer able to read the content of the disk… ?
Maybe this is due to your update?
Note: I am writing code, that heavily writes and read uart …
And maybe because of buffer overflow or so, I am having these problems … (like the embedded program appearing to ‘hang’ … but maybe it’s no longer able to communicate with the IDE (and os?), because it is consuming all uart bandwidth?)
I am not an embedded engineer, so just guessing a bit. One thing I found very strange, after the flash (with clearing of code) … the program still ran.
I am also not getting the blue LED after flashing, but I did see a red briefly.
Hi Nick,
I just released the latest resources. Whatever was happening before this post wasn’t us.
When you start the IDE now it should download the latest resources with the fixed bootloader. At this point DFU bootloading should work correctly if you need to recover.
Note: I am writing code, that heavily writes and read uart …
And maybe because of buffer overflow or so, I am having these problems … (like the embedded program appearing to ‘hang’ … but maybe it’s no longer able to communicate with the IDE (and os?), because it is consuming all uart bandwidth?)
Shouldn’t matter. The system can do 7.5Mb/s UART data transfers without any issues. Please post the reduced version of your code that causes the problem.
I am also not getting the blue LED after flashing, but I did see a red briefly.
Your program controls this. Unless you coded it in it won’t.
Hi Kwagyeman,
The update seem to work, the IDE can talk again (normal mode) to the camera…
And the OS detects and mounts, the file system.
But there is something wrong with the mount. The drive is displayed in the Mac file explorer called ‘finder’, but its content is empty, and I can write to it.
In the IDE, I open a folder, containing the main.py, and modeles that main.py uses.
When I run, main runs and loads one of the modules … but it runs a previous version of the module. So I presume, the previous version is what in reality exists on the file system of the camera. But that cannot delete the previous version, because I cannot properly access the file system.
(it is unclear to me, which files the IDE writes to the camera before executing the file to run – does it write the entire folder, or only the file to run?)
Note: One theory: when I initially inspect the file system (when it was working), I saw the files and also a bunch of hidden files … maybe the hidden files for proper operation? And have been erased …?
‘Tools >> erase on board flash’ seems to have fixed this
Great to hear. Sorry for all the issues. Normally, using the system is pretty smooth. Hopefully, it should be stable now.
Please note, we heavily recommend using a uSD card if you are going to write out files to the disk in MicroPython. You should treat the internal uPY flash drive as more of a read only system by your scripts and just have the PC write to it when you are developing.
It’s easy to remove an SD card from the system versus having to restore the internal flash if you make a program that locks up the system.