[Request] Please add Wi-Fi hostspot option

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Starlight5
Posts: 28
Joined: Wed Jul 08, 2015 12:14 pm

[Request] Please add Wi-Fi hostspot option

Post by Starlight5 »

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.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: [Request] Please add Wi-Fi hostspot option

Post by Fourdee »

Starlight5 wrote: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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
sarmisak

Re: [Request] Please add Wi-Fi hostspot option

Post by sarmisak »

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;

Code: Select all

apt-get install hostapd udhcpd dnsmasq
in your /etc/network/interfaces file you should set a static IP for your wlan adapter

Code: Select all

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

Code: Select all

#net.ipv4.ip_forward = 1
and uncomment it;

Code: Select all

net.ipv4.ip_forward = 1
/etc/udhcpd.conf

Code: Select all

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

Code: Select all

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

Code: Select all

DHCPD_ENABLED="no"
and change it to;

Code: Select all

DHCPD_ENABLED="yes"
in /etc/default/hostapd.conf find;

Code: Select all

#DAEMON_CONF=""
uncomment and change it to;

Code: Select all

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-us ... er-part-1/
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: [Request] Please add Wi-Fi hostspot option

Post by Fourdee »

sarmisak wrote: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;
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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply