{"action":"created","issue":{"url":"https://api.github.com/repos/aircrack-ng/rtl8812au/issues/77","repository_url":"https://api.github.com/repos/aircrack-ng/rtl8812au","labels_url":"https://api.github.com/repos/aircrack-ng/rtl8812au/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/aircrack-ng/rtl8812au/issues/77/comments","events_url":"https://api.github.com/repos/aircrack-ng/rtl8812au/issues/77/events","html_url":"https://github.com/aircrack-ng/rtl8812au/issues/77","id":285703249,"number":77,"title":"USB3 power issue","user":{"login":"kimocoder","id":4252297,"avatar_url":"https://avatars3.githubusercontent.com/u/4252297?v=4","gravatar_id":"","url":"https://api.github.com/users/kimocoder","html_url":"https://github.com/kimocoder","followers_url":"https://api.github.com/users/kimocoder/followers","following_url":"https://api.github.com/users/kimocoder/following{/other_user}","gists_url":"https://api.github.com/users/kimocoder/gists{/gist_id}","starred_url":"https://api.github.com/users/kimocoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimocoder/subscriptions","organizations_url":"https://api.github.com/users/kimocoder/orgs","repos_url":"https://api.github.com/users/kimocoder/repos","events_url":"https://api.github.com/users/kimocoder/events{/privacy}","received_events_url":"https://api.github.com/users/kimocoder/received_events","type":"User","site_admin":false},"labels":[{"id":674254929,"url":"https://api.github.com/repos/aircrack-ng/rtl8812au/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":51,"created_at":"2018-01-03T14:32:11Z","updated_at":"2018-03-01T13:35:33Z","closed_at":null,"author_association":"COLLABORATOR","body":"**A user is reporting that the \"AWUS036ACH\" is underpowered running at 200mA instead of 500mA**\r\n\r\n\"I have noticed that with the Alfa AWUS036ACH device plugged in to a USB 3.0 port, it only is able to receive 200mA of power. When plugged into a USB 2.0 port it is able to receive 500mA. I'm not sure why this is, but the result of the loss in power is that the device has a very limited range for transmit and receive using these drivers. This information was obtained via the command lsusb -v.\"\r\n\r\n\"The AWUS036H being referenced in that post uses the RTL8187 driver, and runs at a full 500mA. The range on that adapter is much greater than the range on the AWUS036ACH, which uses the RTL8812AU driver. None of the users involved in this discovery are developers, so I'm adding this note here in hopes someone who knows what might fix this issue will see it.\"\r\n\r\n**Other sources:**\r\nhttps://forums.kali.org/showthread.php?38574-Old-AWUS036H-vs-new-AWUS036ACH-performance-comparison\r\nhttps://github.com/abperiasamy/rtl8812AU_8821AU_linux/issues/12"},"comment":{"url":"https://api.github.com/repos/aircrack-ng/rtl8812au/issues/comments/369592953","html_url":"https://github.com/aircrack-ng/rtl8812au/issues/77#issuecomment-369592953","issue_url":"https://api.github.com/repos/aircrack-ng/rtl8812au/issues/77","id":369592953,"user":{"login":"Trace-2","id":35101372,"avatar_url":"https://avatars3.githubusercontent.com/u/35101372?v=4","gravatar_id":"","url":"https://api.github.com/users/Trace-2","html_url":"https://github.com/Trace-2","followers_url":"https://api.github.com/users/Trace-2/followers","following_url":"https://api.github.com/users/Trace-2/following{/other_user}","gists_url":"https://api.github.com/users/Trace-2/gists{/gist_id}","starred_url":"https://api.github.com/users/Trace-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trace-2/subscriptions","organizations_url":"https://api.github.com/users/Trace-2/orgs","repos_url":"https://api.github.com/users/Trace-2/repos","events_url":"https://api.github.com/users/Trace-2/events{/privacy}","received_events_url":"https://api.github.com/users/Trace-2/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T13:35:33Z","updated_at":"2018-03-01T13:35:33Z","author_association":"NONE","body":"**@kimocoder**  ... a member on the kali forum has claimed to have compared and found some discrepancy between the 4.3.20, 4.3.21 and 5.1.5 drivers at the bottom of this post:\r\n\r\nhttps://forums.kali.org/showthread.php?38574-Old-AWUS036H-vs-new-AWUS036ACH-performance-comparison\r\n\r\nHere's the code comparison:\r\n```\r\n\r\n        **MASTER 4.3.20**\r\n\r\n        static int usb_reprobe_to_usb3(PADAPTER Adapter)\r\n        {\r\n        \tstruct registry_priv  *registry_par = &Adapter->registrypriv;\r\n        \tint ret = _FALSE;\r\n        \t\r\n        \tif (registry_par->switch_usb3 == _TRUE) {\r\n\r\n\r\n        \t\tif (IS_HIGH_SPEED_USB(Adapter)) {\r\n        \t\t\tif ((rtw_read8(Adapter, 0x74) & (BIT(2)|BIT(3))) != BIT(3)) {\r\n        \t\t\t\trtw_write8(Adapter, 0x74, 0x8);\r\n        \t\t\t\trtw_write8(Adapter, 0x70, 0x2);\r\n        \t\t\t\trtw_write8(Adapter, 0x3e, 0x1);\r\n        \t\t\t\trtw_write8(Adapter, 0x3d, 0x3);\r\n        \t\t\t\t/* usb disconnect */\r\n        \t\t\t\trtw_write8(Adapter, 0x5, 0x80);\r\n        \t\t\t\tret = _TRUE;\r\n        \t\t\t}\r\n        \t\t} else if (IS_SUPER_SPEED_USB(Adapter))\t{\r\n        \t\t\trtw_write8(Adapter, 0x70, rtw_read8(Adapter, 0x70) & (~BIT(1)));\r\n        \t\t\trtw_write8(Adapter, 0x3e, rtw_read8(Adapter, 0x3e) & (~BIT(0)));\r\n        \t\t}\r\n\r\n\r\n\r\n        \t}\r\n        \treturn ret;\r\n        }\r\n\r\n\r\n        **4.3.20**\r\n\r\n        static int usb_reprobe_to_usb3(PADAPTER Adapter)\r\n        {\r\n        \tstruct registry_priv  *registry_par = &Adapter->registrypriv;\r\n        \tu8 ret = _FALSE;\r\n\r\n\r\n\r\n        #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A)\r\n        \tif (IS_HIGH_SPEED_USB(Adapter)) {\r\n        \t\tif ((rtw_read8(Adapter, 0x74) & (BIT(2)|BIT(3))) != BIT(3)) {\r\n        \t\t\trtw_write8(Adapter, 0x74, 0x8);\r\n        \t\t\trtw_write8(Adapter, 0x70, 0x2);\r\n        \t\t\trtw_write8(Adapter, 0x3e, 0x1);\r\n        \t\t\trtw_write8(Adapter, 0x3d, 0x3);\r\n        \t\t\t/* usb disconnect */\r\n        \t\t\trtw_write8(Adapter, 0x5, 0x80);\r\n        \t\t\tret = _TRUE;\r\n        \t\t}\r\n        \t\t\r\n        \t} else if (IS_SUPER_SPEED_USB(Adapter))\t{\r\n        \t\trtw_write8(Adapter, 0x70, rtw_read8(Adapter, 0x70) & (~BIT(1)));\r\n        \t\trtw_write8(Adapter, 0x3e, rtw_read8(Adapter, 0x3e) & (~BIT(0)));\r\n        \t}\r\n        #else\r\n        \trtw_hal_set_hwreg(Adapter, HW_VAR_USB_MODE, &ret);\r\n        #endif\r\n        \treturn ret;\r\n        }\r\n\r\n\r\n        **5.1.5**\r\n\r\n        static int usb_reprobe_switch_usb_mode(PADAPTER Adapter)\r\n        {\r\n        \tstruct registry_priv *registry_par = &Adapter->registrypriv;\r\n        \tHAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);\r\n        \tu8 ret = _FALSE;\r\n\r\n        \t/* efuse not allow driver to switch usb mode */\r\n        \tif (pHalData->EEPROMUsbSwitch == _FALSE)\r\n        \t\tgoto exit;\r\n\r\n        \t/* registry not allow driver to switch usb mode */\r\n        \tif (registry_par->switch_usb_mode == 0)\r\n        \t\tgoto exit;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n        \trtw_hal_set_hwreg(Adapter, HW_VAR_USB_MODE, &ret);\r\n\r\n        exit:\r\n\r\n        \treturn ret;\r\n        }\r\n```\r\n\r\n    "}}
{"actor":{"display_login":"Trace-2"}}