Galaxy S4 3D printed car holder

S4 holder closeup
S4 holder with phone
S4 holder in car

The cradle for S4 is based on an old S2 car holder:

S2 holder part 2

All designed using FreeCAD and Blender 3D.

S4 holder.blend

The model _will_ require some cutting after printing otherwise it won’t fit the phone. Additional cutting might be required if battery cover has been replaced.


OpenSCAD – first battle

My first attempts to use OpenSCAD:

module hc_hexagon(size, height) {
box_width = size/1.75;
for (r = [-60, 0, 60]) rotate([0,0,r]) cube([box_width, size, height],
module hc_column(length, height, cell_size, wall_thickness) {
no_of_cells = floor(1 + length / (cell_size + wall_thickness)) ;
for (i = [0 : no_of_cells]) {
translate([0,(i * (cell_size + wall_thickness)),0])
hc_hexagon(cell_size, height + 1);
module honeycomb (length, width, height, cell_size, wall_thickness) {
no_of_rows = floor(1.75 * length / (cell_size + wall_thickness)) ;
tr_mod = cell_size + wall_thickness;
tr_x = sqrt(3)/2 * tr_mod;
tr_y = tr_mod / 2;
off_x = -1 * wall_thickness / 2;
off_y = wall_thickness / 2;
cube([length, width, height]);
for (i = [0 : no_of_rows]) {
translate([i * tr_x + off_x, (i % 2) * tr_y + off_y, (height) / 2])
hc_column(width, height, cell_size, wall_thickness);
//honeycomb(length, width, height, cell_size, wall_thickness);
honeycomb(140, 80, 20, 5, 1);

ormatting doesn’t look very good in narrow blog, it looks better here: honeycomb.scad

Honeycomb - blender render

P.S. Thanks to help from OpenSCAD forum I have a new, improved & much faster honeycomb script:

module hc_column(length, cell_size, wall_thickness) {
        no_of_cells = floor(length / (cell_size + wall_thickness)) ;

        for (i = [0 : no_of_cells]) {
                translate([0,(i * (cell_size + wall_thickness)),0])
                         circle($fn = 6, r = cell_size * (sqrt(3)/3));

module honeycomb (length, width, height, cell_size, wall_thickness) {
        no_of_rows = floor(1.2 * length / (cell_size + wall_thickness)) ;

        tr_mod = cell_size + wall_thickness;
        tr_x = sqrt(3)/2 * tr_mod;
        tr_y = tr_mod / 2;
        off_x = -1 * wall_thickness / 2;
        off_y = wall_thickness / 2;
        linear_extrude(height = height, center = true, convexity = 10, twist = 0, slices = 1)
                        square([length, width]);
                        for (i = [0 : no_of_rows]) {
                                translate([i * tr_x + off_x, (i % 2) * tr_y + off_y,0])
                                        hc_column(width, cell_size, wall_thickness);

//honeycomb(length, width, height, cell_size, wall_thickness);
honeycomb(140, 80, 20, 5, 1);


Compiling FreeCAD on Fedora 18 – a guide to the bumpy road.

sudo yum install cmake doxygen swig gcc-gfortran gettext dos2unix desktop-file-utils libXmu-devel freeimage-devel mesa-libGLU-devel OCE-devel python python-devel boost-devel tbb-devel eigen3-devel qt-devel qt-webkit-devel ode-devel xerces-c xerces-c-devel opencv-devel smesh-devel Coin2-devel SoQt-devel freetype freetype-devel

./configure --with-qt4-lib=/usr/lib64/qt4 with-qt4-include=/usr/include/QtCore/ --with-qt4-bin=/usr/lib64/qt4/bin/make


Gnome and Intuos4 OLEDs

Another day, another patch. Gnome will be getting wacom intuos4 OLEDs support. It’s going to look like this:

More details here: Light up the OLEDs

Hopefully those patches will land in gnome 3.10. Things that are waiting to be implemented:

  • bluetooth support for status led and OLEDs (kernel side ready, user side non existing)
  • multi keystroke sequences
  • editable labels i.e. mapping to Ctrl-S, but OLED label showing “Save”
  • icons instead of labels

Update: Basic handling of wacom OLEDs has been included in gnome-settings-daemon and gnome-control-center


Rooting Sanei N10 Deluxe on linux command line

The Sanei N10 Deluxe tablet is _potentially_ a good tablet. Unfortunately the original firmware is absolutely useless. To get rid of it the device has to be rooted and re-flashed with something more SANE(I) 😉


1. the device itself – Sanei N10 Deluxe

2. usb cable

3. linux box with installed Android SDK

4. internet connection – for downloading AndroidRoot

The procedure below is based on bat file from AndroidRoot:

1. Download and unzip AndroidRoot

It contains some windows executables, a .bat file and 2 files that are important for linux users: “su” and “superuser.apk”

Copy those 2 files to your home directory (or any other, I assume they are in the home dir)

3. Switch on “USB Debugging” on the tablet. It’s in Settings -> Developer Options

4. Connect the device and make sure it’s detected by the system:

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 002: ID 8087:07da Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 010: ID 18d1:0003 Google Inc.

The last line show that the tablet is connected.

5. Make sure you have rights to access the device (adb command is part of Android SDK):

przemo@localhost:$~/android-sdk-linux/platform-tools/adb devices
List of devices attached
20080411    device

If there is no device check here

6. Go to Android SDK directory -> platform-tools. On my linux box it’s:

cd ~/android-sdk-linux/platform-tools/

7. Now time to start rooting

./adb shell mv /data/local/tmp /data/local/tmp.bak
./adb shell ln -s /data /data/local/tmp
./adb reboot

8. Wait for the tablet to complete reboot and type:

./adb shell rm /data/local.prop > nul
./adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
./adb reboot

9. Again, wait for the tablet to complete reboot and confirm that we have root access:

./adb shell id

The result should be:

uid=0(root) gid=0(root)

10. Now we can install “su” (make sure correct location of “su” is used – that’s the file from AndroidRoot):

./adb remount
./adb push ~/su /system/xbin/su
./adb shell chown 0.0 /system/xbin/su
./adb shell chmod 06755 /system/xbin/su

11. Revert the changes that gave us root access:

./adb shell rm /data/local.prop
./adb shell rm /data/local/tmp
./adb shell mv /data/local/tmp.bak /data/local/tmp

12. Install superuser.apk (same comment about location of apk file as for point 10)

./adb push ~/superuser.apk /system/app/superuser.apk

13. Reboot and enjoy rooted tablet:

./adb reboot

That’s it – now the Sanei N10 Deluxe is ROOTED.


3 steps to have live tracking in JOSM

What you have to have: – JOSM + LiveGPS pluginandroid SDKTetherGPS on you android phone.

1: Start TetherGPS and connect the phone using USB cable (turn on “Debugging” – it’s in settings) 2: Type: adb tcp:2947 tcp:2947 – this forwards port 2947 from your phone to your computer. “adb” is part of Android SDK 3: Open JOSM (with LiveGPS pugin) and Click in the main menu LiveGPS->Autocenter

That’s all. As soon as you mobile phone gets GPS fix JOSM will start updating your location on the map! You can save the track and help improving OpenStreetMap

That’s how it looks:


OLED icons on Intuos4 tablets [v0.1]

I made a simple helper for setting OLED icons on Intuos4 tablets. It can be cloned from here:

git clone git://

The helper accepts PNG images (64 x 32, 8-bit/color RGBA, non-interlaced) and it uses only red channel from the PNG file. There are some example icons in icons/ directory. The kernel patch mentioned in ‘usage’ option is not yet ready for release, but ‘-s’ (scramble) option should allow to use i4oled with any kernel with wacom OLED support.

Please test and report back – I have only Intuos4 Wireless tablet, so i4oled hasn’t been tested on any other model.

I’m waiting for reports if it works with the whole Intuos4 family – I’m going to implement an option for setting OLED icons as part of the button mapping in the wacom panel in gnome system settings.

UPDATE [11 Sep 2012]: now the helper renders text using pango/cairo. It’s still rough on edges, so be careful! That’s how it looks on Intuos4 Wireless:

OLED text rendered by pango on Intuos4

UPDATE [4 Oct 2012] v1.0 is out, scrambling is now default


OLEDs on Intuos4 Wireless are 4-bit!!

I found out that OLEDs on my Intuos4 Wireless are actually 4-bit colour instead of 1-bit. I don’t know (yet) a method of setting 4-bit icons over bluetooth, but I have a proof that it can be done over USB. The proof:

Intuos4 Wireless 4-bit OLEDs

It’s close up of one of the OLED displays on Intuos4 Wireless connected with USB cable.


OLED icons on Wacom Intuos4 Wireless PTK-540WL – part 2

Full workflow how to get a custom icon on Wacom Intuos4 WL (this doesn’t work for other Intuos4 family members!)

Make a 1-bit 64×32 pixels image. Let’s say it’s the recycling symbol:

Save it to PBM format, raw version. GIMP is perfect for that. Open the newly created file in a text editor. The header should look similar to this:

# CREATOR: GIMP PNM Filter Version 1.1
64 32

It means that we created “portable bitmap/binary” using GIMP and the dimensions are 64 by 32 pixels. The rest of the file contains actual image, saved in 256 bytes, 8 pixels per byte. PBM icons here (full pack).

Now strip the header and save the “raw” icon. The file should hve exactly 256 bytes. If it has more or less it might mean that your text editor cannot handle binary files (try vim!) And again you can download “raw” icons – link above (same as PBM icons). Save the file to “recycle.i4wl” or download ready “recycle” icon from the pack.

Now connect the tablet using bluetooth connection. You should see some oled_*img files in /sys/class/hidraw/hidraw(dev_number)/device directory. Each of those 8 files represents one icon on wacom Intuos4 wireless tablet. See this entry for information how to set the icon on your tablet using “dd” command. Hopefully setting the icons will be included into wacom gnome-control-center panel (any volunteers? 😉 )

Come back later to see how to batch create icons!


How to use an android phone as a GPS receiver with GPS-less tablet using only GPL software….

.. or how to use GPS-less tablet as big screen GPS car navigation. The setup that I tested:

– tablet Sanei N10 Deluxe with Android 4.0.3

– Samsung Galaxy S2 with CyanogenMod9

The tablet has no GPS receiver, so my favourite navigation/tracking OSMAnd cannot be used directly. To solve that problem I downloaded BlueGPS for the tablet and BlueNMEA for the phone. BlueNMEA works as GPS data server, the location is transmitter over bluetooth to BlueGPS on the tablet. BlueGPS uses “mock location” function to provire real GPS location for all the software runnng on the tablet.

How to set it up?

1. Allow use “mock locations” in

Settings -> Developer Options -> Allow mock locations on the tablet.

2. Pair tablet and phone using normal bluetooth functions in

Settings -> Bluetooth

3. Start BlueGPS on tablet

4. Start BlueNMEA on the phone

5. Wait for the tablet to appear on devices list

6. As soon as the phone GPS get fix the info is passed to the tablet, so it can be used by i.e. OSMAnd or any other navigation software.