{"action":"created","issue":{"url":"https://api.github.com/repos/abcminiuser/lufa/issues/44","labels_url":"https://api.github.com/repos/abcminiuser/lufa/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/abcminiuser/lufa/issues/44/comments","events_url":"https://api.github.com/repos/abcminiuser/lufa/issues/44/events","html_url":"https://github.com/abcminiuser/lufa/issues/44","id":57822377,"number":44,"title":"Critical CDC Bootloader USB HUB bug","user":{"login":"NicoHood","id":6888294,"avatar_url":"https://avatars.githubusercontent.com/u/6888294?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoHood","html_url":"https://github.com/NicoHood","followers_url":"https://api.github.com/users/NicoHood/followers","following_url":"https://api.github.com/users/NicoHood/following{/other_user}","gists_url":"https://api.github.com/users/NicoHood/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoHood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoHood/subscriptions","organizations_url":"https://api.github.com/users/NicoHood/orgs","repos_url":"https://api.github.com/users/NicoHood/repos","events_url":"https://api.github.com/users/NicoHood/events{/privacy}","received_events_url":"https://api.github.com/users/NicoHood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-16T16:11:21Z","updated_at":"2015-02-18T12:17:01Z","closed_at":null,"body":"This issue has **nothing** to do with issue #42.\r\n\r\nThe story:\r\nI am developing a 16u2 CDC Bootloader variation and I got a very weird error. I tried with my arduino leonardo now. There is no such an error (with the official bootloader). Then I recompiled the CDC Bootloader from lufa and the bug appeared.\r\n\r\nThe bug:\r\nUse a USB3 port on your pc (tried with two pcs) and connect a usb 2.0 hub to it(usb 3 wont cause the bug). plug in the arduino with the cdc bootloader and try to upload a sketch via the ide. The verification will fail. Now do the same and connect a second device to the usb port like a mouse. For some reason the uploading now doesnt fail.\r\n\r\nThe sketch will upload anyways but the verification wont fail. I tried with 2 different pcs and different os. (win7, win8, ubuntu). I tried 4 different usb 2 hubs (usb 3 works). I did not try usb 2 pc host ports because i only have usb3 ports. I tried different drivers for windows (shouldnt matter cause linux has this bug too).\r\n\r\nThere are also different errors like a \"dead\" usb port until you plug in/out another device on the hub. As long as you dont do this, the cdc bootloader usb port will be dead, you can replug it as long as you want.\r\n\r\nIt seems that the old CDC bootloader from the Arduino team (with older lufa) has not this problem. I am now searching for the error. If it is the lufa version or the code of the bootloader.\r\n\r\nFuses used (tested with 16u2, 32u2 and 32u4):\r\n```\r\n#fuses (HoodLoader2 only, not suitable for DFU)\r\nHoodLoader2atmega16u2.bootloader.low_fuses=0xFF\r\nHoodLoader2atmega16u2.bootloader.high_fuses=0xD8\r\nHoodLoader2atmega16u2.bootloader.extended_fuses=0xCB (0xFC for 32u4)\r\nHoodLoader2atmega16u2.bootloader.unlock_bits=0x3F\r\nHoodLoader2atmega16u2.bootloader.lock_bits=0x2F\r\n```\r\n\r\nTo recreate this you only need an Arduino Uno/Mega (16u2) board or a leonardo/(pro)micro(32u4) board and test one of the versions. To upload sketches to the 16u2 you need my hid project and hoodloader2 project on github. It'd be easier to test the 32u4 though.\r\n\r\nedit: @Dean: any idea where the bug could be located, where i have to start searching?"},"comment":{"url":"https://api.github.com/repos/abcminiuser/lufa/issues/comments/74855080","html_url":"https://github.com/abcminiuser/lufa/issues/44#issuecomment-74855080","issue_url":"https://api.github.com/repos/abcminiuser/lufa/issues/44","id":74855080,"user":{"login":"NicoHood","id":6888294,"avatar_url":"https://avatars.githubusercontent.com/u/6888294?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoHood","html_url":"https://github.com/NicoHood","followers_url":"https://api.github.com/users/NicoHood/followers","following_url":"https://api.github.com/users/NicoHood/following{/other_user}","gists_url":"https://api.github.com/users/NicoHood/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoHood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoHood/subscriptions","organizations_url":"https://api.github.com/users/NicoHood/orgs","repos_url":"https://api.github.com/users/NicoHood/repos","events_url":"https://api.github.com/users/NicoHood/events{/privacy}","received_events_url":"https://api.github.com/users/NicoHood/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T12:17:01Z","updated_at":"2015-02-18T12:17:01Z","body":"Is this of any importance?\r\nhttps://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/bootloaders/caterina/Caterina.c#L493\r\n\r\nHere is where they fixed the bug:\r\nhttps://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/bootloaders/caterina/Caterina.c#L489"}}