GCodePrintr

12. Februar 2014

GCodePrintr V1.52 has been released
3D Printing from any Android device - PC less printing
*Connect to a printer using USB OTG/Host port
*Supports wireless printing over Bluetooth
*Touch screen printer control interface (X,Y,Z Movement, Heat, Fan,..)
*Layer by layer visualization and print simulation
*Show details like estimated time, speeds, filament usage, cost,..
*Printing is done in background (Android service)
*Small web interface to remotely view print status.
*Receive print object from PC over network
*Works with many 3D printers and multiple firmwares (Sprinter,Marlin,..)
Homepage: http://gcodeprintr.dietzm.de
Google Play: GCodePrintr App
GCodePrintr was previously known as #GCodeSimulator &Printer and has been renamed recently
GCodePrintr

GCode Simulator & Printer Android App allows 3D printing from Android devices.

13. November 2013

If you are interested in 3D printing and you own a Reprap, PrintrBot, Ultimaker or similar 3D printer, then you might like printing from your favorite Android device instead of using a PC to control the printer. While controlling the printer from PC works fine, it is annoying to keep the PC running during a print (and to span a USB cable across the room).
SD Card printing is an option but buying a SD Card slot + LCD screen for the printer seems to be quite expensive (100$ for a tiny screen and still just shows plain text).
On the other hand, Android devices are getting cheaper and cheaper, are powerful enough and have a larger screen to visualize the printed model.

Over the last couple of month I brought the idea to life and developed an Android App to control 3D printers and visualize the 3D print on the screen.

The first thing to do was to implement a gcode parser and gcode visualization to make use of the Android device screen. It turned out that once you have parsed the gcodes and calculated the coordinates, move distance, extrusion rate,… it is very easy to visualize the print on the screen.
Instead of just painting the full model at once, I found it helpful to paint layer by layer in real time to show how the print will progress. Painting a side view and a front view of the model was added as well. Also, based on the parsed gcode results, the App can calculate some very interesting informations like amount of filament needed, estimated cost, weight, print duration and more.
In fact, the App is able to simulate how your print will look like. Allowing you to check how your print should turn out, making it easier to spot errors and fix them instead of wasting filament. Since Android applications are written in Java, the same code can largely be used for a PC version as well and is available for download.
Gcode Simulator & Printer
Next problem to solve was: how to connect the Android device to the printer ?
Since most printers use a serial communication over USB, the Android device must support the USB Host feature (USB OTG)
Once the printer is connected to the Android device using a USB OTG cable, Android will detect the USB device and start the App. To establish the connection one must choose the right baud rate in the options and then press the connect button. This will start the serial communication to the printer and wait for the printer response.
When the printer has responded successfully, then the printer control panel can be used to issue manual commands like X/Y/Z movements, home axis, control temperatures,.. with your touch screen .
Unfortunately on some devices the Android USB communication stack isn’t very fast, which limits the printing speed on these devices or might cause stuttering. But most Android devices seem to be able to achieve an average IO latency of 5-10ms which is enough for printing at high speed.
Alternatively Bluetooth support has been added recently, together with a serial bluetooth module (e.g. JY-MCU) it can print wireless.
Print Control Panel
Both together, the gcode visualization and the printer control, nearly makes it a full-fledged replacement for the PC host software. Its main strength are: good mobility, low cost, low power consumption and reuse of old discarded Android devices.
The slicer step still needs to be done on a PC using Skeinforge, Sli3r or other tools. There are many ways to copy the gcode to the Android App, either by using 3rd Party apps like Dropbox, CIFS client, file explorer or by using the build in network receiver which listens for incoming gcode files. Sending gcode files to the app can simply be added as a slicer post processing script to automate the send once the slicer is finished.

Many of the features known from the PC host software has been added recently, for example a regular temperature watch, sending a custom gcode to the printer or flipping the X/Y axis movement. But there is one feature which is unique to touchscreen devices, which is controlling the printer by drawing on the touchscreen. Right now this is still experimental and does only move in X/Y direction, but with some more effort it can be enhanced to print objects live, painted with your fingers.

