Tuesday, May 27, 2014

I sat today to get OctoPrint to run a MR3020 router successfully. This is a long post, so stay with me. There are successful sub-steps documented elsewhere on the web, so I would link to them instead of putting them down here.

Devices Required
1) TP- Link MR3020 Wireless Router
2) A 4GB USB drive.
3)A 3d printer board

*****Steps beyond this have the capacity to void the router's warranty***

Installing OpenWRT on the router

1) Access the router
2) Navigate to the firmware update page
3) Upload the Openwrt Image and wait for the router to restart

See instructions here. For a router that has the barebones firmware from TP-link, use the webgui method which is recommended.

Setting a wireless AP and extending the flash capacity of the router
I followed a combination of guides given here and here

Unless the root file system has been successfully moved to the USB drive, do not continue steps further.

Setting up dependencies for OctoPrint

opkg update
opkg install python python-openssl kmod-usb-serial-pl2303 kmod-usb-serial-ftdi kmod-usb-acm distribute

Installing Octoprint
Download from the git repo for octoprint was done on my laptop, which had wamp running. I copied the zip file to my 'www' directory, started the wamp server, and executed the wget command with my laptop acting as the source of the files.

Once inside the unzipped Octoprint folder on your router, navigate to the folder Octoprint/Octoprint-master that has setup.py, and execute the following command

python setup.py build install

This step is successful will install Octoprint on the router.

With root credentials, you could test some initial stuff like connection and ports for octprint.

octoprint --iknowwhatimdoing

at the prompt.. This is using root credentials, hence its advisable to run as a non-root user. I tried this, but haven't got success owing to the limited memory on the router.

Create a non-root user and execute the commands with the python shell


The prompt will give you if the exeuction was successful and a URL with which the Octoprint server can be accessed.

navigate to the URL listed in the console, and you should be able to see the Octoprint startup page.