1

I need to get a way to communicate to a Raspberry Pi which is acting as the brain of a project. The missing piece is the wireless TCP/IP link.

There are some tutorials for setting up a router with hostapd but I'm having trouble with some since the PI is running headless and failing to setup the interfaces correctly sometimes means taking the SD out to fix the wired connection. Also do I really need a bridge since the PI is the endpoint?

Is there any simpler solution for what I want? (Just need 1-2 clients, static IPs are fine)

Here are my netctl configs:

##Wired###################################
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.0.5/24')
##Bridge##################################
Interface=br0
Connection=bridge
BindsToInterfaces=(eth0)
IP=static
Address=('192.168.0.6/24')
SkipForwardingDelay=yes

And the minimalist hostapd config:

interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=randomssid
channel=5
auth_algs=1
driver=rtl871xdrv
hw_mode=g
logger_stdout=-1
logger_stdout_level=2
ieee80211n=1
bridge=br0

With this config the problem is that the wireless card gets no IP. Am I supposed to configure it as a normal card and let hostapd take care after it?

Also as I said, I don't need anything to be routed to the wired card, can I get rid of the bridge?

  • Why do you want your RPi to run as AP? Don't you have a wireless router to connect it to? – Dmitry Grigoryev Sep 21 '15 at 15:18
  • @DmitryGrigoryev Not really. And the project is quite compact, there's no space for a router nor another power socket. – SOMN Sep 21 '15 at 15:24
0

systemd-networkd allowed me to do something like:

[Match]
Name=wlan0

[Network]
Address=192.168.x.x

to set the wireless card address (with netctl disabled, don't mix both). When hostapd starts, it keeps that address as the access point address.

In my specific case, one can do the same for the wired card (a static address, with no further configuration). No bridge is needed, but probably is a good idea to have one address for the wired and other for the wireless (haven't tried though).

This is a dhcp-less configuration, so it requires static address setup on both ends.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.