The App is offered in two versions, the free version includes the print simulator as well as basic printer control (XYZ Movement, Extruder, Heat,..).
The full version offers full printing in addition to the features of the free version.
Over the last couple of month many updates have been published to improve the app, fix bugs and add new features.
Until now, more than 800 people have installed the free version and the full version is used by more than 60 users.

Find more information about Gcode Simulator & Printer on the homepage.
GCode Simulator & Printer Homepage
A Google+ community is available to get news about the App or discuss problems.

Where does all this traffic come from ? (Or how to use a Rasberry Pi find that out)

2. Juni 2013

Now with LTE I have a data traffic limit of 30GB per month. First I thought that this is plenty of traffic because with my old DSL I used around 20GB only. But guess what, when having faster download speed all systems seem to generate more traffic than before.

One day I noticed 600MB traffic over night and I didn’t know what was causing it*.
Since the Telekom Router does not provide any usefull information about the traffic I decided to use a Raspberry Pi to monitor the network traffic.

Ingridients
Raspberry PI
4GB SD-Card
800mA USB Power supply
USB 100Mbit Network Adapter
Linux + Bridge Control + tcpdump

I configured the Raspberry Pi as a Ethernet Bridge device (using brctl) and attached it between my Ethernet Switch and the Telekom Router. The WLAN traffic of the Telekom Router will not flow through the bridge, but I don’t use the Telekom Router for WLAN anyway.

imag0190

*btw. the 600MB traffic where caused by a Linux system doing background updates (packagekit)

DSL vs LTE

27. April 2013

My LTE account has been activated yesterday, without any problems. The signal is quite good (4-5/5 bars) and the bandwidth is much better than with DSL.
DSL 1,5MBit Down 224k Up (measured values)
LTE 39Mbit Down 4Mbit Up (measured values)

Much better !!

But I had some concerns about the latency of LTE. Will it be worse ? Will it impact loading of web pages with many small files ?
The answer is NO !! The latency is even better than with my DSL before.
See the following chart where I compared the ping round-trip times:
dsllte

Telekom LTE

24. April 2013

Last week I decided to switch from DSL 1.5Mbit to LTE. I did some tests with my mobile phone and the signal was fine. Although only LTE 800Mhz is available here, it can achieve up to 50 Mbits.
Compared to 1.5 Mbit this is pretty good :-)
Yesterday I have received the Telekom Speedport II Router. Unfortunately AVMs Fritzbox seems not to be supported for this Telekom contract (according to some forum comments).
When I started the router and configured the PIN it failed with a strange error code 0×6000028 .
The reason was that my LTE in note activated yet, this will be done in two days.
Lets wait and see how good LTE works.

GCodeSimulator & GCodeInfo

23. April 2013

GCodeSimulator & GCodeInfo

Last year I bought a RepRap 3D Printer Kit and since then I spend many hours on printing stuff, calibrating the printer and developing tools around it.
The tools make the life of 3D Printer’s easier and I just created a web site to make them public to the community.

Find out more about GCodeSimulator & GCodeInfo.

Images with GPS tags - Nautilus integration 2/2

4. November 2010

The following two scripts are helpful for integrating the gpsPlacename.sh into nautilus:

nautilus-gps-link.sh will show the GPS position of the selected image in Google Maps.
If multiple images are selected, the first 10 GPS positions will be displayed in a static Google Map (did not find out how to display multiple markers in a dynamic map)
Zenity is used for displaying a progress bar, so please make sure to have zenity installed as well.
WARNING: wordpress adds additional single quotes (””””””””) to each single quote when saving this article, please replace duplicate ”” with a single instance
#!/bin/bash
if [ $# == 1 ] ; then
gpsPlaceName.sh -vv “$@” | tee /tmp/gpsPlaOutxxx.txt | zenity –progress –pulsate –auto-close ; cat /tmp/gpsPlaOutxxx.txt | grep dynamicmap | cut -d ””””””””””””””””””””””””””””””””>”””””””””””””””””””””””””””””””” -f 2- | xargs -n 1 -x -d ””””””””””””””””””””””””””””””””n”””””””””””””””””””””””””””””””” firefox
else
gpsPlaceName.sh -vv “$@” | tee /tmp/gpsPlaOutxxx.txt | zenity –progress –pulsate –auto-close ; cat /tmp/gpsPlaOutxxx.txt | grep staticmap | cut -d ””””””””””””””””””””””””””””””””>”””””””””””””””””””””””””””””””” -f 2- | xargs -n 1 -d ””””””””””””””””””””””””””””””””n”””””””””””””””””””””””””””””””” firefox
fi

nautilus-gps-place.sh will show the nearest place to the GPS positions of the selected image in a dialog using zenity.
#!/bin/bash
gpsPlaceName.sh -v "$@" | tee /tmp/gpsPlaOutxxx.txt | zenity --progress --pulsate --auto-close ; zenity --text-info --filename=/tmp/gpsPlaOutxxx.txt --width 800 --height 800 ; rm /tmp/gpsPlaOutxxx.txt

Example Dialog:
gps

To integrate this into Nautilus you should install nautilus-actions, then run nautilus-action-config-tool to add new entries:
nautilusaction

Images with GPS tags - Nautilus integration 1/2

4. November 2010

I just bought a new Sony Camera with build-in GPS. Unfortunately all the packaged software is for Windows only.
So I was looking for a good Linux program to quickly show the GPS data of a picture and to show the GPS position in Google maps.
Digikam has a good GPS support (integration of marble) and its good to manage many images.
You can even choose multiple images and show them on the map, or select a region on the map to search for pictures.

screenshot-digikam

But if you just want to show the GPS postition of a single image quickly, digikam is to heavyweight.
Many small tools can show the exif metadata of a picture, but the plain GPS coordinates are not very helpful to find out where a picture has been taken.

For this reason I have created a set of small scripts which do the following
1) Extract the GPS coordinates and get the name of the nearest place/city/village (thanks to geonames.org)
2) Open the GPS coordinates in Google Maps
3) Show the GPS coordinates of up to 10 pictures in a Google static map

The main script (gpsPlacenames.sh) provides the core functions and can be used on the shell.
The two helper scripts (nautilus-gps-link.sh, nautilus-gps-place.sh) are used for integrating it into nautilus and providing X window dialogs using zentity.

