Back to my K750i page
Did this site help you?
Average rating (K750i):
2.68/3 (1860 votes)

GNU/Linux and the K750i Bluetooth Remote

The K750i has a nice builtin feature: It allows you to use your phone as a Bluetooth Human Interface Device (HID) with your computer. In other words, you can remote control your computer and applications with your phone, be it a presentation in which you can switch the slides with your phone, or your favourite media player software. A few drafts for remote control profiles are already supplied with the phone, but you can define your own.

Content

TuxMobil Listed

Remote Control

The remote control functionality of the cellphone is a handy feature for presentations or multimedia applications. Since it uses the standard Bluetooth specifications for Human Interface Devices, it is supported by Linux systems out of th box. To enable the use of Bluetooth HIDs, edit the file /etc/default/bluez-utils (This applies for Debian GNU/Linux 'Etch'). Simply flip the option HIDD_ENABLED to 1 in order to use the phone as keyboard and mouse.

After pairing the two devices again, you should be able to move your mouse cursor with the joystick of the cellphone.

Unfortunately, the remote control functionality does not work with XMMS or Rhythmbox, but this is only a matter of redefining the hotkeys. Since I did not find a way to configure those on the phone, it should be possible to remap them either inside the audio player or with the use of another process that catches the appropiate events.

On investigation with xev, the following keys can be revealed:

phone key function (media player) sent keycode function (presenter) sent keycode
1 rewind Control_L + Shift_L + b previous Home
2 play Control_L + p play F5
3 forward Control_L + Shift_L + f next End
4 back Control_L + b black b
5 stop Control_L + s stop Escape
6 next Control_L + f white w
7 mute F8
- volume - F9 prior prior
+ volume + F10 next next

If you want to use the media player remote control with Rhythmbox and IceWM, you can add the following lines to your IceWM configuration file ~/.icewm/keys:

# ~/.icewm/keys
# K750i media player
key "Ctrl+B"           rhythmbox --previous
key "Ctrl+F"           rhythmbox --next
key "Ctrl+P"           rhythmbox --play-pause
key "Ctrl+S"           rhythmbox --stop
key "F8"               rhythmbox --toggle-mute
key "F9"               rhythmbox --volume-down
key "F10"              rhythmbox --volume-up

Unfortunately, these keys are often used by other programs, so assigning them to rhythmbox-command globally can disrupt your work flow to a great extent.

Defining your own remote

If the predefined remote controls do not suite your needs (they will not), you can modify them on your computer. Sony Ericsson offers a Windows program for that, but you do not need one; Just like the theme files, remote control definitions are nothing more than tar archives with an XML and some image files in it. You can transfer the existing profiles to your computer for examination:

After having extracted the .hid file, you will find an image - its format and name seem to be regardless - and a .kcf file. This is the XML document we are looking for; It contains the mapping of physical phone buttons to the triggered Bluetooth events.

The key definitions inside the XML file are enclosed by the following element:

<SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION VERSION = "1.0">
  <KEYMAP>
	[...]
  </KEYMAP>
</SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION>

Inside the KEYMAP element, every key that is defined gets his own block:

    <KEY_JOY>
      <ACTION>
        <KEYBOARD MODIFIERS = "0A" USAGEID = "2B"/>
      </ACTION>
    </KEY_JOY>

This section maps the joypad key to the TAB key with the left Shift and Windows pressed at the same time.

The key itself is defined through the USAGEID, which can be retrieved from the official USB HID documents, and has to be entered in hexadecimal format. The modifiers, including Ctrl, Shift, Alt and the Windows ("GUI") keys, are evaluated through a bitmask:

Left Ctrl 1
Left Shift 2
Left Alt 4
Left GUI 8
Right Ctrl 16
Right Shift 32
Right Alt 64
Right GUI 128

To define the value of the MODIFIER item, just add up the values of the keys you wish to be pressed, and convert the result to hexadecimal format - despite the fact that the official SE manual says decimal, this seems to be an documentation error.

Download remote control profiles

MediaBox

MediaBox remote control

This profile is a modification of the builtin Mediaplayer profile, it uses keys that are not used by other application. You can intercept the keycodes with your window manager or any other application and execute the appropiate commands for your media player; I myself use IceWM and Rhythmbox, so my ~/.icewm/keys contains the following segment:

key "Shift+Super+Q"	rhythmbox --previous
key "Shift+Super+W"	rhythmbox --next
key "Shift+Super+E"	rhythmbox --play-pause
key "Shift+Super+Tab"	rhythmbox --focus
key "Shift+Super+z"	rhythmbox --shuffle
Super_L refers to the left Windows key.
phone key function sent keycode
1 rewind Shift_L + Super_L + a
2 play/pause Shift_L + Super_L + E
3 forward Shift_L + Super_L + s
4 back Shift_L + Super_L + q
5 stop Shift_L + Super_L + r
6 next Shift_L + Super_L + w
# random? Shift_L + Super_L + z
* mute MUTE
- volume - VOLDOWN
+ volume + VOLUP

Since the volume- und the mute key sent their corresponding key event, they will most likely be caught by some other sofware you might have installed, perhaps to use the keys on your notebook.

Download the MediaBox profile