Difference between revisions of "Status/Wireless"

From Maemo Leste Wiki
Jump to navigationJump to search
(Created page with "If Linux has a driver and wpa_supplicant can drive the device, our libicd-network-wpasupplicant should just work in combination with icd2.")
 
Line 1: Line 1:
If Linux has a driver and wpa_supplicant can drive the device, our libicd-network-wpasupplicant should just work in combination with icd2.
Client mode should just work using the UI.
 
 
== Mobile Hotspot ==
 
There is no UI for this yet.
 
To share your mobile data over wireless, you will need to install dnsmasq and hostapd.
 
You will want to set `wpa=2`, `ssid=` and `wpa_passphrase` in hostapd.conf, like so (of course, there might be other options that are set):
 
<pre>
wpa=2
ssid=Internet
wpa_passphrase=secureinternetpassword
</pre>
 
You can copy the example config files to /etc/hostapd/
 
For /etc/dnsmasq.conf, make sure `interface=` includes at least `lo,wlan0`, like so:
 
<pre>
interface=lo,wlan0
</pre>
 
You might also want to change `dhcp-range=` in the config file to match the subnet of your wireless interface ip, per our example:
 
<pre>
dhcp-range=192.168.44.50,192.168.44.150,12h
</pre>
 
Then restart dnsmasq.
 
Next, configure iptables:
 
<pre>
sudo iptables -A POSTROUTING -t nat -s 192.168.42.1/24 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1
</pre>
 
And finally bring up the interface and run hostapd:
 
<pre>
sudo ifconfig wlan0 192.168.42.2
sudo hostapd -i wlan0 /etc/hostapd/hostapd.conf
</pre>

Revision as of 17:16, 12 April 2021

Client mode should just work using the UI.


Mobile Hotspot

There is no UI for this yet.

To share your mobile data over wireless, you will need to install dnsmasq and hostapd.

You will want to set `wpa=2`, `ssid=` and `wpa_passphrase` in hostapd.conf, like so (of course, there might be other options that are set):

wpa=2
ssid=Internet
wpa_passphrase=secureinternetpassword

You can copy the example config files to /etc/hostapd/

For /etc/dnsmasq.conf, make sure `interface=` includes at least `lo,wlan0`, like so:

interface=lo,wlan0

You might also want to change `dhcp-range=` in the config file to match the subnet of your wireless interface ip, per our example:

dhcp-range=192.168.44.50,192.168.44.150,12h

Then restart dnsmasq.

Next, configure iptables:

sudo iptables -A POSTROUTING -t nat -s 192.168.42.1/24 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1

And finally bring up the interface and run hostapd:

sudo ifconfig wlan0 192.168.42.2
sudo hostapd -i wlan0 /etc/hostapd/hostapd.conf