gpsPlacenames.sh
WARNING: wordpress adds additional single quotes (”) to each single quote when saving this article, please replace duplicate ”””” with a single instance
#!/bin/sh
#
# Script for extracting GPS tags from jpeg images and showing the names of the nearest place/city.
# Added some funtions to print out Google maps URLs
# author blog@dietzm.de
#
verbose=0
if [ "$1" == "-v" ];then
echo verbose enabled
verbose=1
shift
fi
if [ "$1" == "-vv" ];then
echo verbose with google maps link enabled
verbose=2
shift
fi
if [ -z "$1" ] ; then
echo Wrong usage !
echo This script extracts the GPS coordinates from exif tags of a jpeg image and shows the name of the nearest place/city/village
echo Usage: $0 [-v verbose | -vv verbose with google maps link] file….
echo —-
exit 1
fi
staticurl=”http://maps.google.com/maps/api/staticmap?size=640×640&sensor=false&maptype=hybrid”
dynurl=”http://maps.google.de/maps”
cache=/tmp/gpscache/
mkdir $cache &>/dev/null
nr=0
IFS=$””n””
echo # Reading file metadata …..
allcoord=`exiftool -q -fast -c %.6f -p ””lat=$gps:GPSLatitude&lng=$gps:GPSLongitude $gps:GPSLatitudeRef $gps:GPSLongitudeRef $directory/$filename”” “$@” 2>&1`
echo # Looking up place names (thanks to http://ws.geonames.org/)
echo ————————
for coord in $allcoord ;
do
#echo “# $coord”
# coord=`exiftool -c %.6f -p ””lat=$gps:GPSLatitude&lng=$gps:GPSLongitude $gps:GPSLatitudeRef $gps:GPSLongitudeRef”” “$i” 2>/dev/null`
hasgpsdata=`echo $coord | grep -v “Warning”`
if [ -z "$hasgpsdata" ]; then
# #zenity –error –text “exiftool command failed: $i ($?)”
fname=`echo $coord | cut -d ”” ”” -f 8-`
echo # “$fname -> NO GPS DATA”
continue
fi
i=`echo $coord | cut -d ”” ”” -f 4- | sed s#^./##g`
# echo $coord
ref=`echo $coord | cut -d ”” ”” -f 2`
if [ "$ref" != "North" ];then
coord=`echo $coord | sed s/lat=/lat=-/g`
fi
ref=`echo $coord | cut -d ”” ”” -f 3`
if [ "$ref" != "East" ];then
coord=`echo $coord | sed s/lng=/lng=-/g`
fi
coord=`echo $coord | cut -d ”” ”” -f 1`
cfile=`echo $cache$coord | sed s/&//g`
if [ -f $cfile ];then
used_cache=”C”
else
used_cache=”"
# echo wget http://ws.geonames.org/findNearbyPlaceName –post-data “$coord” –output-document=gpsname.txt
wget http://ws.geonames.org/findNearbyPlaceName –post-data “$coord” –output-document=”$cfile” &> /dev/null
fi
#Print out data
if [ "$verbose" != "0" ];then
cat $cfile | cut -d ””>”” -f 2 | cut -d ””<'''' -f 1 | xargs echo # "$i $used_cache-> ”
if [ "$verbose" == "2" ];then
mapscoord=`echo $coord | sed s/&lng=/,/g | sed s/lat=//g`
echo ” Google Maps link (dynamicmap) -> $dynurl?q=$mapscoord%28$i%29″
if [ $nr -lt 10 ];then
#limit number of marker points to 10
staticurl=$staticurl”&markers=color%3Ablue%7Clabel%3A$nr%7C$mapscoord”
let nr=$nr+1
fi
fi
else
cat $cfile |grep toponymName | cut -d ””>”” -f 2 | cut -d ””<'''' -f 1 | xargs echo # "$i ->”
fi
done
if [ "$verbose" == "2" -a "$nr" -ne "0" ];then
echo ————————
echo Static Google Maps URL with the first 10 images as markers:
echo “Link -> $staticurl”
fi
echo # Done

For the command line version (gpsPlacenames.sh) you just need exiftool (and standard tools like wget,grep,cut,..)
gpsPlacenames.sh, here we go:
#> gpsPlacenames.sh DSC018*
# Reading file metadata .....
# Looking up place names (thanks to http://ws.geonames.org/)
------------------------
# DSC01839.JPG -> NO GPS DATA
# DSC01840.JPG -> NO GPS DATA
# DSC01813.JPG -> Zeppelinheim
# DSC01814.JPG -> Zeppelinheim
# DSC01815.JPG -> Zeppelinheim
# DSC01825.JPG -> Pozo Negro
# DSC01831.JPG -> Pozo Negro
# DSC01835.JPG -> Pozo Negro
# DSC01836.JPG -> Pozo Negro
# DSC01843.JPG -> Costa Calma

gpsPlacenames.sh -v verbose will display additional information
#> gpsPlacenames.sh -v DSC018*
verbose enabled
# Reading file metadata .....
# Looking up place names (thanks to http://ws.geonames.org/)
------------------------
# DSC01838.JPG -> NO GPS DATA
# DSC01839.JPG -> NO GPS DATA
# DSC01840.JPG -> NO GPS DATA
# DSC01813.JPG C-> Zeppelinheim Zeppelinheim 50.03333 8.61667 2804754 DE Germany P PPL 2.53043
# DSC01814.JPG C-> Zeppelinheim Zeppelinheim 50.03333 8.61667 2804754 DE Germany P PPL 2.53043
# DSC01815.JPG C-> Zeppelinheim Zeppelinheim 50.03333 8.61667 2804754 DE Germany P PPL 2.53043
# DSC01825.JPG C-> Pozo Negro Pozo Negro 28.31667 -13.88333 2512315 ES Spain P PPL 6.06183
# DSC01831.JPG C-> Pozo Negro Pozo Negro 28.31667 -13.88333 2512315 ES Spain P PPL 6.06183
# DSC01833.JPG C-> Pozo Negro Pozo Negro 28.31667 -13.88333 2512315 ES Spain P PPL 6.06183
# DSC01841.JPG C-> Costa Calma Costa Calma 28.16155 -14.22691 6544327 ES Spain P PPL 0.20955

