{"action":"created","issue":{"url":"https://api.github.com/repos/nyholku/purejavahidapi/issues/53","repository_url":"https://api.github.com/repos/nyholku/purejavahidapi","labels_url":"https://api.github.com/repos/nyholku/purejavahidapi/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/nyholku/purejavahidapi/issues/53/comments","events_url":"https://api.github.com/repos/nyholku/purejavahidapi/issues/53/events","html_url":"https://github.com/nyholku/purejavahidapi/issues/53","id":303537070,"number":53,"title":"Missing HID InputReports","user":{"login":"AlainCo","id":13969182,"avatar_url":"https://avatars0.githubusercontent.com/u/13969182?v=4","gravatar_id":"","url":"https://api.github.com/users/AlainCo","html_url":"https://github.com/AlainCo","followers_url":"https://api.github.com/users/AlainCo/followers","following_url":"https://api.github.com/users/AlainCo/following{/other_user}","gists_url":"https://api.github.com/users/AlainCo/gists{/gist_id}","starred_url":"https://api.github.com/users/AlainCo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlainCo/subscriptions","organizations_url":"https://api.github.com/users/AlainCo/orgs","repos_url":"https://api.github.com/users/AlainCo/repos","events_url":"https://api.github.com/users/AlainCo/events{/privacy}","received_events_url":"https://api.github.com/users/AlainCo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-08T16:12:15Z","updated_at":"2018-03-09T17:27:14Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI've succeeded in exchanging with a HId device (a Ledger nano S).\r\nIt worked well, but now on some long sequence of inputreport (3 reports), I miss on report.\r\n\r\nall is in purejavahidapi.windows.HidDevice.runReadOnBackground()\r\n\r\nI've investigated and I've discovered that the missing report is obtained if,\r\n after the ReadFile()\r\nand the GetOverlappedResult()\r\n\r\nI do agains a GetOverlappedResult() which obtaine a different report, the 2nd block.\r\nbut if I read again, I always obtain the same second block.\r\n\r\nIf I do a ReadFile() (with or without a ResetEvent() ), I miss the 2nd report.\r\n\r\nI've tried to set an event following this idea\r\nhttps://groups.google.com/d/msg/comp.os.ms-windows.programmer.win32/YmmR3AP4iXU/dro42wfM5ZcJ\r\nm_InputReportOverlapped.hEvent = CreateEvent(null, true, false, null);\r\nbut nothing change\r\n\r\nif I do many GetOverlappedResult() even resetting the m_InputReportLength[0]=0;,\r\neach time it says \"m_InputReportLength=65\" and read the same 2nd report...\r\n\r\nwith or without ResetEvent(m_InputReportOverlapped.hEvent), nothing change...\r\n\r\n\r\nI don't know Win32 API, except few page on MSDN about the cited functions...\r\nDo you have an idea... If it works, I will post the patch...\r\nToo bad it was nearly working. I'm not far... \r\nBest regards"},"comment":{"url":"https://api.github.com/repos/nyholku/purejavahidapi/issues/comments/371882417","html_url":"https://github.com/nyholku/purejavahidapi/issues/53#issuecomment-371882417","issue_url":"https://api.github.com/repos/nyholku/purejavahidapi/issues/53","id":371882417,"user":{"login":"AlainCo","id":13969182,"avatar_url":"https://avatars0.githubusercontent.com/u/13969182?v=4","gravatar_id":"","url":"https://api.github.com/users/AlainCo","html_url":"https://github.com/AlainCo","followers_url":"https://api.github.com/users/AlainCo/followers","following_url":"https://api.github.com/users/AlainCo/following{/other_user}","gists_url":"https://api.github.com/users/AlainCo/gists{/gist_id}","starred_url":"https://api.github.com/users/AlainCo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlainCo/subscriptions","organizations_url":"https://api.github.com/users/AlainCo/orgs","repos_url":"https://api.github.com/users/AlainCo/repos","events_url":"https://api.github.com/users/AlainCo/events{/privacy}","received_events_url":"https://api.github.com/users/AlainCo/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T17:27:14Z","updated_at":"2018-03-09T17:27:14Z","author_association":"NONE","body":"Here it is, I've added comments and commented traces.\r\n\r\nNB: One thing to do would be to use logger library, but I don't know what is best not to make a choice mandatory (my naive vision would be to have a central abstract class which does System.out and System.err by default, and that every user would subclass usin slf4j, java logger, log4j...).\r\n\r\n[HidDevice.java.txt](https://github.com/nyholku/purejavahidapi/files/1797794/HidDevice.java.txt)\r\n[Kernel32Library.java.txt](https://github.com/nyholku/purejavahidapi/files/1797795/Kernel32Library.java.txt)\r\n"}}
{"actor":{"display_login":"AlainCo"}}