how to personalize a sony ericson remote controll



Hello dear reader, as you know, you can use your telephone as a remote control for you computer. There are three remote control profiles present in the phone.
These three, for some users, seem to be versatile enough, but I want more! Well thank goodness, there is a way to get more, described in this little article. Let me take you on a trip trough the Sony Ericsson remote control profiles!



First off, if you use Windows or Mac, you can download a program from SE that makes these profiles for you.
If you are on linux, or don't want to install that program, read on... :)
A remote control profile in the SonyEricsson phone is no more then a little tarbal. Inside this tarball there are 2 files, a .kcf file and a .jpg file. Named similar to the profile, ergo Presenter contains Presenter.kcf and Presenter.jpg. The kcf file is a plain text file that has an XML like lay-out. This is the most important file. The jpg file is a picture that is showed while this profile is active. You can put a picture of your mother here, but it's probably more useful to have a description of the keys that can be used.

    1.1 The Kcf file



Like you read earlier, this is a plain text file. It always starts with:


<SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION VERSION="1.0">
<KEYMAP>


After this the mapping of the keys start. To point out what key you are mapping, there is a name for each key on your phone.


<KEY_0> until <KEY_9>
<KEY_STAR>
<KEY_HASH>


The settings for these keys are stored within <KEY_XX> and </KEY_XX>, just like this:


<KEY_1>
<KEYBOARD MODIFIERS = "00" USAGEID = "29" /> <!-- 1= ESCAPE -->
</KEY_1>


Two things are important, Keyboard modifiers and Usageid, after <!-- is only comment, stopping at -->


    1.1.1 Keyboard Modifiers



This are, as you can guess, the Alt, Ctrl, Shift and Winkey. Couldn't find a list anywhere, so here is it for you:

Code It does click @
01 Ctrl
02 Shift
03 Shift+Ctrl
04 Alt
05 Ctrl+Alt
06 Shift+Alt
07 Shift+Ctrl+Alt
08 Gui (left)
09 Ctrl+Gui (left)

    1.1.2 Usageid



This is a little easier for me, these codes are available.
At usb.org there is a file that contains all the codes.
Look at page 59. (Note that you'll be needing the hexadecimal UsageID numbers.)

    1.1.3 Example



I've put an example on-line for your convenience, this is a blank file.

    1.2 The JPG file



This is the most straight forward file :) It's just a jpeg of 170x220 pixels. You can use your Gimp to fix yourself a nice little explanation of your profile!
Look at this example, it's ugly, but functional.

    1.3 The end, making it go.



At this point you have 2 files for you personal profile. Just tar these 2 files together.
$ tar cfv MyProfile.hid MyProfile.jpg MyProfile.kcf

Or, having windows (/me lols a bit at you), you download WinRar and make a tar file, rename it to MyProfile.hid.

Now send this file to your telephone using bluetooth. Your telephone should recognize this file right away and ask you to use it :)

    2 Connecting to your Linux computer.



To connect you need bluetooth on your computer (most laptops have it nowadays, else buy a bluetooth usbdongle for 10 euro).
Then you need to configure your linux install a bit, so you can pair your telephone and computer.

First you need libbtctl2, bluez-utils and libbluetooth1.
After insatlling this,
Run this as root:

user@box:~$ sudo modprobe hidp && lsmod |grep hidp && ps aux | grep hcid | grep -v grep

The output should be (numbers in second column may vary):

hidp 31744 2
l2cap 26244 10 hidp,rfcomm
bluetooth 50020 8 hidp,rfcomm,l2cap,hci_usb
root 4736 0.0 0.1 1972 752 ? Ss 14:10 0:00 hcid: processing events


After this it's time to pair your computer.
The basic /etc/bluetooth/hcid.conf will do fine, but your PIN code has to be set (remember, the code you need for the pairing :) )

root@box:~# echo "1234" > /etc/bluetooth/pin && cat /etc/bluetooth/pin

Make sure you only get the folowing line (if not then $ sudo nano /etc/bluetooth/pin and change it there):

1234

Now go ahead and pair your computer and phone using this code.

Basically, your done now. You can connect to your computer from your phone. The Remote control is located under Menu -> Entertainment -> Remote Control.
I've added the remote control as a shortcut on my joystick, saves me even more time ;)

Please be so kind as to leave a message, there is always room for improvement.

kevor