A while ago I posted this question LCD module or Linux Barebone as a control? . I finally found time to try things myself...
I'll try to walk you through what I did as best as I can, but if there are any errors or omissions, please note that prior to this Friday, I did not have any experience whatsoever with Linux or RaspberryPi!
For this project I borrowed everything I needed to learn from timeLab in Gent where I live. (Thanks Kurt!)
My motivation for doing this was to improve the user interface of the Felix. Previously, I needed either to stay tethered to the printer by USB during the duration of the print (not comfortable + risk of losing connection) or copy the gcode to the SD card (loss of ability to monitor the printer during print)
An alternative was buying the LCD module, but I had used this briefly with Ultimakers, and I find the navigation a PITA, and I would still need to transfer the code through an SD card (cumbersome).
The makers of RepetierHost are writing RepetierServer and their first working version runs on a RaspberryPi... [Spoiler alert] I ended up controlling my Felix through a web browser and uploading gcodes though my network. I can even control the printer with my iPhone now... and all this for 50 euros or less!
So this is what I did using Win 7 (actually this is a mashup of several walkthroughs I found on the web I'll reference below). You should be able to do this in about 1 hour once you have a RPi:
- Get a beer
- Get a RaspberryPi model B, a power supply (USB connector, 5V 1500ma) and connect it via Ethernet to your router. This is almost the smallest BOM needed. I actually started with a monitor, keyboard, mouse etc. But then I learned these are not a must for what we attempt to do here.
- Download and install this disk imaging tool: Win32DiskImager
- Download and decompress this Linux distribution image: 2013-05-25-wheezy-raspbian.zip
- Write the image onto an SD card (you need minimum a 4Gb card)
- Insert the card in the RPi and plug the RPi in. Allow about a minute to boot. Ok: Now, the first time Raspbian boots it will start it's configuration utility raspi-config. I don't know if you already have SSH access at this point. (See my disclaimer: I'm a linux noob!)
- Get the IP address given by your router to the RPi
- Download and install this SSH client: PuTTY
- Run PuTTY and enter the previous IP address as host name and press enter
- You will need to login (user=pi, pass=raspberry)
- Since I'm reconstructing these steps by heart I THINK you have logged in to a new SSH session so you'll need to enter raspi-config to get to the configuration utility.
- From all the things you can configure here, I only needed to enable "Expand root partition to fill SD card". (Otherwise you won't have enough space to install the RepetierServer)
- Quit raspi-config and reboot
- Open an SSH session again and log in
- Now type all these commands one by one to install RepetierServer on the RPi:
- sudo apt-get install cmake
- sudo apt-get install libboost-all-dev
- sudo apt-get install git
- git clone git://github.com/repetier/Repetier-Server.git
- mkdir build
- cd build
- cmake ..
- make (this will take about 30 minutes)
- sudo cp RepetierServer /usr/bin
- sudo cp ../linux/repetier-server.conf /etc
- sudo mkdir /var/lib/Repetier-Server /var/lib/Repetier-Server/configs /var/lib/Repetier-Server/www /var/lib/Repetier-Server/storage /var/lib/Repetier-Server/languages
- sudo cp -r ../www/* /var/lib/Repetier-Server/www
- sudo cp ../languages/* /var/lib/Repetier-Server/languages
- sudo cp ../linux/init_Repetier-Server_debian /etc/init.d/Repetier-Server
- sudo chmod 755 /etc/init.d/Repetier-Server
- sudo update-rc.d Repetier-Server defaults
- cd /dev
- Plug in the USB cable from the Felix
- Type ls again and try to see which one was added (mine was ttyUSB0, but your mileage my vary)
- Now we need to add our Felix to RepetierServer. Since I don't know how to edit text files from the command line I used the GUI...
- Install and start a VNC server on your RPi by typing
- sudo apt-get update
- sudo apt-get install vnc-server
- vncserver (next time you only meed to type this to statrt it)
- Install and run this VNC client on Win7: TightVNC 32-bit (I used actually the 64-bit version)
- Follow the instructions to add a server password confirm the password say no to the view only option
- Log in to LXDE in your RPi with something like this 192.168.1.25:5901 (use your IP but keep the port number).
- Double-click on the icon to the right of what would be the start icon (the File Manager)
- Navigate to /home/pi/Repetier-Server/configs and double-click on a0-101.cfg to edit it as follows
- device="here you need to type the device name assigned to the Felix (mine was ttyUSB0)"
If you like you can edit the speed settings (these are for the manual controls, they do not influence your gcode)
- Save the file as felix.cfg on the same directory
- Copy felix.cfg to the working directory of RepetierServer by typing the following via your PuTTY terminal
- sudo cp /home/pi/Repetier-Server/configs/felix.cfg /var/lib/Repetier-Server/configs
- Start RepetierServer with
- sudo /etc/init.d/Repetier-Server start
Note that the server will automatically start when you reboot the RPi
If you need, you can reedit the previous config file, stopping the server (same line above with "stop", overwriting the config file on the working directory and restarting the server
- Almost there!
- Go to the following address with your browser from Win7 or your iPhone: http://[yourIP]:8080
- There! Get another beer!
Although this is a work-in-progress, I found it already at a pretty usable state!!
Multiple users can log in to the same printer and you can manage multiple printers (connecting them to the RPi via a powered USB hub)
There is no "Power" button but you can send the command M80 to power via de manual controls and M81 to power off
You can easily upload your gcodes and add them to print queues.
Another advantage is that you are independent of FTDI driver issues on whichever OS you are. You can also choose your slicer software with more freedom!
ref 1 http://www.engadget.com/2012/09/04/rasp ... de-how-to/
ref 2 http://elinux.org/RPi_A_Method_for_ssh_blind_login
ref 3 http://elinux.org/RPi_Wheezy_VNC
ref 4 https://github.com/repetier/Repetier-Se ... NSTALL.txt
I have a ToDo list to improve on these solution... (More like a wishlist actually, since I don't know if I'll be able to do it)
- Reduce this walkthrough drastically by hosting an image of Raspbian with RepetierServer and VNCServer pre-installed
- Power the RPi with the same power supply of the Felix
- Get rid of the UTP cable by using a USB Wifi network adapter for the RPi
- Redesign the upper cover of the Felix Power supply to mount the RPi inside the housing
- Submit felix.cfg as felix20.cfg to Github to be included on the next version