Page 1 of 1

having trouble using the edimax wifi dongle to connect to pi

Posted: Fri Sep 04, 2015 6:31 pm
by JurgenRoman
I'm trying to use the edimax wifi dongle to connect to my raspberry pi 2 following this tutorial (I'm trying to make it a wifi hotspot to use it with the piui scripts):

http://www.daveconroy.com/turn-your-ras ... s-chipset/

/etc/network/interfaces :

Code: Select all

auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet manual

#auto wlan0  
#the author of the tutorial told to comment out every line with wlan0, but when i start up the pi i get the following message
#configuring network interfaces ... interface wlan0 does not exist!
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

#auto wlan1
#i also just commented out these because i didn't see any notice about wlan1 anywhere
#allow-hotplug wlan1
#iface wlan1 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
#am i bridging a wlan port i haven't configured??
/etc/hostapd/hostapd.conf :

Code: Select all

interface=wlan0
driver=rt1871xdrv
bridge=br0
ssid=JurgenPi
channel=1
wmm_enabled=0
wpa=1
wpa_passphrase=JurgPiPass
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn=pairwise=CCMP
auth_algs=1
macaddr_ac1=0


when booting my pi i get the following messages:
*FIXED* using "sudo apt-get remove dhcpcd5"
[FAIL] Not running dhcpcd because /etc/network/interfaces ... failed!
[FAIL] defines some interfaces that will use a dhcp client ... failed!

googling this i found out it had to use the following commands:
dpkg -l | grep dhcp (apparently it's an L not an I or a 1)
or
sudo update-rc.d isc-dhcp-server disable
both didn't work

also following this tutorial i was told to use:
sudo hostapd -dd /etc/hostapd/hostapd.conf
which resulted in the following errors:
*FIXED* line 2: invalid/unknown driver 'rt1871xdrv' (the current raspbian version already has the right drivers which it automatically detected and selected)
*FIXED* line8: invalid WPA passphrase length 6 (expected 8....63) (pass needed to be atleast 8 characters long)
*FIXED* line13: unknown configuration item 'macaddr_ac1' (changed to macaddr_acl)
*FIXED* WPA-PSK enabled, but PSK or passphrase is not configured (extending pass length fixed this)


this might help too:
*FIXED AFTER ABOVE FIXES*
on booting today it gave this message:
[...] configuring network interfaces ... interface wlan0 does not exist!
waiting for br0 to get ready (MAXWAIT is 32 seconds)
.....
DHCPDDISCOVER on br0 to 255.255.255.255 port 67 interval 4 (this line 5 more times with interval 11, 19, 7 ,13 and 7)
no DHCPOFFERS received
no working leases in persistent database - sleeping.
done


hope anyone can help

Re: having trouble using the edimax wifi dongle to connect t

Posted: Fri Sep 04, 2015 6:56 pm
by RobHenry
Just to be clear - are you trying to create a WiFi hotspot exactly as described in that tutorial? (It isn't clear from the subject or content of your post). The tutorial is more than two years old - that is an aeon in terms of development of the raspberry pi software and drivers so there may be a lot that has changed since it was written.

How far through the tutorial have you got when the problem occurs? Please provide the content of /etc/network/interfaces and any other configuration files that you have changed - this will help make it possible for people to help with your problem.

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sat Sep 05, 2015 9:26 am
by JurgenRoman
RobHenry wrote:Just to be clear - are you trying to create a WiFi hotspot exactly as described in that tutorial? (It isn't clear from the subject or content of your post). The tutorial is more than two years old - that is an aeon in terms of development of the raspberry pi software and drivers so there may be a lot that has changed since it was written.

How far through the tutorial have you got when the problem occurs? Please provide the content of /etc/network/interfaces and any other configuration files that you have changed - this will help make it possible for people to help with your problem.
Updated the post (was made in a rush yesterday), hope this clarifies some things.
I did the whole tutorial when this problem occured.

There is a comment on the tutorial that is from 2015 that states that it still works (but i don't know this persons software versions ofcourse)

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sat Sep 05, 2015 11:57 am
by RobHenry
You may have a conflicting dhcp server running. One of the commands you mention was diagnostic, not a fix. What was output after you entered:

dpkg -l | grep dhcp

?

That command is intended to find any installed packages with dhcp in the name, the other command is intended to disable the dhcp server.

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sat Sep 05, 2015 1:07 pm
by JurgenRoman
RobHenry wrote:You may have a conflicting dhcp server running. One of the commands you mention was diagnostic, not a fix. What was output after you entered:

dpkg -l | grep dhcp

?

That command is intended to find any installed packages with dhcp in the name, the other command is intended to disable the dhcp server.
It returns:
ii dhcpcd5
ii isc-dhcp-client
ii isc-dhcp-common

Using apt-get remove dhcpcd5 i got rid of the error.
Still no connection available tho and still 2 errors in hostapd.conf

Going to search for the driver and what is wrong with macaddr_ac1 now

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sun Sep 06, 2015 9:32 am
by JurgenRoman
Can't find out what's wrong with the driver or with macaddr_ac1

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sun Sep 06, 2015 11:56 am
by RobHenry
It might be useful to post the issues that you are still seeing. What have you done to investigate any problems with the driver? Use command lsmod to see if the kernel has got the driver loaded. ifconfig and iwconfig could also be useful to show the current state of the wifi adaptor and network.

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sun Sep 06, 2015 1:30 pm
by JurgenRoman
RobHenry wrote:It might be useful to post the issues that you are still seeing. What have you done to investigate any problems with the driver? Use command lsmod to see if the kernel has got the driver loaded. ifconfig and iwconfig could also be useful to show the current state of the wifi adaptor and network.
lsusb:
bus 001 device 005: ID 7392:7811 Edima technology Co., Ltd EW-7811Un 802.11n Wireless Adapter (Realtek RTL8188CUS)

lsmod:
bridge 93064 0
stp 1479 1 bridge
llc 1479 2 stp, bridge
ipv6 339514 29 bridge
8192cu 528485 0

ifconfig:
(it gives a lot of information with a lot of zeros, i'll share some :P (don't know what info you precisely need)
br0 link encap: Ethernet
eth0 link encap Ehternet
lo link encap Local Loopback
wlan0 link encap Ethernet

iwconfig:
br0 no wireless extensions
wlan0 unassociated Nickname "<[email protected]>"
mode: auto frequency=2,412 GHz Acces Point: Not-Associated
everything else is off or 0
lo no wireless extensions
eth0 no wireless extensions

Re: having trouble using the edimax wifi dongle to connect t

Posted: Sun Sep 06, 2015 2:35 pm
by JurgenRoman
so i fixed a few things i think, because i think the pi already got the right driver automatically, i commented out the driver line and replaced the following:
macaddr_ac1 with macaddr_acl (another typo my bad)

I can now detect the device, but it can't connect yet in the way i want it to:

when i have my ethernet cable attached it works just fine (acts as a router)
when i don't have the ethernet cable attached it doesn't work (i can connect, but it never gives the check mark (connecting using a iphone 4s)

I tried removing the bridge and uncommenting the wlan0 lines in //network/interfaces (thought the bridge needed both the ethernet and the wlan so removing it might make the wlan work on it's own) this didn't change anything.

So that's one thing, another one is, I installed piui and started the piui_demo.py script
This loaded up and i tried to connect to 192.168.1.1 (in hosts i added "192.168.1.1 piui")
i couldn't connect, hope someone can help with this

Re: having trouble using the edimax wifi dongle to connect t

Posted: Thu Sep 10, 2015 6:48 am
by JurgenRoman
bump

Re: having trouble using the edimax wifi dongle to connect t

Posted: Thu Sep 10, 2015 7:59 pm
by RobHenry
It's not clear what your remaining problem is.

You say it works with the ethernet but not without. Since you are bridging the wireless connection to ethernet, how would you expect it to function without ethernet?

What error messages are you still receiving?

Re: having trouble using the edimax wifi dongle to connect t

Posted: Mon Sep 14, 2015 10:33 am
by JurgenRoman
RobHenry wrote:It's not clear what your remaining problem is.

You say it works with the ethernet but not without. Since you are bridging the wireless connection to ethernet, how would you expect it to function without ethernet?

What error messages are you still receiving?
Well the biggest problem is that I'm not getting clear errors. I tried it withouth the bridging (so just uncommenting wlan0 and commenting out br0), but still needed the ethernet cable.

The network is still available on my phone wifi list when i don't connect the ethernet cable, it's just that it never completely finishes connecting.

This is a very minor problem, the biggest one is that I can't get piui to work. I added "192.168.1.1 piui" to the hosts file and ran the demo file, but couldn't load up the webui.

Re: having trouble using the edimax wifi dongle to connect t

Posted: Thu Sep 17, 2015 6:46 am
by JurgenRoman
bump