SonyEricsson HID Profiles


Like Theme Files, Bluetooth HID profiles on the K700 are tar files that contain an XML file with keyboard mappings and a single JPEG image designed to fill the whole screen and illustrate them.

What You Can Do

Well, you can remotely control any Bluetooth HID-enabled computer remotely from your phone (see "Caveats" below) using the pre-supplied SonyEricsson profiles.

(if you don't have one defined or in your phone memory, check the installation CD - it will load three default remote control profiles - Desktop, Presentation and Media Player, if I'm not mistaken. The profile names should be pretty obvious.)

Up until SonyEricsson released the Bluetooth Remote Control Tool (which, incidentally, is available for both Windows and Mac OS X), there was very little you could do concerning creating your own remote control profile unless you took the time to pore over a gazillion technical notes.

So I did not really know how to customize remote control files with the correct keycodes, and put together the following set of notes, which may still be useful to someone:

Dissecting a .hid File

As an example, let's look at the default "Desktop" HID profile:

$ tar -tvf Desktop.hid
-rw-rw-rw- root/root     36887 2004-04-20 20:20:02 Desktop.jpg
-rw-rw-rw- root/root      1796 2004-04-20 22:29:24 DeskTop.kcf

The .kcf file is a plain XML-like file containing key mappings (complete with keyboard modifiers):

<SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION VERSION="1.0">
  <KEYMAP>
    <KEY_1>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "29" />  <!-- 1= ESCAPE  -->
      </ACTION>
    </KEY_1>
    <KEY_2>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "52" />  <!-- 2= UP ARROW  -->
      </ACTION>
    </KEY_2>
    <KEY_3>
      <ACTION>
        <KEYBOARD MODIFIERS = "04" USAGEID = "2B" />  <!-- 3= ALT+TAB  -->
      </ACTION>
    </KEY_3>
    <KEY_4>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "50" />  <!-- 4= LEFT ARROW  -->
      </ACTION>
    </KEY_4>
    <KEY_5>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "28" />  <!-- 5= RETURN  -->
      </ACTION>
    </KEY_5>
    <KEY_6>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "4F" />  <!-- 6= RIGHT ARROW  -->
      </ACTION>
    </KEY_6>
    <KEY_7>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "43" />  <!-- 7= F10  -->
      </ACTION>
    </KEY_7>
    <KEY_8>
      <ACTION>
        <KEYBOARD MODIFIERS = "00" USAGEID = "51" />  <!-- 8= DOWN ARROW  -->
      </ACTION>
    </KEY_8>
    <KEY_9>
      <ACTION>
        <KEYBOARD MODIFIERS = "06" USAGEID = "2B" />  <!-- 9= ALT+SHIFT+TAB  -->
      </ACTION>
    </KEY_9>
    <KEY_STAR>
      <ACTION>
        <KEYBOARD MODIFIERS = "05" USAGEID = "1E" />  <!-- *= CTRL+ALT+1  -->
      </ACTION>
    </KEY_STAR>
    <KEY_0>
      <ACTION>
        <KEYBOARD MODIFIERS = "05" USAGEID = "1F" />  <!-- 0= CTRL+ALT+2   -->
      </ACTION>
    </KEY_0>
    <KEY_HASH>
      <ACTION>
        <KEYBOARD MODIFIERS = "08" USAGEID = "00" />  <!-- #= LEFT GUI  -->
      </ACTION>
    </KEY_HASH>
  </KEYMAP>
</SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION>

Caveats

I was unable to get the K700 to control any of my Macs before Mac OS X 10.3.5 came out, since Apple was unable to anticipate a phone also being a HID device - the Bluetooth assistant refused to recognize the K700 as a HID device, and persisted on calling it "just a phone".

It worked flawlessly with a vanilla installation of Windows XP, though, with the K700 installing itself as both a Bluetooth keyboard and mouse in 30 seconds flat using a Conceptronic Bluetooth dongle and, later, with the Toshiba/M100's standard Bluetooth stack.

Mind you, if you're doing presentations, you might want to disable Bluetooth power saving and keypad locks - sometimes the K750i and the K600 go into "idle" mode, and it's fiddly to have to unlock the keypad and wait a couple of seconds for Bluetooth to become really active again.

Resources: