OpenWrt Forum Archive

Topic: Edimax EW-7811Un - Micro Wireless-N USB adapter

The content of this topic has been archived between 27 Mar 2018 and 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

EW-7811 simple solution found!
I had exactly the same issue as described above - with very low data rates.  Basic hardware and OpenWRT software setup is the same - however I changed three things as I suspected that the two radios were interfering with each other.

1. physically separated the two radios by plugging the EW7811 into the end of a 50cm usb extension cable
2. ensuring the wifi channels are well apart - Ch1 and Ch13 in my case
3. reducing the TM02 transmit power to 10dBm from 20dBm
The biggest change was when adding the usb extension cable.

My setup = iMac Ch13 (192,168.2..x) --> TM02 10dBm --> EW7811UN Ch1 / 20dBm (192.168.1.x) --> Netgear WNDR3700 --> Virginmedia Broadband

Data rates using www.speedtest.net:
1.  iMac direct to Netgear broadband router = 81.4 / 11.1 Mbps
2. EW7811 plugged directly into TM02 (Ch1 / Ch6 20dBm) = 2.8 / 0.99 Mbps
3. EW7811 plugged into 50cm USB2 extension cable (Ch1 / Ch13 10dBn) = 17.3 / 3.9 Mbps

This is now a very workable travel router.

There seems to be cheaper versions in the same style on ebay for $3, just search for rtl8188CUS.

Anyone tried the non-branded ones?

RangerZ wrote:

I have configured an Edimax EW-7811Un as a second wireless device on a HooToo TM-02 travel Router (CC RC2).  It is so tiny that one will barely notice it is attached, and there is no need to remove it (other than to use a thumb drive).  Available in the $10 range.
http://www.edimax.com/edimax/merchandis … /ew-7811un
.


RangerZ - i've ready just about every post in wingspinners post and now yours. I'm trying to achieve your exact setup (so that my chromecast and ftv stick can reach servers at home when traveling).

There's a lot of info - and i'm still a little lost. Did you upgrade using Wingspinner's factory image, and then go to cc rc2? or do you follow his instructions, but just supply the cc rc2 .bin file on the upgrade step? I'm new to OpenWRT, so apologize for the nooby-ness.

I upgraded from the factory image using wingspinners files, which I believe is the only way to do this.  I do not see a *factory.bin file.  I then just used the firmware upgrade in Luci to install the CC image.  The latest is here.  https://downloads.openwrt.org/chaos_cal … ps/rt305x/

I am not clear on exactly what you are trying to do.  I do not stream from home.  I download files and play locally.  To much variability in connection speed.  While I can hit the 4Mbps with my setup, I also have had connections of a lot less (~200Kbps).  Also to be fair, while I have no issue with the EdiMAX, others do.  If you can deal with the pain and run a single radio, you may get faster VPN speeds.

I am also hitting the wall on this device with flash and memory.  I think that there are some other choices like the GL.inet 6416 or AR150 with twice the flash and memory.  The 6416 FW is available from OpenWRT for you to use or build.  The newer AR150 only form the vendor.  Search on these models in the posts.  See the table of hardware and filter by device type travel.http://wiki.openwrt.org/toh/views/toh_extended_all

RangerZ wrote:

I upgraded from the factory image using wingspinners files, which I believe is the only way to do this.  I do not see a *factory.bin file.  I then just used the firmware upgrade in Luci to install the CC image.  The latest is here.  https://downloads.openwrt.org/chaos_cal … ps/rt305x/

I am not clear on exactly what you are trying to do.  I do not stream from home.  I download files and play locally.  To much variability in connection speed.  While I can hit the 4Mbps with my setup, I also have had connections of a lot less (~200Kbps).  Also to be fair, while I have no issue with the EdiMAX, others do.  If you can deal with the pain and run a single radio, you may get faster VPN speeds.

I am also hitting the wall on this device with flash and memory.  I think that there are some other choices like the GL.inet 6416 or AR150 with twice the flash and memory.  The 6416 FW is available from OpenWRT for you to use or build.  The newer AR150 only form the vendor.  Search on these models in the posts.  See the table of hardware and filter by device type travel.http://wiki.openwrt.org/toh/views/toh_extended_all


Thanks for your reply. After I posted, I decided to take the plunge and loaded wingspinners files. Then did exactly what you said, and updated to the RC 2 version. [openwrt-15.05-rc2-ramips-rt305x-ht-tm02-squashfs-sysupgrade.bin]

That seemed to all go without a hitch.

However, right now I can't seem to get into the LUCI interface. It seems like I can still connect via putty, but can't seem to actually login (root w. blank password did not work). My computer, connected to the hootoo does get a DHCP ip address, so I can assume I haven't totally borked it yet.

As for the streaming and speed away from home, I understand that speeds will be lower, etc. It's a BONUS if i can stream hd quality stuff from say Emby or whatnot. BUT, not mandatory. If I can get my kid's shows (lower quality stuff) streamed, I'd be happy. I actually had an edi-max laying around from a few years ago, so there was no additional cost. If it works, GREAT! if not, meh nothing lost other than time.

I recently went on a cruise and the hootoo was useful, but now i need MORE - of course.

I also saw someone having instructions on doing similar with tp-link unit. newegg has them for $12 on refurb - i'm tempted to bite on that as well.

EDIT:

I found that I need to use TELNET and not SSH and got right in. I'm thinking i DO need to install luci, as it's not installed by default?

(Last edited by AxeBro on 26 Oct 2015, 16:56)

Sounds like you have the situation in hand
http://wiki.openwrt.org/doc/howto/firstlogin
If I recall correctly there is no Luci in RC2, but there is in RC3 and final.  I am on RC3, but only because I do not wish to reconfigure it all.  I would go to CC15.05 final.

RangerZ wrote:

Sounds like you have the situation in hand
http://wiki.openwrt.org/doc/howto/firstlogin
If I recall correctly there is no Luci in RC2, but there is in RC3 and final.  I am on RC3, but only because I do not wish to reconfigure it all.  I would go to CC15.05 final.


yeap - got on irc and ppl helped me out. i got to stable now.

now i need to figure out the getting kmod-rtl8192cu installed.

System=>Software= Hit the update packages button
Select the "Available Packages" button.
Search for the kmod-rtl8192cu
Select install

so i was seeing the slowness and said - this cannot work. and was about to give in then i remembered the extention tip above and BOOM i'm getting 5mbit on average, up and down. no openvpn on here yet. that's phase ii

RangerZ wrote:

System=>Software= Hit the update packages button
Select the "Available Packages" button.
Search for the kmod-rtl8192cu
Select install


thanks - i did it manually via ssh. would've preferred gui had i seen this first!

RangerZ wrote:

I honestly think the whole OpenVPN solution is too fragile for the average user.

I have to wholeheartedly agree with this. While I consider myself above average with this stuff, I am struggling with a lot of things (speed being one of them).

I tried a different model (tplink wr710) and it's just about the same. With that, I can't seem to get the edimax recognized as an interface. so if you move to another hotel (or even another AP with a BSSID), it all falls apart. for now i just have a script that copies blank network and wireless config on startup.

On the tplink, if you do manage to join a new network and accidentally leave the "replace wireless config" checked, bam, locked out again, no internal wifi lan available.

I have like 3 "versions" of backups hopefully 3 months from now when i'm on the road i remember what i did and which backup to apply for what situation.

Seems like it's still pie in the sky dream, at least for me.

Can you please make your script for blanking the wireless available.  I think this will help a lot of users.  Please also include instructions on how to configure it.

RangerZ wrote:

Can you please make your script for blanking the wireless available.  I think this will help a lot of users.  Please also include instructions on how to configure it.


it's not that complicated... but it's not elegant either. However, it works :-)


I posted it on another site [https://www.digitalreplica.org/2014/10/ … cy-shield/] here's the jist of it:


--SNIP--
This is my very basic setup, for now:
I went in, and deleted the client network. then used scp to duplicate /etc/config/wireless and /etc/config/network to *.stock.

for right now, the easiest way was to go into the System –> startup and put these lines in:

cp /etc/config/wireless.stock /etc/config/wireless
cp /etc/config/network.stock /etc/config/network

that wipes out the config each time.

then i created to more “profiles” one for my cell phone’s wifi hotspot and one for my wife’s cell phone hotspot. so i just change that command to start up blank or pre-authed to either hotspot.

Now, this all works before any of the VPN stuff. i’m going to get all that working and see what else i need to do. I’m guessing i’d have to create new “stock” files that include all the VPN stuff.

---SNIP---

RangerZ wrote:

Can you please make your script for blanking the wireless available.  I think this will help a lot of users.  Please also include instructions on how to configure it.

updated it to have a bit of smarts. check if wlan route works [thanks P0g0 @ #openwrt].
if it works, our wifi config is good. make a copy of current set as "last known good".
if it doesn't, then try the last known good version.
if that doesn't work, fail out and just return back to the "stock" versions. You probalby changed hotels or switched APs.

I'm not smart enough, but it would be great if we could ignore the BSID - for moving around the hotel. That's still not something I can solve.


LAST KNOWN GOOD: This is if you unplug to move it etc within hotel room, you don't have to reconfig it. My previous version blanked it out every time. so it was a PITA-


 

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

LOG_FILE="/var/log/syslog"

sleep 10
    if grep wlan0 /proc/net/route >> /dev/null; then        #no route found previously had: ping -q -c 2 8.8.8.8 >> /dev/null 
    
        printf "$LOG_TIME $0: WLAN TEST: Route was good - KEEPING NETWORK, Attempting VPN %s\n" | tee -a $LOG_FILE
        cp /etc/config/wireless /etc/config/wireless.LKG    #Create Last Known Good WiFi
        cp /etc/config/network /etc/config/network.LKG        #Create Last Known Good WiFi
        
        #start vpn
        /etc/init.d/openvpn start
        
    else #no route, network not found, try LKG, if failed, return to stock, so wifi iface stays up. 
        printf "$LOG_TIME $0: WLAN TEST: Route was bad - trying LAST KNOWN GOOD %s\n" | tee -a $LOG_FILE
     
        cp /etc/config/wireless.LKG /etc/config/wireless    #copy LKG info 
        cp /etc/config/network.LKG /etc/config/network        #copy LKG info
        /etc/init.d/network restart                            #restart networking services
        sleep 10
        
        if grep wlan0 /proc/net/route >> /dev/null; then      #Last Known Good worked!
            printf "$LOG_TIME $0: WLAN TEST: Last Known Good worked! - attempt VPN %s\n" | tee -a $LOG_FILE
            sleep 10
            #start vpn
            /etc/init.d/openvpn start
        else    #LKG failed! just go back to stock then     
            printf "$LOG_TIME $0: WLAN TEST: Last Known Good FAILED! - going back to stock %s\n" | tee -a $LOG_FILE
            cp /etc/config/wireless.stock.w.openvpn.ht /etc/config/wireless
            cp /etc/config/network.stock.w.openvpn.ht /etc/config/network
            /etc/init.d/network restart                            #restart networking services
        fi
        
    fi
exit 0

Thanks for the update

I have been working with this tool recently. 
http://www.gl-inet.com/forums/topic/wif … post-11953
It uses a text file to store the wireless configs, and checks them at a user defined interval.  If there is no wifi on the current config it works through the list looking for one that works (automatically!!).  If no wifi is found it disables the current config so the WLAN works. You can manually add a AP, and I have to remove the BSSID for it.

It seems to work well, but there is one issue (reboot) but I have a work around for it.

I think the way you check may be technically better, but really outside my skill set.  Yours works with files, wifiMgr is editing the wireless file directly.

I am curious why you have opted to start OpenVPN in the script.  I am of the opinion OpenVPN, if enabled and started, will keep checking until if finds a connection.  I have not yet tested OpenVPN with the above.

BTW, I replaced the EDImax with a Buffalo WLIUCGN and get about twice the speed (no cable).  I also run the above solution on a single radio (not tested with 2) and really have no problems.  The issue the second radio solved is fixed in the code.

RangerZ wrote:

Thanks for the update

I have been working with this tool recently. 
http://www.gl-inet.com/forums/topic/wif … post-11953
It uses a text file to store the wireless configs, and checks them at a user defined interval.  If there is no wifi on the current config it works through the list looking for one that works (automatically!!).  If no wifi is found it disables the current config so the WLAN works. You can manually add a AP, and I have to remove the BSSID for it.

It seems to work well, but there is one issue (reboot) but I have a work around for it.

I think the way you check may be technically better, but really outside my skill set.  Yours works with files, wifiMgr is editing the wireless file directly.

I am curious why you have opted to start OpenVPN in the script.  I am of the opinion OpenVPN, if enabled and started, will keep checking until if finds a connection.  I have not yet tested OpenVPN with the above.

BTW, I replaced the EDImax with a Buffalo WLIUCGN and get about twice the speed (no cable).  I also run the above solution on a single radio (not tested with 2) and really have no problems.  The issue the second radio solved is fixed in the code.


Thanks - i am going to try that. I'd love to get this to work with my CableWifi that's everywhere. Then I can hide this in the car, and always have a firewalled, vpn'd device for occupants.

what's the issue with reboot? you lose the config?

i don't understand what you mean about "wireless file directly"..?

The openvpn is lack of knowledge. I thought openvpn will stop trying after a while. So i disabled the init script and just fire it up after i've confirmed a wifi association. I was manually doing that (did the mod that you posted on the previous page) and so figured once I did this auto seek bit, I'd add openvpn start as well... if that makes sense.

The reboot issue is benign, and nothing gets corrupt (that I know of).  You can use reboot -f to get it to reboot.  I have a fix, but not posted it yet.  Soon..

One approach directly does a copy and replace to the file.  The other is an edit to the file itself. 

Re VPN, no harm to your approach, but I do not think it is needed.  Test.  BTW, I think you might want to check out luci-app-commands.  You can create buttons for shell commands.  I find that the initscripts and Services=> OpenVPN controls are not entirely reliable.

welp - my setup DOES NOT work, i hard coded google DNS all over the place - and now all captive portals fail. I tried to revert to and undo the damage, but something is still amiss. i might have to scrap and start all over. looking into your solution now.

Is there a question?

There is only 1 place to configure DNS and it is not intuitive or well documented.

Network => Select WAN interface => EDIT
Advanced Settings
Uncheck "Use DNS servers advertised by peer"
A new field opens up " Use custom DNS server"
Enter your values.
Save and apply

Setting this in the LAN => General Setup => Use Custom DNS is wrong
Setting this in DHCP and DNS =>General Settings => DNS Forwarding is wrong

You may want to google free dns servers and find something closer or more appropriate to your needs.

The discussion might have continued from here.