Human Interface Device (HID) file for MPlayer

This file enables remote controlling of MPlayer (the Linux movie player) over Bluetooth for SonyEricsson phones (maybe others too).

Download

Graphics is made from SonyEricsson’s original HID pictures by LÉNÁRT Dóra Anna.

Installation

  1. pair your phone with your box
  2. enable HID support in the bluetooth stack (Debian):
    • edit /etc/default/bluetooth, let HIDD_ENABLED=1
    • /etc/init.d/bluetooth restart
  3. send the .hid file to the phone
    • obexftp -b PHONE_BLUETOOTH_HWADDR_HERE -p mplayer.hid
  4. start the remote control
    • hidd –connect PHONE_BLUETOOTH_HWADDR_HERE (for the first session this is the only way)
    • OR on the phone: Games&Entertainment/Remote Control/MPlayer

Usage

This is for the default ~/.mplayer/input.conf. The keyboard symbols at the end are the ones actually sent to the PC.

  • Joystick:
    • left: seek -10s / move left in the menu
    • right: seek +10s / move right in the menu
    • up: seek +1m / move up in the menu
    • down: seek -1m / move down in the menu
    • center: pause / unpause P
  • Soft Keys (at the top):
    • left one: quit Esc
    • right one: show menu Y
  • Dial Keys:
    • 1: seek -10m Page↓
    • 2: toggle OSD O
    • 3: seek +10m Page↑
    • 4: seek track start Home
    • 5: toggle fullscreen F
    • 6: seek track end End
    • 0: toggle subtitle J
  • Volume Control Keys (side):
    • +: volume +1 0
    • -: volume -1 9
  • Go-Back: quit HID

Know-How

  • The .hid file is plain tar file containing an image (.jpg or .gif, animated too) and a key configuration file (.kcf)
  • Keycodes are available in the Universal Serial Bus HID Usage Tables documentation
  • Modifiers (bits):
Key Decimal code
Left Ctrl 1
Left Shift 2
Left Alt 4
Left GUI 8
Right Ctrl 16
Right Shift 32
Right Alt 64
Right GUI 128

Key definition file

mplayer.kcf [download]

<SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION VERSION="1.0">
  <KEYMAP>
    <KEY_VOL_UP>   <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="27"/>  </ACTION></KEY_VOL_UP>    <!-- 0 voldn -->
    <KEY_VOL_DOWN> <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="26"/>  </ACTION></KEY_VOL_DOWN>  <!-- 9 volup -->
    
    <KEY_LSK>      <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="29"/>  </ACTION></KEY_LSK>       <!-- Esc quit -->
    <KEY_RSK>      <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="1C"/>  </ACTION></KEY_RSK>       <!-- y menu -->
    
    <KEY_UP>       <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="52"/>  </ACTION></KEY_UP>        <!-- Up ff1m -->
    <KEY_DOWN>     <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="51"/>  </ACTION></KEY_DOWN>      <!-- Down rw1m -->
    <KEY_LEFT>     <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="50"/>  </ACTION></KEY_LEFT>      <!-- Left ff10s -->
    <KEY_RIGHT>    <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="4F"/>  </ACTION></KEY_RIGHT>     <!-- Right rw 10s -->
    <KEY_JOY>      <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="13"/>  </ACTION></KEY_JOY>       <!-- p pause -->
    
    <KEY_1>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="4E"/>  </ACTION></KEY_1>         <!-- PageUp ff10m -->
    <KEY_2>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="12"/>  </ACTION></KEY_2>         <!-- o OSD -->
    <KEY_3>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="4B"/>  </ACTION></KEY_3>         <!-- PageDn rw10m -->
    
    <KEY_4>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="4A"/>  </ACTION></KEY_4>         <!-- Home -->
    <KEY_5>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="09"/>  </ACTION></KEY_5>         <!-- f fullscreen -->
    <KEY_6>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="4D"/>  </ACTION></KEY_6>         <!-- End -->
    
    <!-- KEY_7>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="07"/>  </ACTION></KEY_7>
    <KEY_8>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="1A"/>  </ACTION></KEY_8>
    <KEY_9>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="08"/>  </ACTION></KEY_9 -->
    
    <!-- KEY_STAR>     <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="10"/>  </ACTION></KEY_STAR -->
    <KEY_0>        <ACTION>        <KEYBOARD MODIFIERS="00" USAGEID="0D"/>  </ACTION></KEY_0>         <!-- j sub_select -->
    <KEY_HASH>     <ACTION>        <KEYBOARD MODIFIERS="07" USAGEID="16"/>  </ACTION></KEY_HASH>      <!-- LCtrl+Alt+Shf+S -->
  </KEYMAP>
</SONY_ERICSSON_REMOTE_CONTROL_CONFIGURATION>
 
project/mplayerhid.txt · Last modified: 2007-06-02 07:07 by ocsi
 
NO software patents Creative Commons License Valid XHTML 1.0 Valid CSS