jurobystricky / Netgear-A6210

AC1200 High Gain WiFi USB Adapter Linux kernel driver
292 stars 155 forks source link

compiled&installed without any errors but the device doesnt start! #45

Open mail2onur opened 7 years ago

mail2onur commented 7 years ago

I recently bought EDUP EP-AC1601 wifi dongle and noticed that it doesn't work in Linux Mint 18, Kernel v4.4.0-36 This is such a shame because it performs so good in Win10 with excellent speed and quite high signal coverage.

I tried the drivers from EDUP's website, Mediatek website and i have failed to compile these drivers as you can guess and then i found this github page while searching on Google. This driver is the only one which gets complied and installed without any errors but unfortunately i couldn't make the wifi dongle work no matter what i tried. This is so strange because i didn't see any error while installing this driver.

I tried resetting network manager via terminal command, remove&insert the usb dongle, restarting pc but none helps. I don't see any activity in network manager. I can see the device getting removed and inserted via lsusb and dmesg commands but it doesn't call the necessary firmware from kernel to make it work.

Can anyone help me to get this work in Linux Mint 18 because i don't wanna use Win10 just to be able to connect to the internet!

mail2onur commented 7 years ago

I have managed to install the driver by adding my usb adapters VendorID and DeviceID into the file "rtusb_dev_id.c". Now my device shows up in network manager but the signal strength values are extremely low and it cannot find any signal at all. I get about 10% signal strength only if i bring my router by my computer but it disappears when i move it a bit away. Is the RX and TX parameters in that driver are incompatible with EDUPs device? I am wondering if there could be any chance for me to fix this issue by altering the driver files and make it get wifi signals properly.

This is the dmesg output after inserting the device to usb port;

[  269.654496] usb 9-4: new SuperSpeed USB device number 33 using xhci_hcd
[  269.673440] usb 9-4: New USB device found, idVendor=0e8d, idProduct=761b
[  269.673452] usb 9-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  269.673459] usb 9-4: Product: 802.11ac WLAN
[  269.673465] usb 9-4: Manufacturer: MediaTek Inc.
[  269.673470] usb 9-4: SerialNumber: 000000000
[  269.678578]
               === pAd = ffffc9000158f000, size = 1292952 ===

[  269.678591] driver version: 3.0.0.1 (Nov 29 2016 00:00:27) .
[  269.680184] ==>rlt_wlan_chip_onoff(): OnOff:1, Reset= 1, pAd->WlanFunCtrl:0x0, Reg-WlanFunCtrl=0x20a
[  269.706811] RtmpChipOpsEepromHook::e2p_type=0, inf_Type=2
[  269.706815] RtmpEepromGetDefault::e2p_dafault=1
[  269.707684] NVM is EFUSE mode
[  269.707693] Endpoint(8) is for In-band Command
[  269.707697] Endpoint(4) is for WMM0 AC0
[  269.707701] Endpoint(5) is for WMM0 AC1
[  269.707704] Endpoint(6) is for WMM0 AC2
[  269.707707] Endpoint(7) is for WMM0 AC3
[  269.707710] Endpoint(9) is for WMM1 AC0
[  269.707713] Endpoint(84) is for Data-In
[  269.707716] Endpoint(85) is for Command Rsp
[  269.708069] 80211> CurTxPower = 20 dBm
[  269.708075] ====> Radar Channel 52
[  269.708078] ====> Radar Channel 54
[  269.708080] ====> Radar Channel 56
[  269.708083] ====> Radar Channel 60
[  269.708086] ====> Radar Channel 62
[  269.708088] ====> Radar Channel 64
[  269.708091] ====> Radar Channel 100
[  269.708094] ====> Radar Channel 104
[  269.708099] 80211> TxStream = 0
[  269.736653] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  269.738560] -->RTUSBVendorReset
[  269.758657] <--RTUSBVendorReset
[  269.761603] ...........andes_usb_chk_crc
[  269.863565] andes_usb_reset_wmt
[  269.884439] -->RTUSBVendorReset
[  269.904529] <--RTUSBVendorReset
[  269.905317] fw version:0.0.00 build:1
[  269.905320] build time:201406241830____
[  269.905324] fw for E3 IC
[  269.905325] ilm length = 59312(bytes)
[  269.905326] dlm length = 32068(bytes)
[  269.907195] loading fw........
[  269.974332] cfg_mode=5
[  269.974483] Key1Str is Invalid key length(0) or Type(0)
[  269.974494] Key2Str is Invalid key length(0) or Type(0)
[  269.974505] Key3Str is Invalid key length(0) or Type(0)
[  269.974516] Key4Str is Invalid key length(0) or Type(0)
[  269.974790] USBAggregation = 1
[  269.974793] 1. Phy Mode = 31
[  269.974794] NVM is Efuse and its size =1d[1e0-1fc]
[  270.064329] get_chl_grp:illegal channel (167)
[  270.064332] get_chl_grp:illegal channel (167)
[  270.064333] get_chl_grp:illegal channel (169)
[  270.064334] get_chl_grp:illegal channel (169)
[  270.064335] get_chl_grp:illegal channel (171)
[  270.064336] get_chl_grp:illegal channel (171)
[  270.064336] get_chl_grp:illegal channel (173)
[  270.064337] get_chl_grp:illegal channel (173)
[  270.071826] Country Region from e2p = ffff
[  270.109468] mt76x2_get_external_lna_gain::LNA type=0x0, BLNAGain=0xffffff8f, ALNAGain0=0xffffff88, ALNAGain1=0xffffffff, ALNAGain2=0xffffffff
[  270.109476] 2. Phy Mode = 31
[  270.109480] 3. Phy Mode = 31
[  270.110221] andes_usb_fw_init
[  270.499742] AntCfgInit: primary/secondary ant 0/1
[  270.499751] andes_load_cr:cr_type(2)
[  270.502989] ChipStructAssign(): MT76x2 hook !
[  270.502995] ---> InitFrequencyCalibration
[  270.502999] InitFrequencyCalibrationMode:Unknow mode = 3
[  270.503003] InitFrequencyCalibration: frequency offset in the EEPROM = 20
[  270.503006] <--- InitFrequencyCalibration
[  270.503024] RTMPSetPhyMode: channel is out of range, use first channel=1
[  270.503027] RTMPSetPhyMode: Update for STA
[  270.515494] MCS Set = ff ff 00 00 01
[  270.515863] 80211> re-init bands...
[  270.515868] 80211> CurTxPower = 20 dBm
[  270.515873] ====> Radar Channel 52
[  270.515876] ====> Radar Channel 54
[  270.515879] ====> Radar Channel 56
[  270.515881] ====> Radar Channel 60
[  270.515884] ====> Radar Channel 62
[  270.515887] ====> Radar Channel 64
[  270.515889] ====> Radar Channel 100
[  270.515892] ====> Radar Channel 104
[  270.515898] 80211> TxStream = 2
[  270.515914] Chan 167 (frq 5835):   not allowed!
[  270.515918] Chan 169 (frq 5845):   not allowed!
[  270.515921] Chan 171 (frq 5855):   not allowed!
[  270.515924] Chan 173 (frq 5865):   not allowed!
[  270.515927] Chan 184 (frq 4920):   not allowed!
[  270.515930] Chan 188 (frq 4940):   not allowed!
[  270.515933] Chan 192 (frq 4960):   not allowed!
[  270.515936] Chan 196 (frq 4980):   not allowed!
[  270.515939] Chan 208 (frq 6040):   not allowed!
[  270.515942] Chan 212 (frq 6060):   not allowed!
[  270.515945] Chan 216 (frq 6080):   not allowed!
[  270.515949] RTMPDrvOpen(1):Check if PDMA is idle!
[  270.516250] RTMPDrvOpen(2):Check if PDMA is idle!
[  270.517328] CFG80211DRV_IoctlHandle: CMD_RTPRIV_IOCTL_80211_NETDEV_EVENT
[  270.565986] andes_usb_erasefw
[  270.566360] ==>rlt_wlan_chip_onoff(): OnOff:0, Reset= 0, pAd->WlanFunCtrl:0x20b, Reg-WlanFunCtrl=0x20b
[  270.568738] receive cmd msg fail(-2)
[  270.568758] tx_kickout_fail_count = 0
[  270.568759] tx_timeout_fail_count = 0
[  270.568760] rx_receive_fail_count = 0
[  270.568761] alloc_cmd_msg = 10
[  270.568761] free_cmd_msg = 10
[  270.621902] RTMP_TimerListRelease: release timer obj ffffc900016114b0!
[  270.621911] RTMP_TimerListRelease: release timer obj ffffc90001611528!
[  270.621915] RTMP_TimerListRelease: release timer obj ffffc900016115a0!
[  270.621919] RTMP_TimerListRelease: release timer obj ffffc90001611438!
[  270.621923] RTMP_TimerListRelease: release timer obj ffffc900016112d0!
[  270.621926] RTMP_TimerListRelease: release timer obj ffffc90001611348!
[  270.621930] RTMP_TimerListRelease: release timer obj ffffc900015a2fa0!
[  270.621933] RTMP_TimerListRelease: release timer obj ffffc90001591d78!
[  270.621937] RTMP_TimerListRelease: release timer obj ffffc90001591df8!
[  270.621941] RTMP_TimerListRelease: release timer obj ffffc900015a3128!
[  270.621944] RTMP_TimerListRelease: release timer obj ffffc900015a2eb0!
[  270.621948] RTMP_TimerListRelease: release timer obj ffffc900015a30b0!
[  270.646746] ==>rlt_wlan_chip_onoff(): OnOff:1, Reset= 0, pAd->WlanFunCtrl:0x208, Reg-WlanFunCtrl=0x209
[  270.649796] -->RTUSBVendorReset
[  270.669842] <--RTUSBVendorReset
[  270.672787] ...........andes_usb_chk_crc
[  270.774000] andes_usb_reset_wmt
[  270.794875] -->RTUSBVendorReset
[  270.814966] <--RTUSBVendorReset
[  270.815625] fw version:0.0.00 build:1
[  270.815627] build time:201406241830____
[  270.815631] fw for E3 IC
[  270.815632] ilm length = 59312(bytes)
[  270.815633] dlm length = 32068(bytes)
[  270.817505] loading fw........
[  270.884704] cfg_mode=5
[  270.884840] Key1Str is Invalid key length(0) or Type(0)
[  270.884850] Key2Str is Invalid key length(0) or Type(0)
[  270.884860] Key3Str is Invalid key length(0) or Type(0)
[  270.884870] Key4Str is Invalid key length(0) or Type(0)
[  270.885113] USBAggregation = 1
[  270.885116] 1. Phy Mode = 31
[  270.885117] NVM is Efuse and its size =1d[1e0-1fc]
[  270.974765] get_chl_grp:illegal channel (167)
[  270.974768] get_chl_grp:illegal channel (167)
[  270.974769] get_chl_grp:illegal channel (169)
[  270.974769] get_chl_grp:illegal channel (169)
[  270.974770] get_chl_grp:illegal channel (171)
[  270.974771] get_chl_grp:illegal channel (171)
[  270.974772] get_chl_grp:illegal channel (173)
[  270.974773] get_chl_grp:illegal channel (173)
[  270.982272] Country Region from e2p = ffff
[  271.019902] mt76x2_get_external_lna_gain::LNA type=0x0, BLNAGain=0xffffff8f, ALNAGain0=0xffffff88, ALNAGain1=0xffffffff, ALNAGain2=0xffffffff
[  271.019911] 2. Phy Mode = 31
[  271.019914] 3. Phy Mode = 31
[  271.020645] andes_usb_fw_init
[  271.410803] AntCfgInit: primary/secondary ant 0/1
[  271.410813] andes_load_cr:cr_type(2)
[  271.414052] ChipStructAssign(): MT76x2 hook !
[  271.414423] ---> InitFrequencyCalibration
[  271.414427] InitFrequencyCalibrationMode:Unknow mode = 3
[  271.414431] InitFrequencyCalibration: frequency offset in the EEPROM = 20
[  271.414434] <--- InitFrequencyCalibration
[  271.414455] RTMPSetPhyMode: channel is out of range, use first channel=1
[  271.414458] RTMPSetPhyMode: Update for STA
[  271.426556] MCS Set = ff ff 00 00 01
[  271.426923] 80211> re-init bands...
[  271.426928] 80211> CurTxPower = 20 dBm
[  271.426933] ====> Radar Channel 52
[  271.426936] ====> Radar Channel 54
[  271.426939] ====> Radar Channel 56
[  271.426942] ====> Radar Channel 60
[  271.426945] ====> Radar Channel 62
[  271.426947] ====> Radar Channel 64
[  271.426950] ====> Radar Channel 100
[  271.426953] ====> Radar Channel 104
[  271.426959] 80211> TxStream = 2
[  271.426975] Chan 167 (frq 5835):   not allowed!
[  271.426978] Chan 169 (frq 5845):   not allowed!
[  271.426981] Chan 171 (frq 5855):   not allowed!
[  271.426984] Chan 173 (frq 5865):   not allowed!
[  271.426987] Chan 184 (frq 4920):   not allowed!
[  271.426990] Chan 188 (frq 4940):   not allowed!
[  271.426993] Chan 192 (frq 4960):   not allowed!
[  271.426996] Chan 196 (frq 4980):   not allowed!
[  271.426999] Chan 208 (frq 6040):   not allowed!
[  271.427002] Chan 212 (frq 6060):   not allowed!
[  271.427005] Chan 216 (frq 6080):   not allowed!
[  271.427009] RTMPDrvOpen(1):Check if PDMA is idle!
[  271.427309] RTMPDrvOpen(2):Check if PDMA is idle!
[  271.453970] 80211> CFG80211_OpsPmksaFlush ==>
[  271.548184] TX0 power compensation = 0x38
[  271.548928] TX1 power compensation = 0x38
mail2onur commented 7 years ago

