HSF3232
Posts: 11
Joined: Sun Apr 23, 2017 9:06 pm

Request: a DUMB access point. (No DHCP.)

Sat Sep 02, 2017 11:54 pm

Okay, before i put start to write this up, i just want to throw this out there,
NO BLOGGERS APPROACH. So basically no copy-pasta allowed. What i am about to ask is a perfectly reasonable request and i will not tolerate anyone who trys to copy someone else's method. (Thank you google for being no help at all.)
If you can tell by my title, i want a ACCESS POINT! not a router, not a hotspot, a ACCESS POINT! And just in case you forgot, here is the CORRECT definition:
In computer networking, a wireless access point (WAP), or more generally just access point (AP), is a networking hardware device that allows a Wi-Fi device to connect to a wired network. The AP usually connects to a router (via a wired network) as a standalone device, but it can also be an integral component of the router itself.
Somewhere it got lost in translation, How did that happen? I don't know and i don't care.
So here is what is suppose to happen:
1. WiFI device connects to the AP. hostapd handles the connection and authenticates the device.
2. Device broadcasts DHCP request. The main router on the existing network. (I.E BT Home Hub 5 which handles my main network.) receives this request and gives the device a IP address. The device is now able to talk to the internet and other devices are able to talk to it.
The text i have highlighted in red, is the point of failure. The raspberry pi blocks the DHCP request from reaching the main network and every other guide does not tell me how to get around this. If someone can help me with this, i would be happy.

W. H. Heydt
Posts: 11116
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Request: a DUMB access point. (No DHCP.)

Sat Sep 02, 2017 11:59 pm

Actually, what you want is a bridge. Granted, a bridge where one side is wireless, but that's still a bridge. That said, Adafruit has a tutorial for setting up a Pi as an access point. just omit any parts that talk about setting up DHCP and Robert is your avuncular relative.

HSF3232
Posts: 11
Joined: Sun Apr 23, 2017 9:06 pm

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 12:07 am

W. H. Heydt wrote: Actually, what you want is a bridge. Granted, a bridge where one side is wireless, but that's still a bridge. That said, Adafruit has a tutorial for setting up a Pi as an access point. just omit any parts that talk about setting up DHCP and Robert is your avuncular relative.
Image
I think i seen the guide you mean. However, this guide you are talking about is very similar to the setups i have tried before. So this wont work. If it helps, i already tried leaving out the DHCP thing and it still does not work. You still have the problem of the raspberry pi not forwarding the DHCP requests. And let me remind you (Not that you probably need reminding.) that these requests are mac addressed based (As far as the connecting device is concerned.)

As far as the bridging goes, (not breeding, thank you autocorrect) i seen people having problems before with that. Whats make this any diffrent?


HSF3232
Posts: 11
Joined: Sun Apr 23, 2017 9:06 pm

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 1:06 pm

This solved the problem. Maybe i will keep the bridging utils on there.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 3:39 pm

I tried that tutorial, and it did not work for me with Raspbian/Stretch/Pixel. When I tried to add interfaces to the bridge, I got a "can't add wlan0 to bridge br0: Operation not supported" error message.

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 4:20 pm

With Stretch you may find your wlan0 has been renamed to wlx???????????? (where ???????????? is the mac address) take a look with an ip addr command.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

epoch1970
Posts: 3901
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 7:04 pm

SurferTim wrote:
Sun Sep 03, 2017 3:39 pm
When I tried to add interfaces to the bridge, I got a "can't add wlan0 to bridge br0: Operation not supported" error message.
This happens when you add a wifi interface in client mode to a bridge. Client mode is the default mode.
Applying the tutorial top to bottom you would get that message.
However as soon as you'd start hostapd, it would turn the interface to AP mode and bridge it ok.
I suppose the tutorial could mention "you'll get an error, that's ok", but I'm not a tutorial writer.

(The interfaces file stanza "bridge-ports eth0 wlan0" will throw the same error at boot time. Writing it this way is readable, but indeed wrong until the interface is in AP mode)
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 9:17 pm

Thanks. The tutorial is out of order, but if configured in the correct order, it works fine. Just ignore the dhcpcd fail during boot.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24195
Joined: Sat Jul 30, 2011 7:41 pm

Re: Request: a DUMB access point. (No DHCP.)

Sun Sep 03, 2017 9:29 pm

