{"action":"created","issue":{"url":"https://api.github.com/repos/LLK/scratchx/issues/26","labels_url":"https://api.github.com/repos/LLK/scratchx/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/LLK/scratchx/issues/26/comments","events_url":"https://api.github.com/repos/LLK/scratchx/issues/26/events","html_url":"https://github.com/LLK/scratchx/issues/26","id":77409681,"number":26,"title":"Scratch Extension Plugin Cannot Connect To Devices With More Than One HID Interface","user":{"login":"CreativeComputerLab","id":10683298,"avatar_url":"https://avatars.githubusercontent.com/u/10683298?v=3","gravatar_id":"","url":"https://api.github.com/users/CreativeComputerLab","html_url":"https://github.com/CreativeComputerLab","followers_url":"https://api.github.com/users/CreativeComputerLab/followers","following_url":"https://api.github.com/users/CreativeComputerLab/following{/other_user}","gists_url":"https://api.github.com/users/CreativeComputerLab/gists{/gist_id}","starred_url":"https://api.github.com/users/CreativeComputerLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CreativeComputerLab/subscriptions","organizations_url":"https://api.github.com/users/CreativeComputerLab/orgs","repos_url":"https://api.github.com/users/CreativeComputerLab/repos","events_url":"https://api.github.com/users/CreativeComputerLab/events{/privacy}","received_events_url":"https://api.github.com/users/CreativeComputerLab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-17T22:02:00Z","updated_at":"2015-05-18T15:46:26Z","closed_at":null,"body":"The MakeSense device (http://makesense.co) exposes 3 HID interfaces and the Scratch plugin cannot seem to connect to any of them. The interfaces are:\r\n\\?\\hid#vid_04d8&pid_f46a&mi_00#7&e3da3d9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} - 0\r\n\\?\\hid#vid_04d8&pid_f46a&mi_01#7&3214e19b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} - 0\r\n\\?\\hid#vid_04d8&pid_f46a&mi_02#7&32de4c95&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} - 0\r\n\r\nThe device is known to work fine when connected to other SW via standard HID APIs."},"comment":{"url":"https://api.github.com/repos/LLK/scratchx/issues/comments/103109390","html_url":"https://github.com/LLK/scratchx/issues/26#issuecomment-103109390","issue_url":"https://api.github.com/repos/LLK/scratchx/issues/26","id":103109390,"user":{"login":"khanning","id":1169507,"avatar_url":"https://avatars.githubusercontent.com/u/1169507?v=3","gravatar_id":"","url":"https://api.github.com/users/khanning","html_url":"https://github.com/khanning","followers_url":"https://api.github.com/users/khanning/followers","following_url":"https://api.github.com/users/khanning/following{/other_user}","gists_url":"https://api.github.com/users/khanning/gists{/gist_id}","starred_url":"https://api.github.com/users/khanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khanning/subscriptions","organizations_url":"https://api.github.com/users/khanning/orgs","repos_url":"https://api.github.com/users/khanning/repos","events_url":"https://api.github.com/users/khanning/events{/privacy}","received_events_url":"https://api.github.com/users/khanning/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T15:46:26Z","updated_at":"2015-05-18T15:46:26Z","body":"I can confirm this issue on OSX 10.9.5. \r\n\r\nThe interface number can be accessed in _deviceConnected via:\r\n```\r\next._deviceConnected = function(dev) {\r\n  if (dev.info[\"interface_number\"] == 2) {\r\n    // Connect\r\n  }\r\n};\r\n```\r\nHowever, even with the correct interface # the device fails to connect reliably.\r\n\r\nWhen a read() is attempted on the device, most of the time, I'm getting one of the following results:\r\n\r\nResult 1\r\n--\r\n1. null is returned by read()\r\n2. _deviceRemoved is called\r\n3. attempt to reconnect the device via _deviceConnected\r\n4. null is returned by read()\r\n5. _deviceRemoved is called\r\n6. ...\r\n\r\nResult 2\r\n--\r\n1. `TypeError: e is not a function`is printed in the console when read() is called\r\n2. _device Removed in NOT called"}}