Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for AP+STA mode #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support for AP+STA mode #3

wants to merge 1 commit into from

Conversation

kerpz
Copy link

@kerpz kerpz commented Apr 29, 2015

Added support for AP+STA

@artixnous
Copy link

I'm using this code to operate a mt7601 usb dongle as an access point with great stability. However, I can only get speeds up to 54MBps. I have tried all kinds of options in /etc/Wireless/RT2870AP/RT2870AP.dat but I can't make it go faster. Am I missing something?

@eywalink
Copy link
Owner

eywalink commented Jun 1, 2015

I heart that before from the QQ Group I create. Means Somebody also met that.
I will ask my group members whether somebody have fix that issue.
The code still has much problem. I will share the official code later. Maybe it can help you.

@dafyk
Copy link

dafyk commented Jun 2, 2015

@archnous there are many setting in RT2870AP.dat affecting the speed. 54mbits suggests that you are running in 802.11G mode. Mandatory setting required to enable 802.11N mode are:

Set Wireless mode: 0=B/G, 1=B, 2=A, 4=G, 6=N, 7=G/N, 8=A/N, 9=B/G/N, 10=A/G/N, 11=N(5ghz)
WirelessMode=6
Basic rate (for 802.11N use 15): 1=1Mbps 2=2Mbps 3=1Mbps,2Mbps 4=5.5Mbps 15=1Mbps,2Mbps,5.5Mbps,11Mbps
BasicRate=15
Wi-Fi Multimedia (WMM): 0=off, 1=on
WmmCapable=1
Support channel width: 0=20MHz, 1=40MHz
HT_BW=1
Support Short/Long GI: 0=long (800nsec), 1=short (400nsec)
HT_GI=1
The Modulation and Coding Scheme (MCS): 0 ~15, 32: Fix MCS rate for HT rate, 33: Auto Rate Adaption, recommended.
HT_MCS=15

Packaged example config doesnt enable WmmCapable which si mandatory for 802.11N to work correctly.

@artixnous
Copy link

@eywalink Ok, thanks, I can also provide any test feedback you might need.
@dafyk I had already tried the settings you proposed, with the exception of HT_MCS=15. Setting that, fixed the card's TX rate to 6MBps.
Setting WirelessMode=6 makes the card deny association; modes 7, 8, 9, 10 and 11 with HT_MCS=33 work at 54MBps. Could you upload somewhere your RT2870AP.dat? Thanks.

@juanrasantana
Copy link

Hi archnous, all,

how do you do to use it as access point? Do you use hostapd? If so, could you share the config file?

Thanks,
Kirsath

@chenbd
Copy link

chenbd commented Jun 26, 2015

facing kernel oops when used on ubuntu 12.04 x86-064, anybody facing this issue?

@kerpz
Copy link
Author

kerpz commented Jun 29, 2015

@archnous @dafyk yup my AP mode run in 54Mbps too

@artixnous
Copy link

@Kirsath No hostapd. The driver code takes care of the AP functions and I only have dnsmasq dispersing IPs. The setup is very stable, only problem is it operates at 54MBps...

@colinbes
Copy link

Regarding "No hostapd. The driver code takes care of the AP functions and I only have dnsmasq dispersing IPs. The setup is very stable, only problem is it operates at 54MBps..." - please excuse the ignorance but how do you accomplish this without hostapd, do you set settings in RTxxxAP.dat file? and run iwconfig mode master, or something similar?

@artixnous
Copy link

The module puts automagically the card in master mode, no "iwconfig mode master" is necessary. It reads some settings (like ESSID and WPA passphrase) from the .dat file. What's left is to ifconfig an IP to the interface and use a dhcp daemon (like dnsmasq) for the clients. And some iptables for masquerading/forwarding.

@colinbes
Copy link

So what is recommend way to switch between managed and master modes - these need to be dynamically switchable.

@artixnous
Copy link

There isn't, AFAIK. One has to edit the makefile before compiling and recompile for STA. The modules are named differently in each case, rmmod mt7601ap and modprobe mt7601sta or whatstheirnames. Haven't tried STA though, only AP. There's a better, modern driver for STA though, see https://github.com/kuba-moo/mt7601u.

@colinbes
Copy link

Thanks, that clears that up for me. I had also looked at the link you provided but unfortunately it requires a later linux version than 3.8.13 on the beaglebone black.

@fernandordesa
Copy link

I'm using this code on Ubuntu 15.04 and it's working really well in 802.11n mode. But what I really need is to compile it for OpenWRT.
I found this code from @olivluca (https://github.com/olivluca/mt7601-openwrt), but it doesn't work as AP (only STA mode).
Any idea about how to compile mt7601ap for OpenWRT?
Thanks!

@cappiewu
Copy link

@dimastt
Copy link

dimastt commented Apr 25, 2016

Hi there. I Have Kalli 2.0 instaled when i pluged my usb dongle Ralink MT7601 Wireless card i got a wlan1 in iwconfig and only have support to monitor and managed type. Then i download driver from https://github.com/eywalink after i make make install driver appear in lsmod but don't activate and no changes in iw list command show only monitor and managed type.
dmesg show me mt7601Uap: module license unspecifueld taints kernel
please help me.

@dimastt
Copy link

dimastt commented Apr 26, 2016

Hi there. I Have Kalli 2.0 instaled when i pluged my usb dongle Ralink MT7601 Wireless card i got a wlan1 in iwconfig and only have support to monitor and managed type. Then i download driver from https://github.com/eywalink after i make make install driver appear in lsmod but don't activate and no changes in iw list command show only monitor and managed type. dmesg show me mt7601Uap: module license unspecifueld taints kernel please help me.

@iamashwin26
Copy link

Can some one please help me out with AP mode. I have compiled the driver with no issues , its loaded up as shown by lsmod but my tab cant find the SSID that i have set in RT2870AP.dat . can someone briefly give an instruction on how to set it up?

@sanzatou
Copy link

sanzatou commented Sep 1, 2016

Have a look there
You may need to manually add your own device's VID+PID to the file common/rtusb_dev_id.c before compiling.

@sanzatou
Copy link

sanzatou commented Sep 1, 2016

@archnous sorry for digging this up ... have you finally found out how to speed up your connexion ? I am running the same limitation so far ! THX for sharing

@artixnous
Copy link

@sanzatou I haven't, sorry.

@sanzatou
Copy link

sanzatou commented Sep 5, 2016

For those who are getting here, you are close ! Check your system log with dmesg. If you are given an error message of this type: Read file "/etc/Wireless/RT2870AP/RT2870AP.dat" failed(errCode=-1) then have a look there http://lo-li.net/tag/linux (use google to translate) ... basically, you need to edit the file src/os/linux/rt_linux.c, and to update the code of the method RtmpOSFileRead around line 1162 with this:
int RtmpOSFileRead(RTMP_OS_FD osfd, char *pDataPtr, int readLen) { DBGPRINT(RT_DEBUG_ERROR, ("add: %p %p\n", osfd->f_op, osfd->f_op->read)); /* The object must have a read method */ if (osfd->f_op /*&& osfd->f_op->read*/) { //return osfd->f_op->read(osfd, pDataPtr, readLen, &osfd->f_pos); return vfs_read(osfd, pDataPtr, readLen, &osfd->f_pos); } else { DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n")); return -1; } }
Compile once again, you're done !

@artixnous
Copy link

@sanzatou Hah! For a moment I thought this patch was to pump the dongle up to 150M. :-)

@iamashwin26
Copy link

iamashwin26 commented Oct 6, 2016

I have Ubuntu mate 16.04 so eth0 is renamed enp0s2 and ra0 as wlnxXXXXXX so the scripts (miwifi_work.sh) don't work for me even after I rename ra0 in the script to wlnxXXXXXX It throws some error with DHCP. (And yes I'm a noob and don't know what I'm doing or what i should do)
Tried this but when i try to install isc-dhcp3-server, I get “has no installation candidate”.
I think i have some conflicts with naming of eth0 and ra0 .
So "What's left is to ifconfig an IP to the interface and use a dhcp daemon (like dnsmasq) for the clients. And some iptables for masquerading/forwarding."
Which i dont understand to do . Can some one help me?
Heres my dmesg after insert the dongle:

 usb 1-5: new high-speed USB device number 6 using ehci-pci
 usb 1-5: New USB device found, idVendor=148f, idProduct=7601
usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 usb 1-5: Product: 802.11 n WLAN
usb 1-5: Manufacturer: MediaTek
usb 1-5: SerialNumber: 1.0
 usb 1-5: reset high-speed USB device number 6 using ehci-pci
mt7601u 1-5:1.0: ASIC revision: 76010001 MAC revision: 76010500
 mt7601u 1-5:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
 mt7601u 1-5:1.0: Warning: unsupported EEPROM version 0d
 mt7601u 1-5:1.0: EEPROM ver:0d fae:00
ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
rtnet7601Uap: Unknown symbol Rtmp_Drv_Ops_usb (err 0)
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

@abgoyal
Copy link

abgoyal commented Feb 5, 2017

@kerpz : I got this patch to work on my arm box, and the AP works fine. Does this patch enabled simultaneous use of AP and STA modes? If so, how do I configure the STA part?

@SCordibella
Copy link

@kerpz : I got this patch to work on my arm box, and the AP works fine. Does this patch enabled simultaneous use of AP and STA modes? If so, how do I configure the STA part?

Any news about that? I am also interested to let the MT7601 work with two interface like wlan0 and wlan1 one for the AP and the other for STA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.