N900 Ad-hoc WiFi Hotspot: Difference between revisions

From Maemo Wiki
Jump to navigationJump to search
imported>loic
New page: This method works but is not useable for more than a proof of concept because it suffers '''40% packet loss at close range''' between the N900 and the laptop. == On the N900 == /etc/apt/s...
 
imported>amigadave
wikify and tidy
Line 1: Line 1:
This method works but is not useable for more than a proof of concept because it suffers '''40% packet loss at close range''' between the N900 and the laptop.
This method works but is not usable for more than a proof of concept because it suffers '''40% packet loss at close range''' between the [[Nokia N900|N900]] and the laptop.
 
== On the N900 ==
== On the N900 ==
/etc/apt/sources.list
 
deb http://repository.maemo.org/extras-devel/ fremantle free
<ol>
apt-get install iptables
<li>[[Extras-devel#How to activate Extras-devel|Enable extras-devel]]</li>
http://wiki.maemo.org/Kernel_Power#Installation_of_the_stable_kernel_from_extras
<li>Install [http://maemo.org/packages/view/iptables/ iptables] at a [[terminal]] with [[root access]]:<pre>apt-get install iptables</pre></li>
apt-get install kernel-power-settings
<li>Install [http://maemo.org/packages/view/kernel-power-settings/ kernel-power-settings] (see [[Kernel_Power#Installation_of_the_stable_kernel_from_extras|the detailed installation instructions]]):<pre>apt-get install kernel-power-settings</pre></li>
# connect using GPRS and not a wifi hotspot
<li>Connect to the Internet with GPRS</li>
echo 1 > /proc/sys/net/ipv4/ip_forward
<li>Setup iptables to allow forwarding:
iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE
<pre>
iwconfig wlan0 mode ad-hoc channel 3
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig wlan0 192.168.4.15 up
iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE
iwconfig wlan0 essid N900
</pre></li>
<li>Bring up te ad hoc wireless network:
<pre>
iwconfig wlan0 mode ad-hoc channel 3
ifconfig wlan0 192.168.4.15 up
iwconfig wlan0 essid N900
</pre></li>
</ol>
 
== On the laptop ==
== On the laptop ==
Connect to the ad hoc wireless network:
  sudo iwconfig wlan0 mode ad-hoc channel 3
  sudo iwconfig wlan0 mode ad-hoc channel 3
  sudo ifconfig wlan0 192.168.4.14 up
  sudo ifconfig wlan0 192.168.4.14 up
Line 21: Line 32:
[[Category:N900]]
[[Category:N900]]
[[Category:Power users]]
[[Category:Power users]]
[[Category:Hotspot]]
[[Category:WiFi]]

Revision as of 02:50, 29 June 2010

This method works but is not usable for more than a proof of concept because it suffers 40% packet loss at close range between the N900 and the laptop.

On the N900

  1. Enable extras-devel
  2. Install iptables at a terminal with root access:
    apt-get install iptables
  3. Install kernel-power-settings (see the detailed installation instructions):
    apt-get install kernel-power-settings
  4. Connect to the Internet with GPRS
  5. Setup iptables to allow forwarding:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE
    
  6. Bring up te ad hoc wireless network:
    iwconfig wlan0 mode ad-hoc channel 3
    ifconfig wlan0 192.168.4.15 up
    iwconfig wlan0 essid N900
    

On the laptop

Connect to the ad hoc wireless network:

sudo iwconfig wlan0 mode ad-hoc channel 3
sudo ifconfig wlan0 192.168.4.14 up
sudo iwconfig essid N900
sudo route add default gw 192.168.4.15