Bukobot 3D Printer Forum

News: Added the Bukobot Parts List (BOM) to Wiki at http://bukobot.com/bukobot-parts-list
Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Embedding a host computer inside the Bukobot: Raspberry Pi experiments begin  (Read 1868 times)

jit

  • Global Moderator
  • Full Member
  • *****
  • Posts: 174
    • View Profile
Bukobot Duo v1

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
Thanks!
I wanted exactly this, as I don't want to tie up my laptop while printing, but still want an interface to let me control the run.
I'm currently trying to setup usbip on my rpi so I can use my server (in a different room) to drive the printer, but being able to run directly on the rpi and control via vnc would be fine too.

Do you know if I can configure slic3r to run on a different host (disks mounted over nfs)?  The RPI will likely take a really long time to do slicing, and I have a lot more horsepower available on my other systems.

whosawhatsis

  • Administrator
  • Hero Member
  • *****
  • Posts: 598
    • View Profile
    • Whosawhatsis on G+
The easiest way to do that will likely turn out to be running a separate copy of Slic3r (and, optionally, Repetier Host) on your primary computer to do the slicing, then saving the resulting gcode to a network-shared disk on the Pi.

jit

  • Global Moderator
  • Full Member
  • *****
  • Posts: 174
    • View Profile
Once you have that gcode file, the possibilities are endless.  Put it on any network-shared file system, anywhere on the planet.  Put it on a thumb drive, move the thumb drive to the Pi's powered hub.  If you have an Azteeg X3, put the file on a microSD card and move it to the X3.

Or, install the CherryPy web server on the Pi, run pronterface's webinterface.py and control the printer from a web browser on another computer.  Probably can upload your gcode file to the Pi from that interface with just a few clicks.

We also need to do some experiments to find out exactly how slow the slicing will run on the Pi.

There are also various things we can try to improve the Pi's speed.  Adding a USB drive and putting some files there (swap too maybe) may help.  And the Pi can now be dynamically overclocked without voiding the warranty.
Bukobot Duo v1

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
I was able to get Pronterface up and running, but as my Pi only has 256MB, i was hoping to get by without the x-server.
I got the latest cherrypy installed from source, but i can't make it work.  I can get the server running, but when I connect, I get an error like:
TypeError: 'SpecialButton' object does not support indexing

Also, using the webinterface seems to require starting the GUI, which sort of defeats the purpose.  I'm going to try to go back to getting usbip working and see how that goes.

jit

  • Global Moderator
  • Full Member
  • *****
  • Posts: 174
    • View Profile
Not surprised things haven't gone smoothly.  I think you're the first person to actually try the web interface.  I wasn't planning to try that until I had my Azteeg connected to the Bukobot (I'm still photographing the physical build!).

Somebody needs to test these ideas on a 512MB Pi, and get them working.  Once we know we can get them to work on a Pi at all, then we can try the same things on the 256MB model.
Bukobot Duo v1

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
I tested that it worked using the regular GUI (though I didn't actually print anything).
I just set the DISPLAY variable to point at a linux server so I didn't need the xserver running on my Pi.

I'll likely try using a vncserver and see how tight RAM is at some point too.

Also, my RPi is capable of driving the Azteeg X3 without a powered hub (at least so far)

I was able to get  "usb redirector" installed on my Pi, but I have not yet been successful using it to connect remotely to the
Azteeg so far.

jit

  • Global Moderator
  • Full Member
  • *****
  • Posts: 174
    • View Profile
That's great!

Feel free to document what you're doing on the wiki....


 ;)
Bukobot Duo v1

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
I've added some info from my current experiments to theWiki.
I am able to use usb-redirector to convert the Raspberry Pi into a USB-to-ethernet bridge, and it does work with Pronterface being hosted on another machine, but while Repetier-Host can see the printer, I have still, so far, been unsuccessful in achieving a connection this way.  If I can get it to work, it would be very convenient to make a disk image that you could copy to the rapberry pi and then be able to run the printer from any place with an ethernet (or potentially wireless) connection.

Alternatively, I was able to get proterface running in a VNC session that I can connect to from any computer, which provides similar flexibility.  With that setup, there is still ~110MB of RAM free on my 256MB RPi (I did shrink the GPU memory to 16MB though)

jit

  • Global Moderator
  • Full Member
  • *****
  • Posts: 174
    • View Profile
This is great.

Almost everybody has been just assuming that the smaller Raspberrys wouldn't be suitable for this.  (And with doubts about the suitability of the bigger one too.)

Proving them wrong would be wonderful.
Bukobot Duo v1

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
Well, in the end it is bad news i guess.
the 256MB RPi doesn't actually have enough menory t pint anything other than simple shapes with pronterface.
I started using pronterface running on a VNC session hosted by the RPi.  It ran out of memory very quickly, and printing anything other than very simple shapes was a no-go.
I then shut down the vnc server, and set DISPLAY to point at another linux machine.  With this I was able to run pronterface on the RPi, and print out a MB gcode file.  There was ~50MB of memory free (nothing running on th eRPi except pronterface and a few ssh shells)
Next I tried to print out a 35MB gcode file.  This ran out of memory, so I switched to using pronsole.  With this I had no issue whatsoever loading my 35MB gcode file and printing it.

I am quite confident that the memory usage comes from trying to render the gcode file.  If I could get a web-interface that did not try to fully render the gcode, I think I'd be set.  For now, I'll use pronsole.  It really isn't buying me much over loading the files into the sdcard, but at least I can pause, resume, change filament, and move the axes, which is all I really need.

I was also able to print using usb-redirector as I mentioned before.  With a Windows computer running Repetier-host, it work great, but I only have a trial of the software, and it costs ~$70, and I want to do this with free software.
Using usb-redirector to a linux computer, I couldn't get Repetier-Host to work, but pronterface runs fine with any object size, and this configuration can be done for free.

I spent a lot of time trying to get usbip (which is like usb-redirector, but is free software) to work.  I got it compiled on my RPi after much effort, but the client software locks up my linux machines, so this isn't really an option at the moment.

buildrob

  • Global Moderator
  • Full Member
  • *****
  • Posts: 123
    • View Profile
I also put up instructions for adding Ethernet connectivity for the printer (via a WiFly module) on Wiki under User Add-Ons.

Of course I imagine you are trying to do this because you have already bought yourself a Pi. :-)

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
A short update:
I've been using pronsole successfully for a couple weeks now on my RPi to drive my bukobot.  I miss the GUI interface, and there are a few features I wish I had (which maybe I can implement vs Macros if I learn how to use them)

I recently found this which looks really promising:
https://github.com/dronus/VisPrinter
It is basically a fork of PrintRun which implements a web interface for pronsole (vs the interface for pronterface in PrintRun).  It even has client-side 3D rendering, though it isn't perfect.

I tested it on my 32MB gcode file:
stock pronsole uses about 100MB or RAM to load this file.
Visprinter peaks at around 130MB to load it, but drops back to 100MB once it is loaded
VisPrinter is MUCH slower to load a file of this size.
VisPrinter's renderer can't handle this much data, and only renders the 1st 5th of the file
VisPrinter doesn't appear to provide any way to see printer status.  commands like connect, and gettemp don't seem to display
VisPrinter can run Slic3r (which i could probably setup to execute via ssh on a different host) so you theoretically have an all in one system.  But while you can select pre-defined Slic3r configs, you can't actually tweak configurations through the web interface.

Anyhow, I'll probably stick with pronsole for now, but VisPrinter looks promising.

Also, work has begun on a thin-host for Repetier-Host.  It should provide a similar, but better, solution as VisPrinter.  it should give all the capabilities of Repetier-Host on the Client-side computer while allowing the RPi to execute commands, but not requiring the connection be maintained after printing has started.

More info here:
https://github.com/repetier/Repetier-Host/issues/64

jit

  • Global Moderator
  • Full Member
  • *****
  • Posts: 174
    • View Profile
After a long respite, I have started playing around with the Raspberry Pi again.

I've added a lot more detail (and fixed quite a few of my errors) on the Pi page:

http://bukobot.com/raspberry-pi

For the first time, I have sliced a part on the Pi with Slic3r, and printed it.  There had been some concerns that the Pi wouldn't be fast enough for slicing, but I haven't had any problems so far with small parts.  The amount of time needed to slice is only a fraction of the time needed to actually print the part, so Slic3r's speed on the Pi is not a concern.

Still to be done:  Experiments to see if the Pi runs out of memory when dealing with large complicated parts.

Still to be done:  Speeding up the Pi.  It is now possible to overclock the Pi without burning it up or voiding the warranty.  Speedups as much as 50% have been achieved on some benchmarks.  I haven't tried this yet.
Bukobot Duo v1

PhracturedBlue

  • Newbie
  • *
  • Posts: 44
    • View Profile
There is now a 'repetier-server' for Repetier-Host:
http://www.repetier.com/repetier-server-download/
It was specifcally designed to let Repetier work well with the Raspberry Pi.
I haven't tried it yet, but expect to do so soon.

 

BloQcs design by Bloc
SMF 2.0.3 | SMF © 2011, Simple Machines