I have read the readme files and i saw that it is possible to adjust TX and RX values from Linux terminal iwpriv command if it`s enabled in config.mk file before compiling it; https://github.com/jurobystricky/Netgear-A6210/blob/master/doc/sta_ate_iwpriv_usage.txt

I have added necessary parameters ("HAS_ATE=y" and "HAS_QA_SUPPORT=y") into config.mk file but then i couldn't compile the driver due to an error. It says "no rule to make target" :/

CC [M]  /home/onur/Netgear-A6210-master/os/linux/../../ate/common/rt_ate.o

make[2]: *** No rule to make target '/home/onur/Netgear-A6210-master/os/linux/../../ate/common/rt_qa.o', needed by '/home/onur/Netgear-A6210-master/os/linux/mt7662u_sta.o'.  Stop.
Makefile:1396: recipe for target '_module_/home/onur/Netgear-A6210-master/os/linux' failed
make[1]: *** [_module_/home/onur/Netgear-A6210-master/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-21-generic'
Makefile:59: recipe for target 'debug' failed
make: *** [debug] Error 2

Can anyone help me about this? or rather than trying to use iwpriv command, where are these RX&TX values are stored, in which file? Is it possible for me to tweak those without frying the chip?

LidiaGarrucho commented 7 years ago

I have a Mediatek USB wifi with Vendor ID 0x0e8d and device ID 0x761b. I've been trying several drivers and none worked except this one, but with the same problem than you (extreme low received power). I manage to connect to the hotspot, even to ping it, but I loose 4/5 of all packets. As the received power is low, maybe there is a problem in the values that configure the AGC of the RX chain. I did a dmesg and it showed these interesting lines:

[ 1345.195773] ERROR mt766u_sta:RTMPResumeMsduTransmission, R66CurrentValue=0... [ 1345.197058] 80211> Connect bssid f4:b8:a7:f1:90:d4 [ 1345.236012] PeerBeaconAtJoinAction(): HT-CtrlChannel=6, CentralChannel=>6 [ 1345.236013] PeerBeaconAtJoinAction(): Set CentralChannel=6 [ 1345.236015] AdjustChannelRelatedValue(): Input BW=0, rf_channel=6, vht_bw=1, Channel=6, vht_cent_ch=6! [ 1345.285188] mt76x2_reinit_agc_gain:original agc_vga0 = 0x4a, agc_vga1 = 0x4a [ 1345.285195] mt76x2_reinit_agc_gain:updated agc_vga0 = 0x4a, agc_vga1 = 0x4a [ 1345.285532] mt76x2_reinit_hi_lna_gain:original hi_lna0 = 0x33, hi_lna1 = 0x33 [ 1345.285536] mt76x2_reinit_hi_lna_gain:updated hi_lna0 = 0x33, hi_lna1 = 0x33 [ 1345.285964] original vga value(chain0) = 4a [ 1345.286050] original vga value(chain1) = 4a [ 1345.286357] mt76x2_calibration(channel = 6)

Is there a way to change the mt76x2_reinit_agc_gain value, or to force a default value higher than the showed up?