epoch1970 wrote:
Sun Sep 03, 2017 7:04 pm
SurferTim wrote:
Sun Sep 03, 2017 3:39 pm
When I tried to add interfaces to the bridge, I got a "can't add wlan0 to bridge br0: Operation not supported" error message.
This happens when you add a wifi interface in client mode to a bridge. Client mode is the default mode.
Applying the tutorial top to bottom you would get that message.
However as soon as you'd start hostapd, it would turn the interface to AP mode and bridge it ok.
I suppose the tutorial could mention "you'll get an error, that's ok", but I'm not a tutorial writer.

(The interfaces file stanza "bridge-ports eth0 wlan0" will throw the same error at boot time. Writing it this way is readable, but indeed wrong until the interface is in AP mode)

Ahh. I am actually the tutorial writer, and I've been wondering about that error. Some people sea it other didn't - thanks for the explanation. I need to start looking at the tutorials again now we have Stretch, as that requires some changes to be made, but I am a bit short of time right now with quite a few other tasks on the go.

EDIT: If someone else wants to update the docs, the process is fairly easy, The docs are all done via github and pull requests. see here https://www.raspberrypi.org/documentati ... -github.md
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 1:23 pm

Before I would change the docs, I'd like to know if others can get my changes to work. I started from scratch with a fresh install of Raspbian Stretch.

Insure you have the latest updates.

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
If Stretch, then edit /boot/cmdline.txt and add this to the end. This allows you to use eth0 instead of enx12345

Code: Select all

net.ifnames=0
reboot

Install hostapd and bridge utilities.

Code: Select all

sudo apt-get install hostapd bridge-utils
sudo systemctl stop hostapd
Add bridge br0.

Code: Select all

sudo brctl addbr br0
Create file /etc/hostapd/hostapd.conf

Code: Select all

interface=wlan0
bridge=br0
#driver=nl80211
ssid=RPiNet
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mypassphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Edit /etc/default/hostapd, uncomment and change this:

Code: Select all

DAEMON_CONF="/etc/hostapd/hostapd.conf"
Add eth0 to br0

Code: Select all

sudo brctl addif br0 eth0
Edit /etc/network interfaces and add this

Code: Select all

allow-hotplug wlan0
iface wlan0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
Edit /etc/dhcpcd.conf and add this above other interfaces

Code: Select all

denyinterfaces wlan0
denyinterfaces eth0
reboot

epoch1970
Posts: 3901
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 1:44 pm

Just curious, I can't test:
No eth0 declaration in interfaces? Doesn't look too kosher, but I am of the old school
No denyinterfaces br0 in dhcpcd.conf? Don't remember if I needed it under Jessie, but I thought it was safer to add it just in case.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 1:55 pm

epoch1970 wrote: Just curious, I can't test:
No eth0 declaration in interfaces? Doesn't look too kosher, but I am of the old school
No denyinterfaces br0 in dhcpcd.conf? Don't remember if I needed it under Jessie, but I thought it was safer to add it just in case.
I use Stretch.
There are no iface statements in /etc/network/interfaces by default. I added only what I posted.
No "denyinterfaces br0" in /etc/dhcpcd.conf. You want it to pick up network settings from the dhcp server.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24195
Joined: Sat Jul 30, 2011 7:41 pm

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 2:01 pm

