Ultimaker2 firmware update in Linux and printing from USB port using Cura

Cura Ultimaker 2 print from USB

Ultimaker 2 print from USB in Cura

I have been using the Ultimaker 2 3D printer for a while now, printing from the SD card. It gets tiring to keep working in a vicious cycle of unplugging the SD card from the printer port, plugging it in a card reader, saving the Gcode from Cura in there, unplugging the SD card from the card reader and finally plugging it back into the 3D printer. It is annoying when you are going through the itarative prototyping cycle, especially for press-fit pieces or optical bench parts where precision is the key. I have hence been looking for a way to print through USB, well, serial port connection. I plugged in the USB cable to the printer and PC and…. nothing happens. Where to begin?
So Cura comes with a configuration for the Ultimaker 2 where the Gcode selected is UltiGcode, the Ultimaker Gcode flavor. This deliberately denies you a chance to print from ‘USB’, am guessing because the serial connection isnt all that stable.
To allow printing from ‘USB’, you have to select a different Gcode flavor, like RepRap. The UltiGcode is based on the RepRap Gcode but with more settings pushed to the firmware rather than the slicing tool, bare this in mind while you use this Gcode flavor. If you do this, do it at your own risk and this post is not responsible for any damage caused to your printer or prototype product. This post only provides information you should use to figure out how to make things work better.
after changing the Gcode flavor, the print via USB icon now appears in Cura.
The Ultimaker 2 printer uses a default custom baudrate of 250000. This doesnt work well out of the box in Linux. I am using Ubuntu 14.04 and the posix serial library doesnt work with this custom baudrate. Patch the library with the following steps:
1. Get the the posix serial library file and save it as new_serialposix.py, just a different name to differenciate the files.
2. Patch the serialposix.py file in your Linux library with that file. First prepare the patch file

diff new_serialposix.py $(locate serialposix.py) > patch.txt

Then Patch the file

patch $(locate serialposix.py) < patch.txt

Now the baudrate setting of 250000 will work 🙂

Apart from printing from USB, You can also update the firmware, under the menu Machine -> install default firmware

Leave a Reply

%d bloggers like this: