By default anyRemote will search the following configuration files:
./.anyremote.cfg
$HOME/.anyremote.cfg
You can specify another configuration file with -f option, for example:
kanyremote -f ./xmms.cfg
Description of configurational file format
AutoConnect=false
Auto-connect to phone on startup, default value is false.
AutoRepeat=false
Auto repeat feature (as on PC keyboard - about 10 events per second). Usefull for mouse emulation, for example. Default value is false.
Baudrate=19200
Baudrate to use; default value is 19200
CharSet=8859-1
Charset to use; default value is 8859-1
Device=/dev/rfcommX
Device to connect; default value is /dev/rfcomm0
Log=true
Print or not to print logging info to the file /tmp/kanyremote.log, default value is false.
Debug=true
Print or not to print verbose logging info to the file /tmp/kanyremote.log, default value is true.Works only if Log=true.
RetrySecs=60
Duration in seconds beetween attempts to reconnect to the phone in case if connection fails; default value is 60 (works in conjunction with AutoConnect parameter)
Screen=true
Send or don't send CKPD commands to phone. Default value is false
CmerOn=AT+CMER=3,1,0,0,0
AT+CMER command which enters phone in "echo" mode. In "echo" mode phone will send key codes of buttons pressed over bluetooth; no default value. If this parameter is not specified program will try to determine it automatically.
CmerOff=AT+CMER=0,0,0,0,0
AT+CMER command which exits phone from "echo" mode; no default value. If this parameter is not s pecified program will try to determine it automatically.
ToMainMenu=E
CKPD sequence which used to reach main screen of the phone from any phone's menu. On Motorola-V500 to press "Red Cancel" button is enough to get out from any menu. Default value is empty string.
[Aliases] section
Format:
CKPD_key=New_alias
Different phones uses the different keycodes, for example: Button 1 on Motorola generates keycode 1 but the same button on Sagem generates keycode 49. So, if You plans to use this tools with diffrent phones, it could be useful to redefine:
1=One 49=Oneand then use "One" in [Keys] section instead of "1" or "49"
[Keys] section
Format:
CKPD_key=command![CKPD_sequence_to_send_back_to_phone]
CKPD sequence to send back to phone could be useful if You can't lock the keyboard and needs to return out from phone's menu after each key pressing on phone keypad.
1=kdialog --msgbox 1!* 2=kdialog --msgbox 2!*
It is possible to define multi-key commands
3 1=kdialog --msgbox 3_1!* 3 2=kdialog --msgbox 3_2!* 3 3 1=kdialog --msgbox 3_3_1!*
It is not good idea to define:
3 3=kdialog --msgbox 3_3!* 3 3 1=kdialog --msgbox 3_3_1!*
simultaneously, since only one command will works (which one - depends on search order).
It is possible to group keymappings in so-called "mode" to set more than one command to the key:
1=kdialog --msgbox 1! 2=kdialog --msgbox 2! [Mode]=1 1=kdialog --msgbox 1_in_Mode_1! 2=kdialog --msgbox 2_in_Mode_1! [ModeEnd] [Mode]=2 1=kdialog --msgbox 1_in_Mode_2! 2=kdialog --msgbox 2_in_Mode_2! [ModeEnd]
There are several "internal" commands:
(TempDisconnect) used to temporary (1 minute) disconnecting from phone.
9=(TempDisconnect)!E
(Exit) used to exit from application.
0=(Exit)!E
(Connect) will be called when connection established:
(Connect)=kdialog --msgbox "Connected on $(Time)"!
(Disconnect) will be called when connection is lost:
(Disconnect)=kdialog --msgbox Disconnected!
Incoming call handling
(InCall)=kdialog --msgbox "Incoming call"!*
End of call handling
(EndCall)=kdialog --msgbox "Call ends"!*
Auto-mute example (amixer utility shold be installed, example is for soundcard #0):
(InCall)=amixer -c 0 sset Master,0 mute;(RemoteOff) (EndCall)=(RemoteOn);amixer -c 0 sset Master,0 unmute
Switch off "remote control" functionality without disconnecting
1=(RemoteOff)!
Switch on "remote control" functionality
2=(RemoteOn)!
Change mode
* 1=(SetMode) xmms!
Caller ID will be substituted (if determined) instead of $(CallId):
3=kdialog --msgbox $(CallId)!E *
Current will be substituted instead of $(Time):
3=kdialog --msgbox $(Time)!E *
Current mode be substituted instead of $(Mode):
0=kdialog --msgbox $(Mode)!E *
[Alarms] section
Format:
Alarm_file=CKPD_sequence_to_send_back_to_phone
When file Alarm_file will be created, then CKPD_sequence_to_send_back_to_phone will be sent to phone.
/tmp/alarm1=* 1 *
In principle, (since this just keyboard emulation stuff) smart guys ;-) could even make a call with this feature.
For example, the following command will dial number 1111111, wait 6
seconds, then finish the call anttype "* 3 *" on screen of phone (valid for Motorola-V500).
/tmp/alarm3=E 1 1 1 1 1 1 1 S PAUSE PAUSE PAUSE PAUSE PAUSE PAUSE E E * 3 *