0

I am trying to set up a Raspberry Pi as a wifi access point. It's going to run a web server which can be accessed with nearby tablets. It is supposed to be bundled with research equipment, and will have no further network connection. It is completely standalone.

When I boot the raspi, the wlan0-interface doesn't get a static IP, which also causes isc-dhcp-server to not start. If I do ifdown wlan0 && ifup wlan0, it does get it's proper IP set.

My /etc/network/interfaces file looks like this:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

iface wlan0 inet static
address 192.168.50.1
netmask 255.255.255.0
network 192.168.50.0
broadcast 192.168.50.255

I followed this guide to set it up.

My wifi-stick is a Sony IFU-WLM3

The setup works if I do ifdown wlan0 && ifup wlan0 and then restart the dhcp-server.

Why doesn't the IP get set on boot, and how can I fix this?

Suppen
  • 123

1 Answers1

0

Add the lines:

wpa-ssid "<name of wireless network>"
wpa-psk "<password of wireless network>"

after broadcast 192.168.50.255

jcbermu
  • 4,736
  • 18
  • 26
  • Didn't work. Also, this is in my hostapd.conf-file. I don't see why I need it in the interfaces-file too – Suppen Apr 29 '15 at 08:35
  • Sorry. It was my mistake. I forgot about hostapd. According to this guide you have to add this line hostapd /etc/hostapd/hostapd.conf – jcbermu Apr 29 '15 at 08:53