Thursday, April 17 2014

i4oled-gui is ready!

Now there is a way of setting OLED icons on Wacom Intuos4 tablets using simple GUI:

The source code can be downloaded from GitHub.

It requires gnome & dconf, but it doesn't require root access rights as it works by writing to dconf. I hope that some of the ideas tested in i4oled-gui will be used in gnome.

Installing on Fedora 20:

1. Install required packages: sudo yum install git autoconf automake gcc gtk3-devel dconf-devel

2. Clone the repository

git clone https://github.com/PrzemoF/i4oled-gui.git

3. Enter & build

cd i4oled-gui

./autogen.sh

./configure

make

sudo make install

If there is a message about missing gtk+-3.0 during configure stage it means that there is no gtk3-devel package. Same for dconf - it means that there is no dconf-devel package. Ubuntu uses different names: gtk3-dev and dconf-dev.

i4oled-gui looks for icons in 3 locations:

/usr/local/share/i4oled-gui/pixmaps/

/usr/share/i4oled-gui/pixmaps/

~/.icons/wacom/

The first two are shown when "System" button is pressed, The last path is linked with "User" button.

Icons have to be PNG files, 64 x 32, 8-bit/color RGBA, non-interlaced There is a script in data/pixmaps/svg/svg2png.sh that converts SVG to the desired format. Also all icons generated by i4oled can be used. Text entry fields also accepts base64 strings generated by i4oled, but it's not yet a fully finished feature (stop & start of i4oled-gui is required to see the icon)

Known limitations: i4oled-gui works on first usb tablet found in dconf user file, so if you have more than one tablet .. tough luck (at least untill i4oled-gui lands in gnome). There is no bluetooth support yet. Also there is no live preview of rendered text in the icon field.

If you read this entry this far (well done!!) it means that you're interested in using i4oled-gui, so if you want to send me a feedback use GitHub or przemo (at) firszt (dot) eu

Thursday, February 27 2014

Using Wacom Intuos4 Wireless in unusual way

How to make clock out of your wacom tablet (with OLEDs obviously)?

IMG_20140226_215357.jpg

There is one thing required - it's i4oled

The "clock" can be set up over usb or bluetooth link. The example below uses bluetooth

1. Connect tablet. 2. Change permissions for OLEDs as we want to use i4oled without root access.

sudo chmod a+w /sys/bus/hid/drivers/wacom/0005\:056A\:00BD.0001/oled?_img

3. Change permissions for LED selector - it's brightness is linked to OLEDs

sudo chmod a+w /sys/bus/hid/drivers/wacom/0005\:056A\:00BD.0001/leds/0005\:056A\:00BD.0001\:selector\:0/brightness

4. Change the brightness

echo 200 > /sys/bus/hid/drivers/wacom/0005\:056A\:00BD.0001/leds/0005\:056A\:00BD.0001\:selector\:0/brightness

Now we're ready to test i4oled:

i4oled -b -t TEST -d /sys/bus/hid/drivers/wacom/0005\:056A\:00BD.0001/oled7_img

If text TEST shows up next to the bottom button it means that everything works fine and we can set up the clock:

while [ 1 ]; do i4oled -d /sys/bus/hid/drivers/wacom/0005\:056A\:00BD.0001/oled7_img -b -t $(date +%D+%T); sleep 1; done

The above command converts current date & time into image and sends it to the OLED screen:

Tuesday, June 25 2013

i4oled - bluetooth support

i4oled just got bluetooth support. Wacom Intuos4 WL supports 4-bit images over USB connection, but only 1-bit when connected over bluetooth. i4oled now supports both with --bluetooth switch. Example usage:

i4oled -d /sys/class/hidraw/hidraw0/device/oled5_img -t "Alt+Ctrl" --bluetooth
   
i4oled -d /sys/class/hidraw/hidraw0/device/oled7_img -i help.png -b

And that's how it looks on the device:

Wacom OLEDs ovet bluetooth

Sunday, September 9 2012

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://github.com/PrzemoF/i4oled.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.

Thursday, August 2 2012

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 64x32 pixels image. Let's say it's the recycling symbol:

recycle icon 64x32 1-bit png

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:

P4
# 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. Some PBM icons here or 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. If you have applied the patches from this entry (I'll update the info here if the patches are accepted to the mainline kernel) 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!

Sunday, July 29 2012

OLED icons on Wacom Intuos4 Wireless PTK-540WL

I just submitted 2 kernel patches [PATCH 1, PATCH 2 there is a good chance that it's not the final version, but it works] that will allow to set OLED icons on Wacom Intuos4 Wireless PTK-540WL tablet. The patechs create some "control" files in /sys/class/hidraw/hidraw/dev_no/device. The files are named oled*_img where * is number 0 to 7. Each of them represents one icon on the tablet. Sending a 256 bytes long file to an oled*_img control file writes it to tablet memory. The result can look like this:

Tux on wacom intuos4wl 1  

or thisTux on wacom intuos4wl

or just this:

Arrows on wacom intuos4wl

The control files accept simple pbm format but without the header. The image has to be 64 by 32 pixels, so the lenght withut the header is 256 bytes. If the file has different lenght if won't be accepted as kernel performs lenght check. Some example icons are here:

ARROW UP ARROW DOWN ARROW LEFT ARROW RIGHT

The photo above shows them on tablet.

Example of command line method for sending the icon:

dd bs=256 if=icon_file.i4wl of=/sys/class/hidraw/hidraw1/device/oled1_img count=1

To see the icon we have to change it's brightness (it also lits one of the wheels leds):

echo 50 > /sys/class/hidraw/hidraw1/device/leds/0005\:056A\:00BD.0001\:selector\:0/brightness

More icons and full workflow from an image to icon on the tablet soon.

P.S. Look here for *.i4wl files if you want more icons