Coder Social home page Coder Social logo

Comments (22)

Hazel273 avatar Hazel273 commented on July 21, 2024 1

Tested the last due flashing method and im happy to report it works, great job!

-Hazel

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

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.

benlye avatar benlye commented on July 21, 2024

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.

Laudix64 avatar Laudix64 commented on July 21, 2024

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.

benlye avatar benlye commented on July 21, 2024

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.

benlye avatar benlye commented on July 21, 2024

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.

Laudix64 avatar Laudix64 commented on July 21, 2024

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.

Laudix64 avatar Laudix64 commented on July 21, 2024

image
image

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

Which port is the OctoPrint server connected to, native or programming? Can you try the other one?

from octoprint-firmwareupdater.

Laudix64 avatar Laudix64 commented on July 21, 2024

Hi.

I use programming port, with MK4DUO firmware the native port does not work.

image

Bye

Salvatore

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

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.

benlye avatar benlye commented on July 21, 2024

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.

benlye avatar benlye commented on July 21, 2024

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.

Laudix64 avatar Laudix64 commented on July 21, 2024

Hi Ben.

I tried to connect both USB ports, but with none it works
Bye

Salvatore

from octoprint-firmwareupdater.

Laudix64 avatar Laudix64 commented on July 21, 2024

Hi Ben.

Have you seen this link?
https://github.com/johngrantuk/piupdue

Bye.

Salvatore

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

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.

benlye avatar benlye commented on July 21, 2024

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.

  1. 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/
  1. (Re)Install the devel version of the Firmware Updater plugin from here:
    https://github.com/benlye/OctoPrint-FirmwareUpdater/archive/devel.zip

  2. Configure the plugin for bossac and use the new path to bossac: /usr/local/bin/bossac

  3. Try to flash!

Let me know how it goes.

Ben

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

@Laudix64 did you have a chance to test?

from octoprint-firmwareupdater.

Laudix64 avatar Laudix64 commented on July 21, 2024

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

Thanks, @Hazel273. I have a few doc updates to finish then I'll push the new release out.

from octoprint-firmwareupdater.

benlye avatar benlye commented on July 21, 2024

I've released v1.0.0 with Due support!

from octoprint-firmwareupdater.

github-actions avatar github-actions commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.