SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Wifi / Hardwire

Fri Jan 22, 2016 11:06 pm

Is there a way to configure my etc/network/interfaces file to work with my wifi dongle plugged in an access point and a hardwired internet line plugged in to the ethernet adapter? I have all the proper 8188eu drivers and hostapd installed for the wifi access point. I just can't get both the AP and the hard wire to work at the same time.

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi / Hardwire

Fri Jan 22, 2016 11:23 pm

SpaceCowboy wrote:Is there a way to configure my etc/network/interfaces file to work with my wifi dongle plugged in an access point and a hardwired internet line plugged in to the ethernet adapter? I have all the proper 8188eu drivers and hostapd installed for the wifi access point. I just can't get both the AP and the hard wire to work at the same time.
Take a look here. http://www.daveconroy.com/turn-your-ras ... s-chipset/. This is for the 8192cu/8188cu driver but I would also expect it to work for the 8188eu driver.



MrEngman
Last edited by MrEngman on Fri Jan 22, 2016 11:48 pm, edited 1 time in total.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Re: Wifi / Hardwire

Fri Jan 22, 2016 11:29 pm

The link you provided points back to the this post. Maybe you copy/pasted the incorrect link?

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi / Hardwire

Fri Jan 22, 2016 11:49 pm

SpaceCowboy wrote:The link you provided points back to the this post. Maybe you copy/pasted the incorrect link?
Oops. :oops: Take another look. Should be the right one now.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Re: Wifi / Hardwire

Sat Jan 23, 2016 12:27 am

That's the post I've used for setting up the AP. However, I never applied the bridge. Looks like that was the trick in getting both the dongle and hardwired ethernet to work at the same time.

A further issue is that I can see the WiFi AP from an Android device, but its not allowing me to connect to it even though I'm using the correct pass phrase. Any thoughts on what I might look for?

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi / Hardwire

Sat Jan 23, 2016 1:22 am

SpaceCowboy wrote:That's the post I've used for setting up the AP. However, I never applied the bridge. Looks like that was the trick in getting both the dongle and hardwired ethernet to work at the same time.

A further issue is that I can see the WiFi AP from an Android device, but its not allowing me to connect to it even though I'm using the correct pass phrase. Any thoughts on what I might look for?
The Android will not connect if it doesn't get the right response to DHCP requests. This will require the AP's wired connection to be connected to a router that can supply the necessary DHCP responses.

You may need to check whether the Android is getting the necessary DHCP replies. For a start does the ifconfig command show the br0/eth0 connection is connected to your router?


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi / Hardwire

Sat Jan 23, 2016 1:27 am

EDIT: Just looked through the posts on the daveconroy tutorial for the AP and there are some reports of similar problems to yours and fixes. It may help to read through them.

You may get some further clues here http://www.daveconroy.com/using-your-ra ... eb-server/. Probably just need to ignore setting the web server.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Re: Wifi / Hardwire

Sat Jan 23, 2016 2:12 am

Okay... I'll look at some of the communications in the blog.

Thanks

SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Re: Wifi / Hardwire

Sat Jan 23, 2016 4:23 am

I got a little further using the other post from Dave Conroy.

However, I'm stuck with a silly error when I run the following command:
sudo /etc/init.d/isc-dhcp-server restart

Its stating that on line 25 its expecting a semicolon. The semicolon is present on that line. The line is:
option domain-name-servers 8.8.8.8, 8.8.4.4;

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi / Hardwire

Sat Jan 23, 2016 5:21 am

SpaceCowboy wrote:I got a little further using the other post from Dave Conroy.

However, I'm stuck with a silly error when I run the following command:
sudo /etc/init.d/isc-dhcp-server restart

Its stating that on line 25 its expecting a semicolon. The semicolon is present on that line. The line is:
option domain-name-servers 8.8.8.8, 8.8.4.4;
OK, I installed isc-dhcp-server on one of my Pi's. It generated a couple of error messages when I ran command sudo /etc/init.d/isc-dhcp-server restart but no error about a missing semicolon. I just used the file /etc/dhcp/dhcpd.conf as it was when installed.

I then edited the file and removed the semicolon at the end of line 17 max-lease-time 7200; so changed to max-lease-time 7200 I then ran command sudo /etc/init.d/isc-dhcp-server restart again and got the same error you got about line 25 - "/etc/dhcp/dhcpd.conf line 25: semicolon expected."

In the file I have line 25 is the first line with data, log-facility local7; after the line I edited and it has a semicolon at the end. I think the error really means the semicolon is missing on the line with data before line 25, in my case line 17 as above.

So I think you should look for the line before the one you posted option domain-name-servers 8.8.8.8, 8.8.4.4; which I think is where you will find the problem.

This is the first part of the file /etc/dhcp/dhcpd.conf and I have marked the line I removed the semicolon from and line 25 where it said semicolon expected.
#
# Sample configuration file for ISC dhcpd for Debian
#
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200 <------REMOVED the semicolon at the end of this line

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7; <--- error reported on this line number 25

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Re: Wifi / Hardwire

Sat Jan 23, 2016 4:08 pm

I found the offending line that didn't have the semicolon. Your feedback definitely helped.

Did you ever have any issues with DaveConroy's bridging? Upon boot, I'm getting a message that it can't add wlan0 to bridge br0: Operation not supported. I've double checked his site and I have all of the entries as he does.

Several websites discussing this subject state that you cant bridge a WiFi client. I highly doubt Dave would publish something without having been successful.

Thanks

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi / Hardwire

Sat Jan 23, 2016 5:45 pm

SpaceCowboy wrote:I found the offending line that didn't have the semicolon. Your feedback definitely helped.

Did you ever have any issues with DaveConroy's bridging? Upon boot, I'm getting a message that it can't add wlan0 to bridge br0: Operation not supported. I've double checked his site and I have all of the entries as he does.

Several websites discussing this subject state that you cant bridge a WiFi client. I highly doubt Dave would publish something without having been successful.

Thanks
No idea what "cant bridge a WiFi client" is about. Don't ever remember seeing that before. Hunting around on the internet it appears to be an issue connecting two Access Points via wifi rather than using cable.

I have used DaveConroy's tutorial several times to create an AP without any problems. I set up the AP exactly as described in the tutorial, connected the wired Ethernet port to my network and then was able to connect to the RPi wifi AP without problems.

I have not set it up with a DHCP server as DHCP is handled by my PC domain server controlling my network. If you've set up a dhcp server maybe that's causing the problem Just a guess though.

This is the expected network set up using the Pi as wifi AP

Code: Select all

                                 /------wifi client
router---eth0---RPi-AP---wifi---|-------wifi client
                                 \------wifi client
This may be the configuration that causes the "cant bridge a WiFi client" error but I'm not certain.

Code: Select all

                                    |------wired client
router---wifi---RPi-AP---eth0---switch-----wired client
                                    |------wired client
Found these http://superuser.com/questions/597834/b ... ot-working, http://www.tomsguide.com/us/how-to-wds- ... 253-2.html but don't know if they will help



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Wifi / Hardwire

Sat Jan 23, 2016 7:45 pm

Greetings.

This thread is interesting.

I have a topology like this:

Code: Select all

Internet --- on board eth0 --- Pi --- bridge br0 --- hostapd AP on wlan0 --- Wifi clients
                                          \______________ USB eth1 --------- Wired PC
It works.

The idea that bridge a client Wifi connection to a Ethernet LAN wasn't come to me. Although it would not work according to MrEngman's reference, I think it's clever idea anyway.

Here is a bridge FAQ: http://www.linuxfoundation.org/collabor ... ss_card.21
It says some wireless cards do not accept MAC address other than themselves in the source address field.

So let's saying there is a piece of data which is stamped with a Sender address and a Receiver address, I guess there are two rules here:

1 - An AP would only send data to those he knows. In other words, to get through the AP to client direction, the data's Receiver address must be someone the AP knows. However, as my topology works, I think the Sender address could be something the AP don't know.

2 - As we are making an AP with USB wireless card, we need a card that accept other's MAC address in its source field. In other words, the data's Sender address might not be the USB wireless card's address, however we need a card accepting it.

Rule 1 means the AP must be the edge of a network. So we can't connect another AP at the other end of the wireless link. (Those reference above all mentioning WDS, who works for such condition)

Rule 2 means you need a working USB card. I'm using a Realtek 8192eu one, I think the OP's 8188eu should also works as I see no reason why Realtek would limit that on its different product.

Anyway, we don't know OP's topology. It would help if OP post it.

I'm feeling that all those direction rules are come from the idea that forwarding packet at link layer, namely using a 802.3 bridge. I'm think that how about forwarding packet at network layer, namely using a router.

Let's saying we have this:

Code: Select all

AP ------ USB wireless card wlan0 --- Pi --- on board eth0 --- Wired clients
    \____ Some other wireless clients
If we run a bridge on Pi, those wireless clients can't get to wired clients, as the AP only knows Pi's wlan0.

However, I'm suggesting giving wlan0 and eth0 different address in different subnet, and enable IP packet forwarding on Pi.
So the wired clients would use eth0 as their gateway. Wireless clients use wlan0 as their gateway. AP have no useful IP address.
This plan might work :D . Although I didn't experiment it.

SpaceCowboy
Posts: 26
Joined: Tue Mar 17, 2015 3:43 pm

Re: Wifi / Hardwire

Sun Jan 24, 2016 9:17 pm

Are you suggesting to use WDS? Most all the blogs I've read in the last couple of days say that if WDS is used, the throughput would be cut in half. Don't know if this is factual as I haven't test and the fact that I'm too green in this area of technology to be confident I would even get it right. :roll:

At this point, I'm about ready to abort because it really doesn't serve my overall purpose. I was under the impression that a bridge would allow such a configuration as I was attempting.

In the long run, all I really need is to be able to have devices (such as Android based tablets/phones) be able to successfully connect to my Wi-Fi dongle as an AP where media can be streamed from my Pi2's SSD.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Wifi / Hardwire

Sun Jan 24, 2016 9:37 pm

My short story:

1 If you want bridge Pi AP with Ethernet, it would work.

2 If you want bridge Pi Wifi with Ethernet, it won't work. However it might also work if you make Pi become a router.

Return to “General discussion”