Page 1 of 1
How to Upload Firmware HEX to Max v3
Posted: Sat Feb 25, 2017 6:43 pm
by briankb
I have my Rostock Max v3 setup with a Raspberry Pi installed in the top and running OctoPi.
I have tried for the last few hours to figure out how to use avrdude to upload the pre-compiled .HEX files available in the github seemecnc firmware repo but can't get it to work. I'm trying to avoid removing the top and getting hands on with unplugging the raspi so I can use the laptop to upgrade the firmware with arduino ide (which I have done in past).
How can I upload/update my Max v3 firmware from a linux command line?
the serial connected to it is /dev/ttyACM0 according to the OctoPi serial connection which works.
Re: How to Upload Firmware HEX to Max v3
Posted: Sat Feb 25, 2017 7:04 pm
by WZ9V
I can't remember the exact command line but install the avrdude package and run it from the command line.
Here is a tutorial that should help
https://learn.sparkfun.com/tutorials/po ... ng-avrdude
Re: How to Upload Firmware HEX to Max v3
Posted: Sat Feb 25, 2017 7:08 pm
by briankb
Thanks but I need specific advice or commands to use.
I have already googled and even read the link you are suggesting a few hours ago.
It is using -c usbtiny which is not right since the octopi is connecting via ttyACM0 (yes it's usb but it is virtualized serial port I think).
I can't find anything specific about connecting and uploading to the Rambo board via avrdude.
Re: How to Upload Firmware HEX to Max v3
Posted: Sat Feb 25, 2017 11:09 pm
by WZ9V
Here is what the Arduino 1.6.0 IDE issues to do an upload.
/opt/arduino-1.6.0/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/build192479044862671788.tmp/Repetier.cpp.hex:i
I think if you fix the install directories to what you have and change the part in bold to the file name of the hex file you have you should be good to go.
Once I have my OctoPi up and running I'll know the actual command because I don't want to have to open up the printer in order to update the firmware on the RAMBO.
Re: How to Upload Firmware HEX to Max v3
Posted: Sun Feb 26, 2017 11:33 am
by briankb
WZ9V wrote:Here is what the Arduino 1.6.0 IDE issues to do an upload.
genius! I didn't even think to look and see what they were using. trying it now, once I locate where all the files are on this octopi install.
Re: How to Upload Firmware HEX to Max v3
Posted: Sun Feb 26, 2017 12:54 pm
by briankb
I got it to work, here is how I did it and I'm sure these steps could be reduced or the process done better but this is how I did it.
using PuTTY I logged into the Raspberry Pi 2 that is mounted in the top of my Rostock Max v3.
Verified the serial port it was using from the connection that was successful in OctiPi, in my case it is
I created a new folder to keep things tidy in this case I created a new folder in the home/root folder "firmware".
Note: you could git clone both the arduino and seemecnc firmware repos but I only need a few files and just used wget to download the RAW version of the various files which are:
Arduino avrdude.conf
Code: Select all
wget https://raw.githubusercontent.com/arduino/Arduino/master/hardware/arduino/avr/bootloaders/gemma/avrdude.conf
SeeMeCNC Rocstock Max 3 Firmware HEX
Code: Select all
wget https://raw.githubusercontent.com/seemecnc/Firmware/master/Repetier%20Firmware/rostockv3.hex
notice I'm using the RAW version of that file stored in github, the RAW gives you the actual text of the file and wget will create a new file with the contents of the URL you supply.
first I did a test connection using
Code: Select all
avrdude -C avrdude.conf -v -p atmega2560 -c wiring -P /dev/ttyACM0 -b 115200
Which gave me a terminal to the arduino (rambo) board. then ctrl-c to break out of the terminal
Success! So I know I can at least talk to the Rambo board connected to the raspi (raspberry pi)
Once I had a good connection I added the .hex file
Code: Select all
avrdude -C avrdude.conf -p m2560 -c wiring -P /dev/ttyACM0 -U flash:w:rostockv3.hex:i -D

- Screenshot of Successful Upload of Hex to Max3
Re: How to Upload Firmware HEX to Max v3
Posted: Sun Feb 26, 2017 3:27 pm
by geneb
Why go to all that effort when uploading the code via the IDE does the job?
g.
Re: How to Upload Firmware HEX to Max v3
Posted: Sun Feb 26, 2017 3:54 pm
by briankb
geneb wrote:Why go to all that effort when uploading the code via the IDE does the job?
g.
Do you mean from the Arduino IDE or from the LCD on the max?
if from Arduino IDE (Win/Mac)?
it's because the raspberry pi is installed in the top of the max 3 and to use my laptop or Arduino IDE I have to
- Move the Max from it's location on a shelf
- Remove the top to access electronics
- Disconnect Rambo from Raspi
- Connect Laptop to Rambo
- Upload the new firmware from source
- reverse step 4
- reverse step 3
- reverse step 2
- reverse step 1
Now that I have it setup and configured. I can just grab the pre-compiled .hex from repo and upload it from a SSH client session.
Is it possible to update the firmware on from the LCD using only the hex file?
Re: How to Upload Firmware HEX to Max v3
Posted: Sun Feb 26, 2017 6:04 pm
by ROvermeyer
Brian,
I installed Pixel on the Pi using his procedure:
https://www.raspberrypi.org/forums/view ... 6&t=133691
Then I installed XRDP using this procedure:
http://elinux.org/RPi_XRDP_Server
Now you can use Remote Desktop from a windows machine and run the Arduino IDE GUI to install firmware.
Re: How to Upload Firmware HEX to Max v3
Posted: Sun Feb 26, 2017 9:44 pm
by WZ9V
Thanks for the OctoPi summary. At some point I need to set that up also. Right now I'm still under construction but once I button it up I'll need to work through the OctoPi.
Re: How to Upload Firmware HEX to Max v3
Posted: Mon Feb 27, 2017 8:44 am
by geneb
Well like the gent said, if you've got the Pi installed, you can RDP into it and upload using the IDE.
g.
Re: How to Upload Firmware HEX to Max v3
Posted: Mon Feb 27, 2017 12:46 pm
by WZ9V
Installing a whole GUI just to run the IDE seems far more excessive in my opinion.