Just a head up on doc changes. What usually happens, a PR is received, then someone (usually me) does a technical check on it to make sure it works, then it get copy edited, then technical checked again (to make sure the copy edit hasn't changed something important), then it will get merged. However, I am quite busy at the moment, so changes may take a while to filter through.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 2:03 pm

@jamesh: No thing. I like to get feedback from the forums before i suggest changes. Let's see how the response goes.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24195
Joined: Sat Jul 30, 2011 7:41 pm

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 4:11 pm

SurferTim wrote:
Mon Sep 04, 2017 2:03 pm
@jamesh: No thing. I like to get feedback from the forums before i suggest changes. Let's see how the response goes.
No worries. The more people who help with documentation the better - there is a limit to how much I can do!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
scruss
Posts: 2636
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 4:24 pm

SurferTim wrote:
Mon Sep 04, 2017 1:23 pm

Insure you have the latest updates.

Code: Select all

…
sudo rpi-update
Don't do rpi-update unless you need the bleeding edge kernel features. It shouldn't be required here.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
davidcoton
Posts: 4267
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 5:01 pm

SurferTim wrote:
Mon Sep 04, 2017 1:23 pm
Insure...
Who writes the insurance policy? What is the premium? :lol:
I think you mean "Ensure..." :geek: (But thanks for picking up the challenge anyway.)
Signature retired

drgeoff
Posts: 9933
Joined: Wed Jan 25, 2012 6:39 pm

Re: Request: a DUMB access point. (No DHCP.)

Mon Sep 04, 2017 5:23 pm

davidcoton wrote:
Mon Sep 04, 2017 5:01 pm
SurferTim wrote:
Mon Sep 04, 2017 1:23 pm
Insure...
Who writes the insurance policy? What is the premium? :lol:
I think you mean "Ensure..." :geek: (But thanks for picking up the challenge anyway.)
That's just another one of the many instances where the people on the two sides of the pond use a different version of the same language. Unfortunately those on the wrong side are in the majority! And the spell checker in this forum's software is biased in their favour too.

just-a-bird
Posts: 1
Joined: Wed Nov 01, 2017 2:58 am

Re: Request: a DUMB access point. (No DHCP.)

Wed Nov 01, 2017 2:59 am

SurferTim wrote:
Mon Sep 04, 2017 1:23 pm
Before I would change the docs, I'd like to know if others can get my changes to work.
[...]
This worked perfectly for me. Thank you!

balamk
Posts: 3
Joined: Wed Apr 24, 2013 11:36 pm

Re: Request: a DUMB access point. (No DHCP.)

Mon Dec 04, 2017 3:10 am

SurferTim wrote:
Mon Sep 04, 2017 1:23 pm
Before I would change the docs, I'd like to know if others can get my changes to work.
[...]
Can't get this to work. After reboot i get network error as
Connection to dhcpcd lost
. Can't connect to wifi, but ifconfig lists a bridge configuration br0. Any suggestion to fix the connection issue is much appreciated

sparkie777
Posts: 121
Joined: Tue Nov 27, 2012 4:37 am

Re: Request: a DUMB access point. (No DHCP.)

Mon Dec 04, 2017 3:57 am

epoch1970 wrote:
Sun Sep 03, 2017 7:04 pm
(The interfaces file stanza "bridge-ports eth0 wlan0" will throw the same error at boot time. Writing it this way is readable, but indeed wrong until the interface is in AP mode)
why do you not just simply write
/etc/network/interfaces:

Code: Select all

[...]
auto br0
iface br0 inet dhcp
bridge_ports eth0
[...]
i.e. leave 'wlan0' away? You don't need to specify the bridge for 'wlan0' twice.
It is pretty much sufficient to mention the bridge for 'wlan0' in
/etc/hostapd/hostapd.conf:

Code: Select all

[...]
interface=wlan0
bridge=br0
[...]
with the advantage the wlan interface is not temporarily added in the wrong mode to the bridge. And no confusing error at boot time will be thrown.

epoch1970
Posts: 3901
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Request: a DUMB access point. (No DHCP.)

Mon Dec 04, 2017 11:29 am

sparkie777 wrote:
Mon Dec 04, 2017 3:57 am
why do you not just simply write ... with the advantage the wlan interface is not temporarily added in the wrong mode to the bridge. And no confusing error at boot time will be thrown.
Because /etc/network/interfaces is the place where I expect to see networking defined. I prefer to see all of it, even at the cost of a harmless error.
Arguably, a comment would do just as well.

Old age creeping. You need to jot down everything. And then you forget you did...
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

sparkie777
Posts: 121
Joined: Tue Nov 27, 2012 4:37 am

Re: Request: a DUMB access point. (No DHCP.)

Mon Dec 04, 2017 11:52 am

epoch1970 wrote:
Mon Dec 04, 2017 11:29 am
Because /etc/network/interfaces is the place where I expect to see networking defined. I prefer to see all of it, even at the cost of a harmless error.
I've heard in newer releases there even doesn't exist '/etc/network/interfaces' any longer at all :)

you get what you pay for.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Request: a DUMB access point. (No DHCP.)

Mon Dec 04, 2017 12:11 pm

sparkie777 wrote:
Mon Dec 04, 2017 11:52 am
I've heard in newer releases there even doesn't exist '/etc/network/interfaces' any longer at all :)
Not with Raspbian 2017-11-29. It still has /etc/network/interfaces.

Return to “Beginners”