From 9ab5c7491dd88039206335983331e3554e19d669 Mon Sep 17 00:00:00 2001 From: Wouter R Date: Wed, 10 Jul 2013 14:46:43 +0200 Subject: [PATCH] Remove all content and replace with a link to the actual wiki. --- 1.-The-Doodle3D-Wifibox/1.1-Introduction.md | 0 .../1.2-Planning-Overview.md | 1 - 1.-The-Doodle3D-Wifibox/1.3-Resources.md | 1 - 2.-Firmware/2.1-Overview.md | 25 -------- 2.-Firmware/2.2-RESTful-API.md | 0 ...1-Outline-For-Self-update-Functionality.md | 16 ----- .../3.2-Notes-On-Packaging-The-Code.md | 17 ------ ...nterfaces-For-Sending-And-Viewing-Gcode.md | 23 -------- .../3.3.2-Various-Firmware-Implementations.md | 25 -------- 4.-Everything-Else/4.1-Miscellaneous-Notes.md | 6 -- .../4.2-Analyzing-Uhttpd-Crashes.md | 29 ---------- Appendices/A1.-Building-OpenWrt.md | 58 ------------------- .../A2.-Preparing-OpenWrt-For-Wifibox.md | 51 ---------------- Home.md | 14 +---- _Sidebar.md | 40 ------------- 15 files changed, 1 insertion(+), 305 deletions(-) delete mode 100644 1.-The-Doodle3D-Wifibox/1.1-Introduction.md delete mode 100644 1.-The-Doodle3D-Wifibox/1.2-Planning-Overview.md delete mode 100644 1.-The-Doodle3D-Wifibox/1.3-Resources.md delete mode 100644 2.-Firmware/2.1-Overview.md delete mode 100644 2.-Firmware/2.2-RESTful-API.md delete mode 100644 3.-Research/3.1-Outline-For-Self-update-Functionality.md delete mode 100644 3.-Research/3.2-Notes-On-Packaging-The-Code.md delete mode 100644 3.-Research/3.3-3D-Printing/3.3.1-Webinterfaces-For-Sending-And-Viewing-Gcode.md delete mode 100644 3.-Research/3.3-3D-Printing/3.3.2-Various-Firmware-Implementations.md delete mode 100644 4.-Everything-Else/4.1-Miscellaneous-Notes.md delete mode 100644 4.-Everything-Else/4.2-Analyzing-Uhttpd-Crashes.md delete mode 100644 Appendices/A1.-Building-OpenWrt.md delete mode 100644 Appendices/A2.-Preparing-OpenWrt-For-Wifibox.md delete mode 100644 _Sidebar.md diff --git a/1.-The-Doodle3D-Wifibox/1.1-Introduction.md b/1.-The-Doodle3D-Wifibox/1.1-Introduction.md deleted file mode 100644 index e69de29..0000000 diff --git a/1.-The-Doodle3D-Wifibox/1.2-Planning-Overview.md b/1.-The-Doodle3D-Wifibox/1.2-Planning-Overview.md deleted file mode 100644 index 978b292..0000000 --- a/1.-The-Doodle3D-Wifibox/1.2-Planning-Overview.md +++ /dev/null @@ -1 +0,0 @@ -(functionality breakdown / milestones) diff --git a/1.-The-Doodle3D-Wifibox/1.3-Resources.md b/1.-The-Doodle3D-Wifibox/1.3-Resources.md deleted file mode 100644 index efb79aa..0000000 --- a/1.-The-Doodle3D-Wifibox/1.3-Resources.md +++ /dev/null @@ -1 +0,0 @@ -(repo, wiki, general resources like openwrt website etc.) diff --git a/2.-Firmware/2.1-Overview.md b/2.-Firmware/2.1-Overview.md deleted file mode 100644 index d53b07e..0000000 --- a/2.-Firmware/2.1-Overview.md +++ /dev/null @@ -1,25 +0,0 @@ -# Outline of the WifiBox project - -*TO ADD*: (openwrt-based, components:luacgi(+uci)+www-iface+init.d) - -Consider this a sketch, including some ideas which might never end up in the final application. - - * Printer driver interface - Perhaps using the idea of printer/protocol/firmware families can reduce code duplication - * _for each printer_: implementation of the interface (leaving room for elaborate code, e.g. an S3G implementation) - * Web interface - * Doodle3D interface - ... (suggestions: drawing+shaping interface, management of previous drawings, sharing with other users, etc.) - * gcode/s3g/... upload interface as well as manual command execution - * Printing interface (track progress etc.) - * Called from Doodle3D interface, direct file upload and manual command execution - * Administration interface (wifi config, printer settings, miscellaneous like for instance usbip) - * Interface to fetch and upload models from/to services like thingiverse - * Automatic wifi setup - * Self-update mechanism - * Anything else...? - - ## Init script logic - When the device boots, the init script tries to find any known network. If one is found, it will connect to it, otherwise it switches to AP mode. -IT might be necessary to create a lockfile to prevent accidental reruns (when could this happen?). In this case a mechanism would also be needed to remove the file on shutdown and detect a stale lockfile (e.g. after unclean reboot). - diff --git a/2.-Firmware/2.2-RESTful-API.md b/2.-Firmware/2.2-RESTful-API.md deleted file mode 100644 index e69de29..0000000 diff --git a/3.-Research/3.1-Outline-For-Self-update-Functionality.md b/3.-Research/3.1-Outline-For-Self-update-Functionality.md deleted file mode 100644 index 698789e..0000000 --- a/3.-Research/3.1-Outline-For-Self-update-Functionality.md +++ /dev/null @@ -1,16 +0,0 @@ -## Update mechanism - -__TODO__: make this document intelligable - -_Idea_: could the ipkg tool play a major part here? just releasing a new ipkg at the feed url then would be enough. just need a way to rollback..but ipkg can probably take care of that too - -- create a rigid versioning system -- server-side script to report available versions (scans directory and reports back versions available in xml/json/plain) -- reported versions translate to archives and checksums (e.g. ?.tar.gz and ?.md5sum) -- all code must be contained within one directory, symlinks to place 'hooks' within the system -- updating should not only install/overwrite new files or symlinks but also remove old ones -- updater keeps at least the last-known-good version to rollback to -- the updater is part of the system; in case it gets broken accidentally there should be a command-line option (e.g. through fail-safe) to restore a previous version (or immediately fetch a new debugged one) -- (!) a fallback webupdater in case of booting trouble might be good to have -- create deploy script (included in release package; should probably work incrementally?) - diff --git a/3.-Research/3.2-Notes-On-Packaging-The-Code.md b/3.-Research/3.2-Notes-On-Packaging-The-Code.md deleted file mode 100644 index debbaca..0000000 --- a/3.-Research/3.2-Notes-On-Packaging-The-Code.md +++ /dev/null @@ -1,17 +0,0 @@ -# Creating an OpenWrt package - -In order to include the wifibox code in an OpenWrt image and have it deployed automatically, it must be available as a package. This could also prove useful with regard to auto-updating the code since ipkg can handle downloading, checksumming and upgrading automatically. - -The basic requirements for this are the presence of a Makefile for the OpenWrt build system to read, a feed to discover the package and a publicly available download source for the package itself. - -## Resources -* [Overview of the build system](http://www.ccs.neu.edu/home/noubir/Courses/CS6710/S12/material/OpenWrt_Dev_Tutorial.pdf) -* [Creating feeds (OpenWrt website)](http://wiki.openwrt.org/doc/devel/feeds) -* [Creating packages (OpenWrt website)](http://wiki.openwrt.org/doc/devel/packages) -* [Plain cross-compilation (OpenWrt website)](http://wiki.openwrt.org/doc/devel/crosscompile) -* http://hype-free.blogspot.nl/2009/04/compiling-software-for-openwrt-and.html - * [Hello world tutorial](http://manoftoday.wordpress.com/2007/10/11/writing-and-compiling-a-simple-program-for-openwrt/) - * http://vivekian2.wordpress.com/2007/03/28/building-your-own-package-for-openwrt/ - * (site does not load) http://hanez.org/openwrt-building-software-packages.html - * https://forum.openwrt.org/viewtopic.php?id=10117 -* [Another example Makefile](https://forum.openwrt.org/viewtopic.php?id=9951) diff --git a/3.-Research/3.3-3D-Printing/3.3.1-Webinterfaces-For-Sending-And-Viewing-Gcode.md b/3.-Research/3.3-3D-Printing/3.3.1-Webinterfaces-For-Sending-And-Viewing-Gcode.md deleted file mode 100644 index 295691b..0000000 --- a/3.-Research/3.3-3D-Printing/3.3.1-Webinterfaces-For-Sending-And-Viewing-Gcode.md +++ /dev/null @@ -1,23 +0,0 @@ -# Web interfaces for viewing/sending Gcode - -## To be reviewed -... - -## Probably not -- R2C2_WebInterface - node.js -- WebRap - python no deps -- pronterweb - python no deps - -## Discarded (too large, unusable interface, unsupported) -node.js -> no mips big endian -python -> only 200 k left on device...almost no room for dependencies - -- BotQueue -- OctoPrint - python many deps (not all supported out of the box by openwrt) -- Printrun -- Repetier-Server -- printerface diff --git a/3.-Research/3.3-3D-Printing/3.3.2-Various-Firmware-Implementations.md b/3.-Research/3.3-3D-Printing/3.3.2-Various-Firmware-Implementations.md deleted file mode 100644 index 29aabcf..0000000 --- a/3.-Research/3.3-3D-Printing/3.3.2-Various-Firmware-Implementations.md +++ /dev/null @@ -1,25 +0,0 @@ -# Firmware variants - -* Sprinter -* Marlin (forked from Sprinter) - g-code and m-code -* Jetty (forked from Marlin?) -* Sailfish / G3firmware - s3g - Uses s3g/x3g which requires substantial recoding of g-code. Several implementations: - - https://github.com/makerbot/ReplicatorG (java) - - https://github.com/makerbot/s3g (python) - - https://github.com/cbiffle/s3g-toolkit (C++, attempts to convert s3g files into s3g command streams) -* Repetier - Supports regular g-code as well as a binary encoded variant which can be translated directly. - - - - --- -http://www.reprap.org/wiki/List_of_Firmware -sprinter <- marlin <- jetty - marlin vs sprinter: https://github.com/ErikZalm/Marlin (extra gcodes) -sailfish (s3g?) -sprinter -repetier - binair+gcode (https://github.com/repetier/Repetier-Firmware/blob/master/Repetier/repetier%20communication%20protocol.txt) diff --git a/4.-Everything-Else/4.1-Miscellaneous-Notes.md b/4.-Everything-Else/4.1-Miscellaneous-Notes.md deleted file mode 100644 index e7602d5..0000000 --- a/4.-Everything-Else/4.1-Miscellaneous-Notes.md +++ /dev/null @@ -1,6 +0,0 @@ -# Miscellaneous notes - -- [source code of iwinfo (old revision)](https://dev.openwrt.org/browser/trunk/package/iwinfo/src/iwinfo_lua.c?rev=29403) -- [Press4Connect](https://github.com/nutbolt/press4connect/tree/master/files/p4config) -- Used [urlcode.lua](from https://github.com/keplerproject/cgilua/blob/master/src/cgilua/urlcode.lua) for decoding URLs - diff --git a/4.-Everything-Else/4.2-Analyzing-Uhttpd-Crashes.md b/4.-Everything-Else/4.2-Analyzing-Uhttpd-Crashes.md deleted file mode 100644 index 03981e9..0000000 --- a/4.-Everything-Else/4.2-Analyzing-Uhttpd-Crashes.md +++ /dev/null @@ -1,29 +0,0 @@ -# Analyzing uhttpd crashes - -__TODO__: describe when this happens (sometimes in portal mode and always when webroot does not exist?). - -- First, enable debug support in the binary by modifying package/network/services/uhttpd/Makefile: add `TARGET_CFLAGS += -ggdb3 -O0` below `TARGET_LDFLAGS`. -- Next, enable building the toolchain (we need a gdb which understands mips images). -- Make sure symbol stripping is disabled (under Global build settings) and check that other settings are correct as well (e.g. core dumps and process debugging enabled). -- After updating with the new firmware, enable core dumps by running `ulimit -c unlimited`. -- Stop uhttpd (`/etc/init.d/uhttpd stop`). -- Run it yourself: `uhttpd -f -p 80 -h /www`. -- Do something to make it crash and voila. -- After copying the file over to the host computer, open it in gdb with this command: ` uhttpd `. - The gdb executable can be found under the `staging_dir/toolchain//bin` directory. - -## Some handy gdb commands -From [here](http://stackoverflow.com/questions/5115613/core-dump-file-analysis). - -- bt (backtrace) -- frame n (select stack frame n) -- info locals (display variables) -- list (display code) -- print v - -Note that remote debugging is also supported: http://wiki.openwrt.org/doc/devel/gdb. - -## Further notes - -- The connected issue: <> -- [posts about uhttpd on openwrt](https://dev.openwrt.org/search?q=uhttpd) diff --git a/Appendices/A1.-Building-OpenWrt.md b/Appendices/A1.-Building-OpenWrt.md deleted file mode 100644 index fd5431e..0000000 --- a/Appendices/A1.-Building-OpenWrt.md +++ /dev/null @@ -1,58 +0,0 @@ -Set up OpenWRT on OSX ---------------------- - -Building was relatively easy in my case (Snow Leopard), but this might differ depending on OS/versions/etc. The guide I followed (roughly) is . I got along fine with only following these steps+notes: - -- Install required macports dependencies...for me, Xcode's gcc worked just fine...so maybe that step can be left out. -- However, the longer list of ports just below must be installed or you will get missing dependencies during 'make prereq'. -- Create a case-sensitive HFS+ sparse image (10GB will do nicely). -- Fetch openwrt through svn and update feeds (aka packages). -- If you'd like all packages available for building in 'make menuconfig', run: 'scripts/feeds install -a'. -- build! (e2fsprogs worked fine for me but I'm not using Lion so...?) - -Further notes: - -- deselect everything but SquashFS under 'Target images' (e.g. jffs2 is not needed) -- under 'Target profile', for the TP-Link box, only select your specific model (scroll way down) -- I think luci must be enabled in menuconfig (under 'Luci'->Collections...) -- when flashing a new image, the sysupgrade one will do fine except the very first time (according to openwrt docs) -- enabling some drivers can only be done by modifying the kernel? (make kernelconfig) -- keep track of packages and features (de)selected in menuconfig (or modify by hand...) -- prefix path with macports path: 'export PATH=/opt/local/bin:$PATH' -- If the make system keeps complaining about outdated svn repo/executable versions, this seems not to be a problem -- wr703n reverse engineered -- To get the new image on a device, follow this guide after getting the image on the device (copy it to /tmp). A warning 'Error fixing up TRX header' seems quite harmless. -- In case you end up with a broken ssh session, don't forget you can quit ssh by typing '~.' (on an empty line so hit enter before to be sure). - - -Various guides / links -====================== -- WR703N openWRT setup: -- WR703N wlan config: -- (osx cross-compile) -- (osx cross-compile) -- (cross compile eigen code) -- (cross compile eigen code) -- (eclipse setup) -- Hardware extension (2 more USB ports) -- Mouse support (not a solution to the USB1 issue) -- (GENERAL) run make using CPU idle time only, found here: http://wiki.openwrt.org/doc/howto/build - $ ionice -c 3 nice -n19 make -j 2 - - -Build environment -================= -A script (possibly buggy) to set appropiate variables for cross-compiling openwrt code for the tp-link wr703n router. It assumes your image is called 'openWRT-build-fs-10GB'. -Source the script to modify current shell environment (using regular execution runs it in a temporary subshell). - - cat<set-openwrt-build-env - #!/bin/sh - - export PATH=/opt/local/bin:$PATH:/Volumes/openWRT-build-fs-10GB/trunk/staging_dir/toolchain- mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin - export STAGING_DIR=/Volumes/openWRT-build-fs-10GB/trunk/staging_dir - export CC=mips-openwrt-linux-uclibc-gcc - export LD=mips-openwrt-linux-uclibc-ld - - #this is used to pass to configure --target - export TGT_MIPS=mips-openwrt-linux-uclibc - EOF diff --git a/Appendices/A2.-Preparing-OpenWrt-For-Wifibox.md b/Appendices/A2.-Preparing-OpenWrt-For-Wifibox.md deleted file mode 100644 index df828f4..0000000 --- a/Appendices/A2.-Preparing-OpenWrt-For-Wifibox.md +++ /dev/null @@ -1,51 +0,0 @@ -# Building OpenWrt for the WifiBox - -__TODO__: add steps to clone openwrt, install required software, create an image (on OSX) and fetch package feeds - -This page describes how to build an OpenWrt image for the WifiBox as well as additional steps to get it up and running. - -_Note_: After changing enabled packages and building, make sure the image has been created (check the timestamp). If not, the contents were probably too large to fit on the device. -Luci and Python (even mini) are notable for causing this. - - -## 1. Adding a custom feed for the wifibox package - -This has only been tested on OSX. The feed source will eventually be replaced with an online one. - -- In the trunk directory, run `cp feeds.conf.default feeds.conf` -- Create a feed directory somewhere (e.g. /Users/me/wrt-wifibox-feed) and clone the WifiBox code into it as a subdirectory called `wifibox` -- Add this line to `feeds.conf`: `src-link wifibox /Users/me/wrt-wifibox-feed` -- Install the feeds' packages by running: `./scripts/feeds update wifibox; ./scripts/feeds install -a -p wifibox` -- While in the menuconfig in the next section, enable the wifibox package (listed under Miscellaneous). - - -## 2. Configuration changes -- set target system ar7xxx/ar9xxx -- set target profile to TP-Link MR3020 or WR703N -- disable all target images except squashfs -- enable 'Build the OpenWrt SDK' (or just toolchain?) in case you want to include your own packages -- enable Base System/wireless-tools (Utilities/iwinfo not needed unless cmdline tool is needed) -- (_ignore_) enable Languages/Lua/lua -- (_ignore_) enable Libraries/libuci-lua -- (_ignore_) Languages/Lua/libiwinfo-lua -- (_ignore this one, it crashes uhttpd_) enable Network/Web Servers&Proxies/uhttpd-mod-lua and follow this: http://wiki.openwrt.org/doc/uci/uhttpd#embedded.lua -- disable Network/ppp and Network/ppp/ppp-mod-pppoe -- (Global build settings) disable kernel symbol table, debug info and sysrq support -- (Global build settings) disable ipv6 - -### 2.1 Extra changes (optional) -- enable LuCI/Collections/luci if you want it -- enable LuCI/Themes/luci-theme-bootstrap if you like -- enable Languages/Python/python-mini if you want Python -- enable uhttpd debug messages (Network/Web Servers\/Proxies) - - -## 3. Further notes on setting up an unconfigured device -- it might be necessary to remove the host key from .ssh/known_hosts to prevent an ssh error -- it might be handy to add a host entry to `.ssh/config` so you don't need to use an account name and can use a hostname instead of IP -- set password to have the device switch from telnet to ssh -- upload `.ssh/id_rsa.pub` to `/etc/dropbear/authorized_keys` for public key authorization -- change the wired IP to something not very common to avoid collisions (e.g. 192.168.5.1/24) -- upload files under <> to the device -- deploy contents of src directory to /usr/share/lua/autowifi (create the directory first with mkdir -p) -- check the <> in the src directory for final setup steps diff --git a/Home.md b/Home.md index 99b6e03..02f9588 100644 --- a/Home.md +++ b/Home.md @@ -1,13 +1 @@ -# The Doodle3D WifiBox Wiki - -This contains notes previously kept in several local files. Keeping notes here is more maintainable and integrates nicely with the issue tracker as well as the repository. - -## Milestones - -A number of milestones have been created in the issue tracker. Bitbucket sorts them alphanumerically (kind of) so internal milestones are prefixed with '0_', release versions with higher numbers and anything else without any prefix. 'IP' stands for 'Internal Progress'. - -- (0_IP_1) First development milestone, implementation of basic supporting functionality. -- (0_IP_2) Second development milestone, same as 0_IP_1 but in a larger scope. -- (0_IP_n) Nth development milestone, at some point one has to be defined at which all core functionality is present and working reasonably well. -- (1.0) First release version. -- (Later) Indeterminate, but nonetheless worthwhile implementing at some point. +The Doodle3D WiFiBox wiki can be found here: . diff --git a/_Sidebar.md b/_Sidebar.md deleted file mode 100644 index ba6c1b7..0000000 --- a/_Sidebar.md +++ /dev/null @@ -1,40 +0,0 @@ -## Table of contents - -1. The Doodle3D Wifibox -1.1 Introduction -1.2 Planning overview -1.3 Resources - -2. Firmware -[2.1 Overview](2.-Firmware/2.1-Overview.md) -2.2 RESTful API - -3. Research -3.1 Outline for self-update functionality -3.2 Notes on packaging the code -3.3 3D printing related -3.3.1 Webinterfaces for sending/viewing gcode -3.3.2 Various firmware implementations - -4. Everything else -4.1 Miscellaneous notes -4.2 Analyzing uhttpd crashes - -A1 Building OpenWrt -A2 Preparing OpenWrt for Wifibox - - -## ---old--- - -[Building OpenWrt](wiki/BuildOpenwrt) -[Analyzing uhttpd crashes](wiki/UhttpdCrash) -[Outline for self-update functionality](wiki/SelfUpdater) -[Miscellaneous notes](wiki/MiscNotes) -[An outline of the project structure](wiki/ProjectOutline) -[Webinterfaces for sending/viewing gcode](wiki/GcodeSenders) -[Various firmware implementations](wiki/Firmwares) -[Notes on packaging the code](wiki/Packaging) - - - -## ---aanpassen---