[Feb 26] Recalbox beta v3.1- Rock64 |[Feb 26] Recalbox 190222- RockPro64 / Minimal Debian by mrfixit2001 - 190222 - RockPro64 |[Feb 26] Q4OS 2.7-r2 - Pinebook 1080P / Pinebook |[Feb 22] Batocera Linux 5.20-20190121- RockPro64 | [Feb 19] Manjaro KDE 19.02 / Manjaro LXQT 19.02 - Pinebook1080P / Pinebook | [Feb 19] Slackware Aarch64 Miniroot and XFCE 20190201 - RockPro | [Feb 19] Slackware Aarch64 Miniroot and XFCE 20190201 - Rock64

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


Create a WiFi hotspot on Debian 8
#1
Hello together!

I tried something to create a WiFi hotspot with officially WiFi/bluetooth module by pine64 via ethernet and this is my solution.
Feel free to discuss about this topic Smile

Note: The WiFi hotspot is using the internet connection via ethernet. I wasn't able to bridge the internet connection from wlan0 to wlan1!
Note 2: I haven't installed NetworkManager on my system. NetworkManager can be responsible for problems with these instructions.



Install hostapd (create a hotspot), dnsmasq (dhcp server) and iptables-persistent (firewall settings)
Code:
apt-get install hostapd dnsmasq iptables-persistent



Change the config of hostapd
/etc/hostapd/hostapd.conf
Code:
interface=wlan0
driver=nl80211
ssid=MyPrivateHotspot
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=MyVeryStrongPassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP



Change the config of dnsmasq
/etc/dnsmasq.conf
Code:
no-resolv
interface=wlan0
dhcp-range=10.0.0.3,10.0.0.20,12h
server=8.8.8.8
server=8.8.4.4
Restart dnsmasq to apply the new config
Code:
/etc/init.d/dnsmasq restart



Activate forwarding of IPv4
/etc/sysctl.conf
Code:
Just uncomment the following line:
net.ipv4.ip_forward=1
Apply it without reboot with the following command:
Code:
sysctl -w net.ipv4.ip_forward=1



Setup the network configuration
/etc/network/interfaces
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
        pre-up iptables-restore < /etc/network/iptables.rules

iface wlan1 inet manual

auto wlan0
iface wlan0 inet static
        address 10.0.0.1
        broadcast 10.0.0.255
        netmask 255.255.255.0
And restart the network:
Code:
/etc/init.d/networking restart



Apply iptables rules
Code:
iptables -A FORWARD -o eth0 -i wlan0 -s 10.0.0.1/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 



Save the iptables rules
Code:
iptables-save > /etc/network/iptables.rules



Create the WiFi hotspot
Code:
hostapd /etc/hostapd/hostapd.conf



You're done!


Best regards
Julian
My forum topics:
• Create a WiFi hotspot on Debian 8
• Turn your Pine64 into a music server with mpd
• Adjust brightness of LCD on Armbian Desktop with 1 click
• My cases for Pine64 (acryl, lego & wood)

• Pine 64 - DACH - Facebook page for german-speaking Pine64-fans.
Reply
#2
One of the Best WiFi Hotspot Software which I know are
  1. HostedNetworkStarter
  2. MaryFi
  3. My WiFi Router
  4. MyPublicWiFi
  5. 160WiFi
source:-[url= http://merabheja.com/best-free-wifi-hots...r-windows/] http://merabheja.com/best-free-wifi-hots...r-windows/[/url]
Reply
#3
Works fine on Rock64
Reply
#4
I have to set up a web server on the SBC so that when it runs , it creates a hotspot around it and the client phones or tablets can connect to access the web-resources present on the webserver.
I am a newbie, please guide me how can i set it up?
I will be using this setup in the environment with no internet connectivity.
Help me out by guiding me to the right direction.
Thank you
Reply
#5
Hi waqasnasir,

just create the hotspot as explained and install your favourite webserver.
Change ip-address of the webserver to your local network (like 192.168.0.1) and that's it - nothing special.

There is a ton of tutorials for installing a webserver Smile

Best regards
Julian
My forum topics:
• Create a WiFi hotspot on Debian 8
• Turn your Pine64 into a music server with mpd
• Adjust brightness of LCD on Armbian Desktop with 1 click
• My cases for Pine64 (acryl, lego & wood)

• Pine 64 - DACH - Facebook page for german-speaking Pine64-fans.
Reply
#6
(02-13-2019, 11:37 AM)JulianM Wrote: Hi waqasnasir,

just create the hotspot as explained and install your favourite webserver.
Change ip-address of the webserver to your local network (like 192.168.0.1) and that's it - nothing special.

There is a ton of tutorials for installing a webserver Smile

Best regards
Julian

Hi Julian,

Glad to "see" you again :-)