gpsPlacenames.sh -vv verbose with Google maps support will display additional information and links Google maps.
It will print out a link to the dynamic Google maps version for each image and a combined link with the first 10 images to a static google map at the end.
#> gpsPlacenames.sh -vv DSC018*
verbose with google maps link enabled
# Reading file metadata .....
# Looking up place names (thanks to http://ws.geonames.org/)
------------------------
# DSC01807.JPG -> NO GPS DATA
# DSC01840.JPG -> NO GPS DATA
# DSC01813.JPG C-> Zeppelinheim Zeppelinheim 50.03333 8.61667 2804754 DE Germany P PPL 2.53043
Google Maps link (dynamicmap) -> http://maps.google.de/maps?q=50.049895,8.592363%28DSC01813.JPG%29
# DSC01814.JPG C-> Zeppelinheim Zeppelinheim 50.03333 8.61667 2804754 DE Germany P PPL 2.53043
Google Maps link (dynamicmap) -> http://maps.google.de/maps?q=50.049895,8.592363%28DSC01814.JPG%29
# DSC01825.JPG C-> Pozo Negro Pozo Negro 28.31667 -13.88333 2512315 ES Spain P PPL 6.06183
Google Maps link (dynamicmap) -> http://maps.google.de/maps?q=28.322073,-13.944958%28DSC01825.JPG%29
# DSC01826.JPG C-> Pozo Negro Pozo Negro 28.31667 -13.88333 2512315 ES Spain P PPL 6.06183
------------------------
Static Google Maps URL with the first 10 images as markers:
Link -> http://maps.google.com/maps/api/staticmap?size=640x640&sensor=false&maptype=hybrid&markers=color%3Ablue%7Clabel%3A0%7C50.049895,8.592363&markers=color%3Ablue%7Clabel%3A1%7C50.049895,8.592363&markers=color%3Ablue%7Clabel%3A2%7C50.049895,8.592363&markers=color%3Ablue%7Clabel%3A3%7C50.049895,8.592363&markers=color%3Ablue%7Clabel%3A4%7C50.049895,8.592363&markers=color%3Ablue%7Clabel%3A5%7C28.322073,-13.944958&markers=color%3Ablue%7Clabel%3A6%7C28.322073,-13.944958&markers=color%3Ablue%7Clabel%3A7%7C28.322073,-13.944958&markers=color%3Ablue%7Clabel%3A8%7C28.322073,-13.944958&markers=color%3Ablue%7Clabel%3A9%7C28.322073,-13.944958
# Done

Now, you can easily get the GPS place names for all you images on the command line and use the printed links to jump directly to the GPS coordinates in google maps .
Cool huuh ?

Nokia 5800 - Wer kennt wen - Widget

7. Dezember 2009

Ich habe heute ein Wer kennt wen Widget für mein Nokia 5800 MusikXpress gebaut.
wkw

Es ruft einfach die mobile Version der WKW Webseite auf (http://mobil.wer-kennt-wen.de/)

Download: Wer-kennt-wen Widget (wkw.wgz)

Migrated my nanoblogger based weblog to WordPress

11. Februar 2007

I’ve migrated my nanoblogger based weblog to the Strato Weblog Basic which is based on WordPress

The migration was very error prone, because Wordpress adds a “br” after each line. Also Strato does not
allow to use a custom theme and the build-in theme has only a width of 800px.

So, the most blog entries are readable but not very nice. The Nanoblogger page was ways nicer.
Here a short summary:
Strato Weblog Basic (WordPress) Advantages / Disadvantages
++allows users to comment a blog entry
+easy management via web sites
+easy upload of files
–The default theme is limited to 800px width
–Strato doesn’t allow a custom theme
-The management via web sites is slow