Comments (22)
Tested the last due flashing method and im happy to report it works, great job!
-Hazel
from octoprint-firmwareupdater.
Yes, probably.
Can you help me out by giving me an example command line? One that the Arduino IDE generates, or one that you can use on the console?
from octoprint-firmwareupdater.
Looking into this the Due uses bossac rather than avrdude. The plugin was architected to support different flashing tools but right now is only set up with avrdude. Adding bossac as a flashing method won't be too hard, but I won't be able to test it as I don't have a Due to try to flash.
If you can give me an example command line and a few days I'll get something together for you to test.
from octoprint-firmwareupdater.
Hi.
Sorry for my english...
This is the command launched by the arduino IDE:
C:\Users\xxxxxx\Documents\ArduinoData\packages\arduino\tools\bossac\1.6.1-arduino/bossac.exe -i -d --port=COM9 -U false -e -w -v -b C:\Users\xxxxxx\AppData\Local\Temp\arduino_build_614472/MK4duo.ino.bin -R
I hope I have been helpful, I'm available to help you with the tests.
Best regards
Salvatore
from octoprint-firmwareupdater.
OK, I've had a go at adding the new method. I had to re-do the plugin's settings UI a bit. Once configured the plug-in will run a command that looks like this:
/usr/bin/bossac -i -d -p /dev/ttyACM0 -U false -e -w -v -b /tmp/tmpOGgXb9 -R
Which looks like the one the IDE issues.
You can install the test version manually using the plug-in manager from here:
https://github.com/benlye/OctoPrint-FirmwareUpdater/archive/devel.zip
I'm reasonably confident it will work. I'm interested to know if the progress bar in the UI updates correctly. Whether it works or not, can you send me the octoprint.log file and the plugin_firmwareupdater_console.log file so I can confirm what success looks like?
from octoprint-firmwareupdater.
By the way, you need to install bossac on your OctoPrint server with the command line sudo apt-get install bossa-cli
(assuming it's OctoPi or similar).
from octoprint-firmwareupdater.
Hi.
The plugin does not work, it seems that it does not find the serial port; I attach the logs you requested.
octoprint.log
plugin_firmwareupdater_console.log
Ciao
Salvatore
from octoprint-firmwareupdater.
from octoprint-firmwareupdater.
Which port is the OctoPrint server connected to, native or programming? Can you try the other one?
from octoprint-firmwareupdater.
Hi.
I use programming port, with MK4DUO firmware the native port does not work.
Bye
Salvatore
from octoprint-firmwareupdater.
OK, comparing to the Arduino IDE it looks like the programming port is the one bossac wants to use, so that should be OK. I think the problem may be that the due needs to be reset/erased before flashing starts:
https://playground.arduino.cc/Botloader/DueBootloaderExplained
It seems like the Arduino IDE installs a variant of bossac which is tweaked to do this automatically, and I assume this is not the same as the version installed by apt-get.
Are you willing to try pressing the 'erase' button on your Due before attempting to flash it with the plugin? I don't have a Due and only know what little I've read about programming them. I don't know what it will do to the Due or what you might need to do to get the firmware back onto it afterwards. Presumably you could re-flash it from the Arduino IDE.
If that does work it seems like there are a couple of ways to trigger the reset/erase so I could incorporate that into the plug-in's flash routine.
from octoprint-firmwareupdater.
Actually, can you try flashing the firmware using the Native port? Even though OctoPrint cannot connect to it, the MK4Duo docs say to use the Native port for firmware uploads.
https://github.com/MKFirmware/MK4duo/blob/master/Documentation/Compilation.md
It could be that you need one port for OctoPrint and another port for firmware flashing.
Ben
from octoprint-firmwareupdater.
Doing more reading...
The arduino version of bossac was merged into the main branch a year or so ago, before version 1.7.0, so that's not an issue. But... apt-get installed version 1.3a of bossac on my Raspberry Pi, so it looks like the new version needs to be built from source.
cd ~/
sudo apt-get install libwxgtk3.0-dev libreadline-dev
wget https://github.com/shumatech/BOSSA/archive/master.zip
unzip master.zip
cd BOSSA-master
make
Then, the Arduino IDE has a flag (use_1200bps_touch
) in the Due board configuration to make an initial connection to the board at 1200bps which triggers the reset and erase and preps the board for flashing. I'll have to build that into the process.
I've ordered a cheap Due clone from eBay. Once I get my hands on it I should be able to get this working :-)
Ben
from octoprint-firmwareupdater.
Hi Ben.
I tried to connect both USB ports, but with none it works
Bye
Salvatore
from octoprint-firmwareupdater.
Hi Ben.
Have you seen this link?
https://github.com/johngrantuk/piupdue
Bye.
Salvatore
from octoprint-firmwareupdater.
I think I've got a method to do the reset before trying to use bossac to flash the board. As soon as the Due I've ordered arrives I'll be able to give it a go. If that doesn't work I'll look at piupdue.
Thanks!
Ben
from octoprint-firmwareupdater.
I got my Due board and have this working. It only works with specific versions of bossac - the one that comes with the Arduino IDE, or v1.7.0. It does not work with 1.8.0 or the master, as they seem to have changed the options and removed some of the Arduino-specific goodies (such as the ability to reset the board with the -R
flag). That said, it works reliably with v1.7.0 for me.
- Download, compile, and install the working bossac tool:
cd ~/
sudo apt-get install libwxgtk3.0-dev libreadline-dev
wget https://github.com/shumatech/BOSSA/archive/1.7.0.zip
unzip 1.7.0.zip
cd BOSSA-1.7.0
./arduino/make_package.sh
sudo cp ~/BOSSA-1.7.0/bin/bossac /usr/local/bin/
-
(Re)Install the devel version of the Firmware Updater plugin from here:
https://github.com/benlye/OctoPrint-FirmwareUpdater/archive/devel.zip
-
Configure the plugin for bossac and use the new path to bossac:
/usr/local/bin/bossac
-
Try to flash!
Let me know how it goes.
Ben
from octoprint-firmwareupdater.
@Laudix64 did you have a chance to test?
from octoprint-firmwareupdater.
from octoprint-firmwareupdater.
Thanks, @Hazel273. I have a few doc updates to finish then I'll push the new release out.
from octoprint-firmwareupdater.
I've released v1.0.0 with Due support!
from octoprint-firmwareupdater.
This issue has been automatically locked because there was no further activity after it was closed. Please open a new issue for any related problems.
from octoprint-firmwareupdater.
Related Issues (20)
- Can't flash Anycubic Mega Zero 2 HOT 2
- PSU Control HOT 2
- MarlinBFT and probably all methods broken with OctoPrint 1.9.0rc2 HOT 10
- Avrdude flashing method not functioning HOT 5
- Avrdude firmware flash fails and returns code 127 HOT 3
- Ender 5 Plus questions HOT 3
- Eryone Thinker Series 2560 HOT 5
- [Feature Request} (not a problem report) - Read and save current EEPROM contents HOT 2
- Board reset failed on Marlin 2.1.2.1 HOT 3
- Flashing failed - Cannot enter bootloader, check your `BOOT0/Reset` pins settings and try again HOT 9
- {disableverify} does not get replaced by space or -v if it is the last thing on the command line HOT 6
- Marlinbft not working with STM32 32-bit MCUs after first flash HOT 9
- Add Elegoo Neptune 4 HOT 3
- Ender 3 v3 SE support HOT 7
- Plugin requires marlin-binary-protocol, but it won't install: longintrepr.h: no such file or directory HOT 4
- Support for BTT SKR Mini E3 v3.0 HOT 10
- Feature Request: Backup and restore Marlin settings before and after update HOT 4
- Support needed for Prusa Mk4 HOT 5
- Board reset fails after successful BFT HOT 8
- heatshrink deprecation and replacement HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-firmwareupdater.