... TL
Reply
#7
I bought ROCK64 USB WIFI 802.11B/G/N (RTL8188EU) form Pine64

but I follow this guide but got errot

hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 2: invalid/unknown driver 'nl80211'
1 errors found in configuration file '/etc/hostapd/hostapd.conf'
Failed to set up interface with /etc/hostapd/hostapd.conf
Failed to initialize interface

Which driver should I fill on hostapd.conf
and if I do need a driver, where and how to get it

THANKS
Reply
#8
(02-13-2019, 11:37 AM)JulianM Wrote: Hi waqasnasir,

just create the hotspot as explained and install your favourite webserver.
Change ip-address of the webserver to your local network (like 192.168.0.1) and that's it - nothing special.

There is a ton of tutorials for installing a webserver Smile

Best regards
Julian


Thank you Julian, 
I will try the solution. 
My scenarios is however little different. I have to use the setup in the environment where there will be no LAN and no Wifi connection.  So the Rock64 or Rockpro64 will be able to generate an Access point with its own SSID that the other mobile devices can connect to to access the Webserver resources. 

The whole setup will run in villages in an offline state ..  Internet will not be there and is not at all required..

At the moment, I have both Rock64 and Rockpro64 with configured web server and running smoothly.  Both can connect to Wifi as well.  
I have a portable battery operated Access Point (Seperate hardware) , that can create an SSID and i am able to connect the ROCKs to it and the mobile devices are connected to the same SSID and can access the resources on the Webserver. 

I am trying to find a way to get rid of the hardware Access Point and make the setup smaller where the ROCKS can generate their own SSID for the mobile devices to connect to. 
That need lead me to your page while i was searching for a software based access point / hotspot solution. 

After reading the above details, do you think that the tutorial can work in my scenario, or what you suggest ?  I am just one step away for success in my project ..  
Also please mentioned ( as per your knowledge ) whether the software based hotspot or Access point has simultaneous connections limit or not ?  May be in my situation, around 50, 60 mobile devices will try to connect to the SSID at the same time. 
The hardware Access Point , theoretically can connect to 256 devices simultanously, but i am not sure about the scenario of software based Hotspot/Access Point. 

Thank you .. 
Regards
Waqas 
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [split] Better WiFi/BT module? moriel5 0 47 02-28-2019, 06:13 AM
Last Post: moriel5
  Schematics of Wifi/BT module gamelaster 7 521 09-11-2018, 02:02 PM
Last Post: gamelaster
  Installing another WiFi module on one of the buses mido2018 1 141 07-22-2018, 07:15 AM
Last Post: tllim
  Unable to activate wifi on Linux smouton 10 2,987 02-21-2018, 09:56 PM
Last Post: dkebler
  Pine64 doesn't recognize Wifi/BT Module clobeca 3 545 07-13-2017, 08:58 PM
Last Post: MarkHaysHarris777
  Better WiFi/BT module? fonix232 17 1,841 02-13-2017, 04:38 AM
Last Post: xalius
Sad wifi direct bj_jung 2 913 12-29-2016, 10:26 AM
Last Post: happytuna
  Enabling wifi c4tich 10 3,545 12-28-2016, 02:22 PM
Last Post: workaccountbro
  WIFI & Bluetooth? 7777777 14 7,674 12-24-2016, 05:01 AM
Last Post: Toriless
  RF connector on wifi\bt board kb1qzh 1 540 12-15-2016, 06:36 PM
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)