Open ZerBea opened 8 months ago
If you plug it in and scan with iw, is it the same? I mean, without using hcxdumptool first.
Yes iw first, hcxdmptool second orhcxdumtool first and iw second, both results in the same problem.
First I thought the problem is related to this: https://bugzilla.kernel.org/show_bug.cgi?id=217205#c77 But that isn't the case.
That patch will only affect the RTL8188EU.
If the LED blinks, the chip thinks it's transmitting something.
I wonder if this device needs different initialisation tables because it's „high power”.
Can you compile this driver: https://github.com/Mange/rtl8192eu-linux-driver/ with a patch:
diff --git a/Makefile b/Makefile
index 8ecdb72..9548b64 100644
--- a/Makefile
+++ b/Makefile
@@ -92,10 +92,10 @@ CONFIG_ICMP_VOQ = n
CONFIG_IP_R_MONITOR = n #arp VOQ and high rate
########################## Debug ###########################
# Say "y" here to have the driver output debugging messages. Not intended for normal use.
-CONFIG_RTW_DEBUG = n
+CONFIG_RTW_DEBUG = y
# Default log level is 2, which only displays errors.
# Available levels = none(0), always(1), error(2), warning(3), info(4), debug(5), max(6)
-CONFIG_RTW_LOG_LEVEL = 2
+CONFIG_RTW_LOG_LEVEL = 4
######################## Wake On Lan ##########################
CONFIG_WOWLAN = n
#bit2: deauth, bit1: unicast, bit0: magic pkt.
And show what it prints? Let's say everything up to „RTW: rtw_hal_read_chip_info in 317 ms”.
The good old hal driver.
Here we go debug level 4:
[127890.483193] RTW: module init start
[127890.483201] RTW: rtl8192eu v5.6.4_35685.20191108_COEX20171113-0047
[127890.483203] RTW: rtl8192eu BT-Coex version = COEX20171113-0047
[127890.483223] RTW: rtw_inetaddr_notifier_register
[127890.483264] usbcore: registered new interface driver rtl8192eu
[127890.483265] RTW: module init ret=0
[127892.933790] usb 5-2.3: new high-speed USB device number 21 using xhci_hcd
[127893.027315] usb 5-2.3: New USB device found, idVendor=2357, idProduct=0126, bcdDevice= 2.00
[127893.027321] usb 5-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[127893.027324] usb 5-2.3: Product: 802.11n NIC
[127893.027325] usb 5-2.3: Manufacturer: Realtek
[127893.027327] usb 5-2.3: SerialNumber: 5091E3C3A656
[127893.079359] RTW:
usb_endpoint_descriptor(0):
[127893.079362] RTW: bLength=7
[127893.079364] RTW: bDescriptorType=5
[127893.079364] RTW: bEndpointAddress=84
[127893.079365] RTW: wMaxPacketSize=512
[127893.079366] RTW: bInterval=0
[127893.079367] RTW: RT_usb_endpoint_is_bulk_in = 4
[127893.079368] RTW:
usb_endpoint_descriptor(1):
[127893.079369] RTW: bLength=7
[127893.079370] RTW: bDescriptorType=5
[127893.079371] RTW: bEndpointAddress=5
[127893.079372] RTW: wMaxPacketSize=512
[127893.079372] RTW: bInterval=0
[127893.079373] RTW: RT_usb_endpoint_is_bulk_out = 5
[127893.079374] RTW:
usb_endpoint_descriptor(2):
[127893.079375] RTW: bLength=7
[127893.079375] RTW: bDescriptorType=5
[127893.079376] RTW: bEndpointAddress=6
[127893.079377] RTW: wMaxPacketSize=512
[127893.079378] RTW: bInterval=0
[127893.079378] RTW: RT_usb_endpoint_is_bulk_out = 6
[127893.079379] RTW:
usb_endpoint_descriptor(3):
[127893.079380] RTW: bLength=7
[127893.079381] RTW: bDescriptorType=5
[127893.079381] RTW: bEndpointAddress=87
[127893.079382] RTW: wMaxPacketSize=64
[127893.079383] RTW: bInterval=3
[127893.079384] RTW: RT_usb_endpoint_is_int_in = 7, Interval = 3
[127893.079385] RTW:
usb_endpoint_descriptor(4):
[127893.079385] RTW: bLength=7
[127893.079386] RTW: bDescriptorType=5
[127893.079387] RTW: bEndpointAddress=8
[127893.079388] RTW: wMaxPacketSize=512
[127893.079389] RTW: bInterval=0
[127893.079389] RTW: RT_usb_endpoint_is_bulk_out = 8
[127893.079390] RTW: nr_endpoint=5, in_num=2, out_num=3
[127893.079391] RTW: USB_SPEED_HIGH
[127893.079392] RTW: CHIP TYPE: RTL8192E
[127893.079700] RTW: read_chip_version_8192e 0xF0 = 0xc441135
[127893.079703] RTW: rtw_hal_config_rftype RF_Type is 2 TotalTxPath is 2
[127893.079706] RTW: Chip Version Info: CHIP_8192E_Normal_Chip_SMIC_B_CUT_2T2R_RomVer(0)
[127893.079707] RTW: _ConfigChipOutEP_8192E OutEpQueueSel(0x07), OutEpNumber(3)
[127893.080073] RTW: Boot from EFUSE, Autoload OK !
[127893.559321] RTW: HW EFUSE
[127893.559328] RTW: 0x000: 29 81 00 7C 01 40 03 00 70 34 04 50 14 00 00 00
[127893.559341] RTW: 0x010: 21 21 21 22 22 22 28 28 28 29 29 F0 00 EF FF FF
[127893.559354] RTW: 0x020: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559366] RTW: 0x030: FF FF FF FF FF FF FF FF FF FF 2D 2D 2D 2D 2D 2D
[127893.559378] RTW: 0x040: 2D 2D 2D 2D 2D F0 EF EF FF FF FF FF FF FF FF FF
[127893.559390] RTW: 0x050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559402] RTW: 0x060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559415] RTW: 0x070: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559427] RTW: 0x080: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559439] RTW: 0x090: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559451] RTW: 0x0A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559463] RTW: 0x0B0: FF FF FF FF FF FF FF FF A1 2F 1B 00 00 00 FF FF
[127893.559475] RTW: 0x0C0: FF 01 00 10 00 00 00 FF 00 00 31 FF FF FF FF FF
[127893.559488] RTW: 0x0D0: 57 23 26 01 E6 47 02 50 91 E3 C3 A6 56 09 03 52
[127893.559500] RTW: 0x0E0: 65 61 6C 74 65 6B 0D 03 38 30 32 2E 31 31 6E 20
[127893.559512] RTW: 0x0F0: 4E 49 43 00 FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559524] RTW: 0x100: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559536] RTW: 0x110: FF FF FF FF FF FF FF 0D 03 00 05 00 30 00 00 00
[127893.559549] RTW: 0x120: 00 93 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559561] RTW: 0x130: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559573] RTW: 0x140: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559585] RTW: 0x150: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559597] RTW: 0x160: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559609] RTW: 0x170: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559622] RTW: 0x180: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559634] RTW: 0x190: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559646] RTW: 0x1A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559658] RTW: 0x1B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559670] RTW: 0x1C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559682] RTW: 0x1D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559695] RTW: 0x1E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559707] RTW: 0x1F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[127893.559720] RTW: EEPROM ID=0x8129
[127893.559721] RTW: VID = 0x2357, PID = 0x0126
[127893.559723] RTW: Customer ID: 0x00, SubCustomer ID: 0xCD
[127893.559725] RTW: Hal_ReadPowerSavingMode8192E...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemoteWakeup(1)
[127893.559727] RTW: ### PS params=> power_mgnt(2),usbss_enable(0) ###
[127893.559730] RTW: EEPROMRegulatory = 0x1
[127893.559731] RTW: Board Type: Dongle or WIFI only Module
[127893.559732] RTW: Hal_EfuseParseBTCoexistInfo8192E: Disable BT-coex, wifi ant_num=2
[127893.559734] RTW: hal_com_config_channel_plan chplan:0x21
[127893.559735] RTW: crystal_cap: 0x2f
[127893.559737] RTW: ThermalMeter = 0x1b
[127893.559737] RTW: SWAS: bHwAntDiv = 0, TRxAntDivType = 0
[127893.559738] RTW: pHalData->ExternalPA_2G = 1 , pHalData->ExternalLNA_2G = 1
[127893.559739] RTW: pHalData->TypeGLNA is 0xa
[127893.559740] RTW: pHalData->rfe_type is 0x1
[127893.566313] RTW: kfree flag:0
[127893.566316] RTW: rtw_hal_read_chip_info in 487 ms
[127893.566322] RTW: init_channel_set((null)) ChannelPlan ID:0x21, ch num:13
[127893.566355] RTW: init_mlme_default_rate_set: support CCK
[127893.566356] RTW: init_mlme_default_rate_set: support OFDM
[127893.566469] RTW: NR_RECVBUFF: 8
[127893.566470] RTW: MAX_RECVBUF_SZ: 32768
[127893.566472] RTW: NR_PREALLOC_RECV_SKB: 8
[127893.566536] RTW: rtw_alloc_macid((null)) if1, mac_addr:ff:ff:ff:ff:ff:ff macid:1
[127893.566542] RTW: IQK FW offload:disable
[127893.566546] RTW: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1
[127893.566608] RTW: pwrctrlpriv.bSupportRemoteWakeup~~~~~~
[127893.566609] RTW: pwrctrlpriv.bSupportRemoteWakeup~~~[1]~~~
[127893.566611] RTW: can't get autopm:
[127893.566612] RTW: rtw_macaddr_cfg mac addr:50:91:e3:c3:a6:56
[127893.566614] RTW: bDriverStopped:True, bSurpriseRemoved:False, bup:0, hw_init_completed:0
[127893.566631] RTW: rtw_wiphy_alloc(phy10)
[127893.566632] RTW: rtw_wdev_alloc(padapter=000000007915ad04)
[127893.566638] RTW: rtw_wiphy_register(phy10)
[127893.566639] RTW: Register RTW cfg80211 vendor cmd(0x67) interface
[127893.566702] RTW: rtw_reg_notifier: NL80211_REGDOM_SET_BY_USER alpha2:DE
[127893.566704] RTW: rtw_set_country(): not applied
[127893.566751] RTW: rtw_ndev_init(wlan0) if1 mac_addr=50:91:e3:c3:a6:56
[127893.566814] RTW: rtw_ndev_notifier_call(wlan0) state:17
[127893.566996] RTW: cfg80211_rtw_get_txpower
[127893.567000] RTW: rtw_ndev_notifier_call(wlan0) state:5
[127893.567358] RTW: cfg80211_rtw_get_txpower
[127893.575092] rtl8192eu 5-2.3:1.0 wlp48s0f4u2u3: renamed from wlan0
[127893.624355] RTW: rtw_ndev_notifier_call(wlp48s0f4u2u3) state:11
[127896.836864] RTW: cfg80211_rtw_get_txpower
The idea to debug the (working) hal driver is great.
It prints useful information. rtl8xxxu is a bit lacking in that area.
This device definitely needs different initialisation tables:
[127893.559738] RTW: pHalData->ExternalPA_2G = 1 , pHalData->ExternalLNA_2G = 1
[127893.559739] RTW: pHalData->TypeGLNA is 0xa
[127893.559740] RTW: pHalData->rfe_type is 0x1
My cheap, small dongle from Aliexpress:
RTW: pHalData->ExternalPA_2G = 0 , pHalData->ExternalLNA_2G = 0
RTW: pHalData->TypeGLNA is 0x0
RTW: pHalData->rfe_type is 0xff
rtl8xxxu may already have all the code it needs for this device, but it's not enabled. You could try this simple patch:
diff --git a/rtl8xxxu_8192e.c b/rtl8xxxu_8192e.c
index 82c1365..0d5802f 100644
--- a/rtl8xxxu_8192e.c
+++ b/rtl8xxxu_8192e.c
@@ -32,6 +32,8 @@
#include "rtl8xxxu.h"
#include "rtl8xxxu_regs.h"
+#define EXT_PA_8192EU
+
static const struct rtl8xxxu_reg8val rtl8192e_mac_init_table[] = {
{0x011, 0xeb}, {0x012, 0x07}, {0x014, 0x75}, {0x303, 0xa7},
{0x428, 0x0a}, {0x429, 0x10}, {0x430, 0x00}, {0x431, 0x00},
@@ -521,6 +523,10 @@ static int rtl8192eu_identify_chip(struct rtl8xxxu_priv *priv)
if (!priv->ep_tx_count)
ret = rtl8xxxu_config_endpoints_no_sie(priv);
+#ifdef EXT_PA_8192EU
+ priv->hi_pa = 1;
+#endif
+
out:
return ret;
}
Unfortunately, this patch will break the „normal power” RTL8192EU devices.
Working like a charm - good starting point. Thanks
I've got a few of those rtl8192eu adapters ⭐ but lack of time atm
Good price-performance ratio. Good sensitivity. Working fine in combination with hcxdumptool.
All devices collected in rtl8xxxu is cheap, portable sized chips, affordable one..
TL-WN722n v1 was the well-known ath9k_htc. Downgrade
And the TP-Link TL-WN722N (v2) is impressive, too: https://github.com/ZerBea/hcxdumptool/discussions/361#discussioncomment-7551692
out of scope: Due to this feature request: https://github.com/ZerBea/hcxdumptool/discussions/382 and you issue report: https://github.com/ZerBea/hcxdumptool/issues/421
I decided to dive into the world of QpenWRT (on Raspberry Pi Zero).
So, I've run it down. The adapters must be set enabled in web gui btw, that was the block. I just finished flashing and run down now, great results 👍
So, I put the 1 chip in AP mode and number 2 chip in monitor, in gui. Fetching PMKIDs like a pro
Working like a charm - good starting point. Thanks
That's great. I will prepare a better patch „soon”. Wanna buy me a present? 😁 https://www.amazon.de/hz/wishlist/ls/1OCIJV31AAT9O/ref=nav_wishlist_lists_1
![Uploading 17070855513051806219693627920326.jpg…]()
@kimocoder What's that? I guess the picture didn't upload.
I started to add support of TP-Link TL-WN8200ND V3
https://www.tp-link.com/en/home-networking/high-gain-adapter/tl-wn8200nd/
added device to rtl8xxxu_core.c
$ sudo dmesg
So far so good, everything is looking fine and hcxdumptool is able to set monitor mode and channels:
Up to here, everything is still fine. We can set monitor mode and we can set a channel.
Unfortunately the device doesn't receive packets. Neither in monitor mode, nor by iw scan
The green LED flashes during scan, but that's all.
I'm sure I'm missing something, but I don't know what.
Any ideas to point me to the right direction?