[Request] Please add Wi-Fi hostspot option

As title says, it would be really great if an option to install wi-fi hotspot with required software and some basic configuration was also available.

Hi Starlight,

Sounds like an interesting project. I’ll add it to my list, will let you know when its available in DietPi.

It is not really hard to implement this on RPi, the main problem is not all of the wifi dongles are supported by the hostapd system. You can install udhcpd and hostapd on your system, here are some configuration examples for you;

First install udhcpd, hostapd and dnsmasq;

apt-get install hostapd udhcpd dnsmasq

in your /etc/network/interfaces file you should set a static IP for your wlan adapter

iface wlan0 inet static
  address 192.168.99.1
  broadcast 192.168.99.255
  netmask 255.255.255.0

then add IP forwarding for your wlan, in /etc/sysctl.conf find

#net.ipv4.ip_forward = 1

and uncomment it;

net.ipv4.ip_forward = 1

/etc/udhcpd.conf

start 192.168.99.2
end 192.168.99.100
interface wlan0
remaining yes

# I prefer OpenDNS
opt dns 208.67.220.220 208.67.222.222

opt subnet 255.255.255.0
opt router 192.168.99.1
opt lease 600

/etc/hostapd/hostapd.conf

interface=wlan0

# THIS IS THE PROBLEM, THERE ARE LIMITED DRIVERS FOR LIMITED CHIPSETS
driver=nl80211

ssid=YOUR_SSID
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=passwordForYourSSID
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

in /etc/default/udhcpd.conf find

DHCPD_ENABLED="no"

and change it to;

DHCPD_ENABLED="yes"

in /etc/default/hostapd.conf find;

#DAEMON_CONF=""

uncomment and change it to;

DAEMON_CONF="/etc/hostapd/hostapd.conf"

After you reboot everything should be up and running.

I might have some parts missing, but I think this should get you going, though I have no idea on making it a real life hotspot like we use in restaurants, hotels, etc.

Also, you might want to check out http://sirlagz.net/2012/08/09/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-1/

Hi Sarmisak,

Thanks for the guide!

The main issue for me is DietPi is coded with having a single network adapter active at any one time. This is what DietPi scripts expects and needs to function correctly. This method was chosen to prevent “double connections” for the end user.

For me to implement the WiFi hotspot option, i will need to redesign DietPi’s networking system. Its on my list, but will take some time to complete.