Пульт Aureal с DX-а, Ubuntu 10.10 и XBMC
В свое время приобрел на DX-е пульт дистанционного управления Wireless Multimedia Infrared IR Remote Controller with USB Receiver for PC (2*AAA)
http://www.dealextreme.com/p/wireless-multimedia-infrared-ir-remote-controller-with-usb-receiver-for-pc-2-aaa-34435
Надо бы «прикрутить» к создаваемому Медиацентру на базе XBMC. По умолчанию пульт работает в Ubuntu 10.10, но, к сожалению, не все кнопки.
Вносим изменения в систему
Качаем патч для ядра. Компилируем, копируем hid-aureal.ko в папку /lib/modules/2.6.32-25-generic/extra
Папку с ядром нужно указать ту, которая у Вас актуальна на текущий момент. Папку extra, быть может придется создать.
Применяем изменения:
0 1 2 3 |
depmod -a |
Вставляем USB брелок с ИК-портом и смотрим при помощи dmesg. Должно быть нечто такое:
0 1 2 3 |
aureal 0003:0755:2626.0001: fixing Aureal Cy se W-01RN USB_V3.1 report descriptor. Keyboard Logical Maximum = 101 |
Если вы видите в логе «generic-usb» вместо aureal перезапускаем usb, не забывая, что usb клавиатуры и мыши будут временно недоступны:
0 1 2 3 4 5 |
rmmod usbhid modprobe hid-aureal modprobe usbhid |
Конфигурационные файлы
Правим lircd.conf
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# brand: dxremote # model no. of remote control: # devices being controlled by this remote: # begin remote name dxremote bits 16 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100 header 8988 4414 one 581 1652 zero 581 540 ptrail 580 repeat 8968 2196 pre_data_bits 16 pre_data 0x205D gap 107262 toggle_bit_mask 0x0 begin codes KEY_0 0x22DD KEY_1 0xF20D KEY_2 0xEA15 KEY_3 0xDA25 KEY_4 0x7887 KEY_5 0xFA05 KEY_6 0x10EF KEY_7 0x30CF KEY_8 0x32CD KEY_9 0x12ED KEY_HASH 0x3AC5 KEY_CLEAR 0x0AF5 KEY_ASTERISK 0x02FD KEY_FULLSCREEN 0x50AF KEY_NEXT 0x1AE5 KEY_PREVIOUS 0xD22D KEY_RED 0x609F KEY_GREEN 0xE21D KEY_YELLOW 0xD02F KEY_BLUE 0x08F7 KEY_BACK 0x00FF KEY_UP 0xC03F KEY_DOWN 0x40BF KEY_LEFT 0x708F KEY_RIGHT 0x58A7 KEY_ENTER 0xE01F KEY_VOLUMEDOWN 0xC23D KEY_VOLUMEUP 0xF00F KEY_CHANNELDOWN 0x18E7 KEY_CHANNELUP 0xCA35 KEY_MUTE 0x807F KEY_W 0xA05F KEY_MORE 0xC837 KEY_DESKTOP 0x2AD5 KEY_REPLAY 0x6897 KEY_SKIP 0x20DF KEY_PLAYPAUSE 0x48B7 KEY_STOP 0xA857 KEY_REW 0x8877 KEY_FWD 0xE817 KEY_MYPICTURE 0xB04F KEY_MYMUSIC 0x9867 KEY_DVDRMENU 0xD827 KEY_MYVIDEO 0x906F KEY_MYTV 0xB847 KEY_FMRADIO 0xF807 KEY_CLOSE 0x28D7 KEY_POWER 0x38C7 end codes end remote |
Пример ~/.lircrc
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
begin remote = dxremote button = KEY_0 prog = mythtv config = 0 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_1 prog = mythtv config = 1 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_2 prog = mythtv config = 2 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_3 prog = mythtv config = 3 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_4 prog = mythtv config = 4 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_5 prog = mythtv config = 5 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_6 prog = mythtv config = 6 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_7 prog = mythtv config = 7 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_8 prog = mythtv config = 8 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_9 prog = mythtv config = 9 delay = 0 repeat = 0 end begin remote = dxremote button = KEY_HASH prog = mythtv config = - delay = 0 repeat = 0 end begin remote = dxremote button = KEY_CLEAR prog = mythtv config = \C delay = 0 repeat = 0 end begin remote = dxremote button = KEY_ASTERISK prog = mythtv config = _ delay = 0 repeat = 0 end begin remote = dxremote button = KEY_FULLSCREEN prog = mythtv config = \W delay = 0 repeat = 0 end begin remote = dxremote button = KEY_RED prog = mythtv config = R delay = 0 repeat = 0 end begin remote = dxremote button = KEY_BACK prog = mythtv config = Escape delay = 0 repeat = 0 end begin remote = dxremote button = KEY_UP prog = mythtv config = Up delay = 1 repeat = 3 end begin remote = dxremote button = KEY_DOWN prog = mythtv config = Down delay = 1 repeat = 3 end begin remote = dxremote button = KEY_LEFT prog = mythtv config = Left delay = 2 repeat = 3 end begin remote = dxremote button = KEY_RIGHT prog = mythtv config = Right delay = 2 repeat = 3 end begin remote = dxremote button = KEY_ENTER prog = mythtv config = Return delay = 0 repeat = 0 end begin remote = dxremote button = KEY_VOLUMEDOWN prog = mythtv config = [ delay = 1 repeat = 3 end begin remote = dxremote button = KEY_VOLUMEUP prog = mythtv config = ] delay = 1 repeat = 3 end begin remote = dxremote button = KEY_CHANNELDOWN prog = mythtv config = \D delay = 0 repeat = 0 end begin remote = dxremote button = KEY_CHANNELUP prog = mythtv config = \U delay = 0 repeat = 0 end begin remote = dxremote button = KEY_MUTE prog = mythtv config = | delay = 0 repeat = 0 end begin remote = dxremote button = KEY_W prog = mythtv config = I delay = 0 repeat = 0 end begin remote = dxremote button = KEY_MORE prog = mythtv config = M delay = 0 repeat = 0 end begin remote = dxremote button = KEY_DESKTOP prog = mythtv config = S delay = 0 repeat = 0 end begin remote = dxremote button = KEY_REPLAY prog = mythtv config = Home delay = 0 repeat = 0 end begin remote = dxremote button = KEY_SKIP prog = mythtv config = End delay = 0 repeat = 0 end begin remote = dxremote button = KEY_PLAYPAUSE prog = mythtv config = P delay = 0 repeat = 0 end begin remote = dxremote button = KEY_STOP prog = mythtv config = P delay = 0 repeat = 0 end begin remote = dxremote button = KEY_REW prog = mythtv config = delay = 0 repeat = 0 end begin remote = dxremote button = KEY_MYVIDEO prog = mythtv config = \V delay = 0 repeat = 0 end begin remote = dxremote button = KEY_CLOSE prog = mythtv config = Escape delay = 0 repeat = 0 end |
Перестартуем lirc
0 1 2 3 |
/etc/init.d/lirc restart |
Наслаждаемся результатом...
Ссылки по теме
Страница товара на DX-е : http://www.dealextreme.com/p/wireless-multimedia-infrared-ir-remote-controller-with-usb-receiver-for-pc-2-aaa-34435
Страница на форума на DX : http://www.dealextreme.com/forums/Forums.dx/Page.1~Forum.34435~threadid.624377
Страница патча к ядру : http://gitorious.org/hid-aureal-kernel-module
Страница скачивания патча к ядру : http://gitorious.org/hid-aureal-kernel-module/hid-aureal-kernel-module/trees/master