{"id":1462,"date":"2018-10-03T15:05:15","date_gmt":"2018-10-03T14:05:15","guid":{"rendered":"https:\/\/ofalcao.pt\/blog\/?p=1462"},"modified":"2018-10-03T15:05:15","modified_gmt":"2018-10-03T14:05:15","slug":"xac-with-ev3","status":"publish","type":"post","link":"https:\/\/ofalcao.pt\/blog\/2018\/xac-with-ev3","title":{"rendered":"XAC with EV3"},"content":{"rendered":"<div class=\"seriesmeta\">This post is part 4 of 6 of \u00a0<a href=\"https:\/\/ofalcao.pt\/blog\/series\/xbox-adaptive-controller\" class=\"series-344\" title=\"Xbox Adaptive Controller\">Xbox Adaptive Controller<\/a><\/div><p>Running ev3dev (&#8216;4.14.71-ev3dev-2.3.0-ev3 (stretch)&#8217;.<\/p>\n<p>BT works, just needed to edit &#8216;\/sys\/module\/bluetooth\/parameters\/disable_ertm&#8217;.<\/p>\n<p>dmesg:<\/p>\n<pre>Bluetooth: HIDP (Human Interface Emulation) ver 1.2\r\nBluetooth: HIDP socket layer initialized\r\nhid-generic 0005:045E:0B0C.0002: unknown main item tag 0x0\r\nBluetooth: received HCILL_WAKE_UP_IND in state 2\r\ninput: Xbox Adaptive Controller as \/devices\/platform\/soc@1c00000\/serial8250.2\/tty\/ttyS2\/hci0\/hci0:1\/0005:045E:0B0C.0002\/input\/input3\r\nhid-generic 0005:045E:0B0C.0002: input,hidraw1: BLUETOOTH HID v9.03 Gamepad [Xbox Adaptive Controller] on a0:e6:f8:60:16:60<\/pre>\n<p>I don&#8217;t have a &#8216;\/dev\/input\/js0&#8217;\u00a0 because ev3dev &#8216;joydev&#8217; has been deprecated.<\/p>\n<p>But I can still read it with &#8216;cat \/dev\/input\/event3&#8217; but since it looks like garbage its better to use &#8216;evtest&#8217;:<\/p>\n<pre>No device specified, trying to scan all of \/dev\/input\/event*\r\nNot running as root, no devices may be available.\r\nAvailable devices:\r\n\/dev\/input\/event0: LEGO MINDSTORMS EV3 Speaker\r\n\/dev\/input\/event1: EV3 Brick Buttons\r\n\/dev\/input\/event2: C-Media USB Headphone Set \r\n\/dev\/input\/event3: Xbox Adaptive Controller\r\nSelect the device event number [0-3]: 3\r\nInput driver version is 1.0.1\r\nInput device ID: bus 0x5 vendor 0x45e product 0xb0c version 0x903\r\nInput device name: \"Xbox Adaptive Controller\"\r\nSupported events:\r\n  Event type 0 (EV_SYN)\r\n  Event type 1 (EV_KEY)\r\n    Event code 1 (KEY_ESC)\r\n    Event code 2 (KEY_1)\r\n    Event code 3 (KEY_2)\r\n    Event code 4 (KEY_3)\r\n    Event code 5 (KEY_4)\r\n    Event code 6 (KEY_5)\r\n    Event code 7 (KEY_6)\r\n    Event code 8 (KEY_7)\r\n    Event code 9 (KEY_8)\r\n    Event code 10 (KEY_9)\r\n    Event code 11 (KEY_0)\r\n    Event code 12 (KEY_MINUS)\r\n    Event code 13 (KEY_EQUAL)\r\n    Event code 14 (KEY_BACKSPACE)\r\n    Event code 15 (KEY_TAB)\r\n    Event code 16 (KEY_Q)\r\n    Event code 17 (KEY_W)\r\n    Event code 18 (KEY_E)\r\n    Event code 19 (KEY_R)\r\n    Event code 20 (KEY_T)\r\n    Event code 21 (KEY_Y)\r\n    Event code 22 (KEY_U)\r\n    Event code 23 (KEY_I)\r\n    Event code 24 (KEY_O)\r\n    Event code 25 (KEY_P)\r\n    Event code 26 (KEY_LEFTBRACE)\r\n    Event code 27 (KEY_RIGHTBRACE)\r\n    Event code 28 (KEY_ENTER)\r\n    Event code 29 (KEY_LEFTCTRL)\r\n    Event code 30 (KEY_A)\r\n    Event code 31 (KEY_S)\r\n    Event code 32 (KEY_D)\r\n    Event code 33 (KEY_F)\r\n    Event code 34 (KEY_G)\r\n    Event code 35 (KEY_H)\r\n    Event code 36 (KEY_J)\r\n    Event code 37 (KEY_K)\r\n    Event code 38 (KEY_L)\r\n    Event code 39 (KEY_SEMICOLON)\r\n    Event code 40 (KEY_APOSTROPHE)\r\n    Event code 41 (KEY_GRAVE)\r\n    Event code 42 (KEY_LEFTSHIFT)\r\n    Event code 43 (KEY_BACKSLASH)\r\n    Event code 44 (KEY_Z)\r\n    Event code 45 (KEY_X)\r\n    Event code 46 (KEY_C)\r\n    Event code 47 (KEY_V)\r\n    Event code 48 (KEY_B)\r\n    Event code 49 (KEY_N)\r\n    Event code 50 (KEY_M)\r\n    Event code 51 (KEY_COMMA)\r\n    Event code 52 (KEY_DOT)\r\n    Event code 53 (KEY_SLASH)\r\n    Event code 54 (KEY_RIGHTSHIFT)\r\n    Event code 55 (KEY_KPASTERISK)\r\n    Event code 56 (KEY_LEFTALT)\r\n    Event code 57 (KEY_SPACE)\r\n    Event code 58 (KEY_CAPSLOCK)\r\n    Event code 59 (KEY_F1)\r\n    Event code 60 (KEY_F2)\r\n    Event code 61 (KEY_F3)\r\n    Event code 62 (KEY_F4)\r\n    Event code 63 (KEY_F5)\r\n    Event code 64 (KEY_F6)\r\n    Event code 65 (KEY_F7)\r\n    Event code 66 (KEY_F8)\r\n    Event code 67 (KEY_F9)\r\n    Event code 68 (KEY_F10)\r\n    Event code 69 (KEY_NUMLOCK)\r\n    Event code 70 (KEY_SCROLLLOCK)\r\n    Event code 71 (KEY_KP7)\r\n    Event code 72 (KEY_KP8)\r\n    Event code 73 (KEY_KP9)\r\n    Event code 74 (KEY_KPMINUS)\r\n    Event code 75 (KEY_KP4)\r\n    Event code 76 (KEY_KP5)\r\n    Event code 77 (KEY_KP6)\r\n    Event code 78 (KEY_KPPLUS)\r\n    Event code 79 (KEY_KP1)\r\n    Event code 80 (KEY_KP2)\r\n    Event code 81 (KEY_KP3)\r\n    Event code 82 (KEY_KP0)\r\n    Event code 83 (KEY_KPDOT)\r\n    Event code 86 (KEY_102ND)\r\n    Event code 87 (KEY_F11)\r\n    Event code 88 (KEY_F12)\r\n    Event code 96 (KEY_KPENTER)\r\n    Event code 97 (KEY_RIGHTCTRL)\r\n    Event code 98 (KEY_KPSLASH)\r\n    Event code 99 (KEY_SYSRQ)\r\n    Event code 100 (KEY_RIGHTALT)\r\n    Event code 102 (KEY_HOME)\r\n    Event code 103 (KEY_UP)\r\n    Event code 104 (KEY_PAGEUP)\r\n    Event code 105 (KEY_LEFT)\r\n    Event code 106 (KEY_RIGHT)\r\n    Event code 107 (KEY_END)\r\n    Event code 108 (KEY_DOWN)\r\n    Event code 109 (KEY_PAGEDOWN)\r\n    Event code 110 (KEY_INSERT)\r\n    Event code 111 (KEY_DELETE)\r\n    Event code 119 (KEY_PAUSE)\r\n    Event code 125 (KEY_LEFTMETA)\r\n    Event code 126 (KEY_RIGHTMETA)\r\n    Event code 127 (KEY_COMPOSE)\r\n    Event code 158 (KEY_BACK)\r\n    Event code 172 (KEY_HOMEPAGE)\r\n    Event code 240 (KEY_UNKNOWN)\r\n    Event code 241 (KEY_VIDEO_NEXT)\r\n    Event code 304 (BTN_SOUTH)\r\n    Event code 305 (BTN_EAST)\r\n    Event code 306 (BTN_C)\r\n    Event code 307 (BTN_NORTH)\r\n    Event code 308 (BTN_WEST)\r\n    Event code 309 (BTN_Z)\r\n    Event code 310 (BTN_TL)\r\n    Event code 311 (BTN_TR)\r\n    Event code 312 (BTN_TL2)\r\n    Event code 313 (BTN_TR2)\r\n    Event code 314 (BTN_SELECT)\r\n    Event code 315 (BTN_START)\r\n    Event code 316 (BTN_MODE)\r\n    Event code 317 (BTN_THUMBL)\r\n    Event code 318 (BTN_THUMBR)\r\n    Event code 319 (?)\r\n    Event code 410 (KEY_SHUFFLE)\r\n    Event code 704 (BTN_TRIGGER_HAPPY1)\r\n    Event code 705 (BTN_TRIGGER_HAPPY2)\r\n    Event code 706 (BTN_TRIGGER_HAPPY3)\r\n    Event code 707 (BTN_TRIGGER_HAPPY4)\r\n    Event code 708 (BTN_TRIGGER_HAPPY5)\r\n    Event code 709 (BTN_TRIGGER_HAPPY6)\r\n    Event code 710 (BTN_TRIGGER_HAPPY7)\r\n    Event code 711 (BTN_TRIGGER_HAPPY8)\r\n    Event code 712 (BTN_TRIGGER_HAPPY9)\r\n    Event code 713 (BTN_TRIGGER_HAPPY10)\r\n    Event code 714 (BTN_TRIGGER_HAPPY11)\r\n    Event code 715 (BTN_TRIGGER_HAPPY12)\r\n    Event code 716 (BTN_TRIGGER_HAPPY13)\r\n    Event code 717 (BTN_TRIGGER_HAPPY14)\r\n  Event type 3 (EV_ABS)\r\n    Event code 0 (ABS_X)\r\n      Value  32768\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 1 (ABS_Y)\r\n      Value  32767\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 2 (ABS_Z)\r\n      Value  32768\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 5 (ABS_RZ)\r\n      Value  32767\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 7 (ABS_RUDDER)\r\n      Value      0\r\n      Min        1\r\n      Max        8\r\n    Event code 9 (ABS_GAS)\r\n      Value      0\r\n      Min        0\r\n      Max     1023\r\n      Fuzz       3\r\n      Flat      63\r\n    Event code 10 (ABS_BRAKE)\r\n      Value      0\r\n      Min        0\r\n      Max     1023\r\n      Fuzz       3\r\n      Flat      63\r\n    Event code 16 (ABS_HAT0X)\r\n      Value      0\r\n      Min       -1\r\n      Max        1\r\n    Event code 17 (ABS_HAT0Y)\r\n      Value      0\r\n      Min       -1\r\n      Max        1\r\n    Event code 40 (ABS_MISC)\r\n      Value  32768\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 41 (?)\r\n      Value  32767\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 42 (?)\r\n      Value  32768\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 43 (?)\r\n      Value  32767\r\n      Min        0\r\n      Max    65535\r\n      Fuzz     255\r\n      Flat    4095\r\n    Event code 44 (?)\r\n      Value      0\r\n      Min        0\r\n      Max     1023\r\n      Fuzz       3\r\n      Flat      63\r\n    Event code 45 (?)\r\n      Value      0\r\n      Min        0\r\n      Max     1023\r\n      Fuzz       3\r\n      Flat      63\r\n  Event type 4 (EV_MSC)\r\n    Event code 4 (MSC_SCAN)\r\nKey repeat handling:\r\n  Repeat type 20 (EV_REP)\r\n    Repeat code 0 (REP_DELAY)\r\n      Value    250\r\n    Repeat code 1 (REP_PERIOD)\r\n      Value     33\r\nProperties:\r\nTesting ... (interrupt to exit)<\/pre>\n<p>Pressing the big button &#8216;A&#8217;:<\/p>\n<pre>Event: time 1538574732.484613, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001\r\nEvent: time 1538574732.484613, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1\r\nEvent: time 1538574732.484613, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90010\r\nEvent: time 1538574732.484613, type 1 (EV_KEY), code 319 (?), value 1\r\nEvent: time 1538574732.484613, -------------- SYN_REPORT ------------\r\nEvent: time 1538574732.574441, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001\r\nEvent: time 1538574732.574441, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0\r\nEvent: time 1538574732.574441, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90010\r\nEvent: time 1538574732.574441, type 1 (EV_KEY), code 319 (?), value 0\r\nEvent: time 1538574732.574441, -------------- SYN_REPORT ------------<\/pre>\n<p>So it is a bit less easy than with Ubuntu but we&#8217;ll get somewhere.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"seriesmeta\">This post is part 4  of 6 of \u00a0<a href=\"https:\/\/ofalcao.pt\/blog\/series\/xbox-adaptive-controller\" class=\"series-344\" title=\"Xbox Adaptive Controller\">Xbox Adaptive Controller<\/a><\/div><p>Running ev3dev (&#8216;4.14.71-ev3dev-2.3.0-ev3 (stretch)&#8217;. BT works, just needed to edit &#8216;\/sys\/module\/bluetooth\/parameters\/disable_ertm&#8217;. dmesg: Bluetooth: HIDP (Human Interface Emulation) ver 1.2 Bluetooth: HIDP socket layer initialized hid-generic 0005:045E:0B0C.0002: unknown main item tag 0x0 Bluetooth: received HCILL_WAKE_UP_IND in state 2 input: Xbox Adaptive Controller as \/devices\/platform\/soc@1c00000\/serial8250.2\/tty\/ttyS2\/hci0\/hci0:1\/0005:045E:0B0C.0002\/input\/input3 hid-generic 0005:045E:0B0C.0002: input,hidraw1: BLUETOOTH HID v9.03 Gamepad [Xbox Adaptive Controller] on a0:e6:f8:60:16:60 &hellip; <a href=\"https:\/\/ofalcao.pt\/blog\/2018\/xac-with-ev3\" class=\"more-link\">Continuar a ler<span class=\"screen-reader-text\"> &#8220;XAC with EV3&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"series":[344],"class_list":["post-1462","post","type-post","status-publish","format-standard","hentry","category-sem-categoria","series-xbox-adaptive-controller"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Mhyv-nA","_links":{"self":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/comments?post=1462"}],"version-history":[{"count":0,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1462\/revisions"}],"wp:attachment":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/media?parent=1462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/categories?post=1462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/tags?post=1462"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/series?post=1462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}