N900 USB router
(New page: = N900 as a USB router = When the only internet link is the N900, how to connect a laptop to it and use it to connect to the net ? This is the oposite use case of http://wiki.maemo.org/N90...) |
|||
(10 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | + | When the only internet link is the [[Nokia N900|N900]], how to connect a laptop to it and use it to connect to the net? | |
- | When the only internet link is the N900, how to connect a laptop to it and use it to connect to the net ? This is the | + | |
+ | There is two modes for doing this: Using the [[Nokia N900|N900]] as a dumb mobile broadband modem to the phone network, which however will leave the linux system on N900 without connection to internet. Or set up full USB networking between the computer and the N900 using the N900 as a router to whatever network it's connected to (phone, wlan, etc..), which will allow internet access for both N900 and PC concurrently. | ||
+ | |||
+ | The modem model should be available mostly automatically on most OS'es when you connect the phone over USB (Bluethooth also possible with an addon). Windows may need the PC Suite installed however. This however only works for phone network connections, not wlan connections. | ||
+ | |||
+ | The other variant using full USB networking support is not enabled in the default USB profile of the N900 and needs some tweaking to be enabled, but once enabled it gives you full network access to both the N900 and connection sharing of whatever Internet connection the N900 currently have (phone, wlan, etc...) | ||
+ | |||
== On the N900 == | == On the N900 == | ||
- | + | ||
- | + | <ol> | |
- | + | <li>[[Extras-devel#How to activate Extras-devel|Enable extras-devel]]</li> | |
- | + | <li>Install [http://maemo.org/packages/view/iptables/ iptables] at a [[terminal]] with [[root access]]:<pre>apt-get install iptables</pre></li> | |
- | + | <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> | |
- | + | <li>Setup iptables to allow forwarding: | |
- | + | <pre> | |
- | + | echo 1 > /proc/sys/net/ipv4/ip_forward | |
- | + | iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE | |
- | + | iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE | |
- | + | </pre></li> | |
- | + | <li>Check the IP address for USB networking:<pre>cat /etc/network/interfaces</pre> | |
- | + | <pre> | |
+ | iface usb0 inet static | ||
+ | address 192.168.3.15 | ||
+ | netmask 255.255.255.0 | ||
+ | </pre> | ||
+ | </li> | ||
+ | <li>Bring the interface UP:<pre> | ||
+ | ifup usb0 | ||
+ | </pre> | ||
+ | </li> | ||
+ | <li>Start dnsmasq on the usb0 interface to provide DHCP & DNS<pre> | ||
+ | dnsmasq -I lo -z -a 192.168.3.15 -F 192.168.3.64,192.168.3.127 | ||
+ | </pre> | ||
+ | </ol> | ||
+ | |||
+ | Once you have verified this works then you can make the settings permanent by adding the needed commands to /usr/sbin/pcsuite-enable.sh just before "exit 0" line at the end of the file. | ||
+ | |||
+ | <pre> | ||
+ | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
+ | iptables -t nat -F POSTROUTING | ||
+ | iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE | ||
+ | iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE | ||
+ | ifup usb0 | ||
+ | dnsmasq -I lo -z -a 192.168.3.15 -F 192.168.3.64,192.168.3.127 | ||
+ | </pre> | ||
+ | |||
+ | This will make the needed settings automatically enabled when you select "PC Suite" mode on the N900 when connecting the USB cable. | ||
+ | |||
== On the laptop == | == On the laptop == | ||
- | |||
- | |||
+ | The networking configuration on the PC side should be almost automatic on most OS:es. If needed configure your PC to use DHCP on the USB interface. | ||
+ | |||
+ | == For Non-Power Users On Windows == | ||
+ | |||
+ | The [http://www.nokiausa.com/get-support-and-software/software/nokia-pc-suites/compatibility-and-download Nokia PC Suite] also provides this functionality for Windows users. Once it is set up, click on the green globe icon to get started - or you can just run "OneTouchAccess" from the PC Suite program files directory (<code>C:\Program Files\Nokia\Nokia PC Suite 7\</code> by default on Windows XP) | ||
+ | |||
+ | Note: Reportedly PC Suite do not provide USB networking as described in this article. Instead it sets up dialup networking over USB, using the phone as a wireless broadband modem. Fine for Internet access, but perhaps not what you want for advanced uses where you want to be able to communicate with the N900 as well, not just Internet. | ||
[[Category:Connectivity]] | [[Category:Connectivity]] |
Latest revision as of 03:38, 10 March 2013
When the only internet link is the N900, how to connect a laptop to it and use it to connect to the net?
There is two modes for doing this: Using the N900 as a dumb mobile broadband modem to the phone network, which however will leave the linux system on N900 without connection to internet. Or set up full USB networking between the computer and the N900 using the N900 as a router to whatever network it's connected to (phone, wlan, etc..), which will allow internet access for both N900 and PC concurrently.
The modem model should be available mostly automatically on most OS'es when you connect the phone over USB (Bluethooth also possible with an addon). Windows may need the PC Suite installed however. This however only works for phone network connections, not wlan connections.
The other variant using full USB networking support is not enabled in the default USB profile of the N900 and needs some tweaking to be enabled, but once enabled it gives you full network access to both the N900 and connection sharing of whatever Internet connection the N900 currently have (phone, wlan, etc...)
[edit] On the N900
- Enable extras-devel
- Install iptables at a terminal with root access:
apt-get install iptables
- Install kernel-power-settings (see the detailed installation instructions):
apt-get install kernel-power-settings
- Setup iptables to allow forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE
- Check the IP address for USB networking:
cat /etc/network/interfaces
iface usb0 inet static address 192.168.3.15 netmask 255.255.255.0
- Bring the interface UP:
ifup usb0
- Start dnsmasq on the usb0 interface to provide DHCP & DNS
dnsmasq -I lo -z -a 192.168.3.15 -F 192.168.3.64,192.168.3.127
Once you have verified this works then you can make the settings permanent by adding the needed commands to /usr/sbin/pcsuite-enable.sh just before "exit 0" line at the end of the file.
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -F POSTROUTING iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE ifup usb0 dnsmasq -I lo -z -a 192.168.3.15 -F 192.168.3.64,192.168.3.127
This will make the needed settings automatically enabled when you select "PC Suite" mode on the N900 when connecting the USB cable.
[edit] On the laptop
The networking configuration on the PC side should be almost automatic on most OS:es. If needed configure your PC to use DHCP on the USB interface.
[edit] For Non-Power Users On Windows
The Nokia PC Suite also provides this functionality for Windows users. Once it is set up, click on the green globe icon to get started - or you can just run "OneTouchAccess" from the PC Suite program files directory (C:\Program Files\Nokia\Nokia PC Suite 7\
by default on Windows XP)
Note: Reportedly PC Suite do not provide USB networking as described in this article. Instead it sets up dialup networking over USB, using the phone as a wireless broadband modem. Fine for Internet access, but perhaps not what you want for advanced uses where you want to be able to communicate with the N900 as well, not just Internet.
- This page was last modified on 10 March 2013, at 03:38.
- This page has been accessed 39,297 times.