![]() |
2009-12-01
, 03:33
|
Posts: 22 |
Thanked: 13 times |
Joined on Nov 2009
|
#22
|
![]() |
2009-12-01
, 03:51
|
|
Posts: 1,878 |
Thanked: 646 times |
Joined on Sep 2007
@ San Jose, CA
|
#23
|
Personally, I think WiFi would be the better solution than Bluetooth but I have not heard of anyone getting it working as a MiFi yet.
![]() |
2010-02-09
, 04:57
|
Posts: 1 |
Thanked: 0 times |
Joined on Feb 2010
|
#25
|
![]() |
2010-02-09
, 05:39
|
Posts: 282 |
Thanked: 337 times |
Joined on Dec 2009
@ Austin, TX, USA
|
#26
|
![]() |
2010-02-09
, 08:09
|
Posts: 208 |
Thanked: 69 times |
Joined on Nov 2009
@ saint petersburg, fl
|
#27
|
Personally, I think WiFi would be the better solution than Bluetooth but I have not heard of anyone getting it working as a MiFi yet.
Glad to know it works easily over USB though. I was shocked how easy my 3G USB dongle works in Linux these days, a lot better/easier than in Windows in fact.
![]() |
2010-02-09
, 13:41
|
Posts: 48 |
Thanked: 8 times |
Joined on Oct 2009
|
#28
|
![]() |
2010-05-14
, 15:03
|
Posts: 197 |
Thanked: 101 times |
Joined on Dec 2009
@ Netherlands
|
#29
|
#!/bin/sh # # usbnet.sh - script to setup the N900 as an ip router # # Author: Mirakels # # Date: may 2010 # # This script and documentation sets up the N900 as a router # between your PC and the wlan/cellphone on your n900. # # We need to setup the usb device, allow forwarding and # masquerade all traffic going outside... # to get simple dns working on your PC we als need to update # dnsmasq on the n900. # # # Preparations # ============ # So you need the iptables package (apt-get install iptables) # and a kernel that supports iptables (don't know if the # default kernel supports iptables. I use the titan overclock # kernel) # # Note the preparation woork needs to be done as root... # # # SETUP USB0 # ---------- # Changed usb0 definition in /etc/network/interfaces # from: # auto usb0 # iface usb0 inet static # address 192.168.2.15 # netmask 255.255.255.0 # gateway 192.168.2.14 # # to: # auto usb0 # iface usb0 inet static # address 192.168.50.1 # netmask 255.255.255.0 # # I just picked the 192.168.50.x subnet to act as the intermediate # network. It should be a subnet that is not used within your campus. # # SETUP DNSMASQ # ------------- # Changed dnsmasq exec line in /etc/event.d/dnsmasq # from: # exec /usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z # # to: # exec /usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z -i usb0 # # So it also listens on the usb0 network interface for dns queries # # # With above steps the n900 is prepared to act as a router. # # STARTUP # ======= # Connect the n900 with the usb cable to your laptop. # When the n900 asks for 'mass storage' or 'PCsuite', # select 'PCsuite'. # # Run this script without options, e.g.: # # sudo gainroot # /home/user/usbnet.sh # # This will start he usb0 network device, allow # ip forwarding and sets up masquerading. # # Now it is time to do some steps on your laptop/PC. # The steps depend on your laptop OS. For my Fedora 12 # system I will see a new network interface called usb0. # All I need to do now as root is: # # ifconfig usb0 192.168.50.2 # route add default gw 192.168.50.1 # echo "nameserver 192.178.50.1" > /etc/resolv.conf # # and I have internet access from the laptop through the n900 # while the n900 still can be used as fully functional network # device and phone. # # The nice thing in this setup is that I can still monitor the # total traffic through the cell phone network via the n900 # dataplan tool. # # PS: I tried to defined the usb0 network in network manager # but then I need a MAC address of the usb0 device to define # the connection. Unfortunately the MAC address seems to # be a random address so changes every time the usb connection # is recreated. # # # To stop acting as a router run this script again with some # dummy command line argument # # sudo gainroot # /home/user/usbnet.sh done if [ -z "$1" ] ; then echo "Starting network and forwarding through usb0" ifup usb0 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE else echo "Stopping network and forwarding through usb0" ifdown usb0 echo 0 > /proc/sys/net/ipv4/ip_forward iptables -t nat -D POSTROUTING -o gprs0 -j MASQUERADE iptables -t nat -D POSTROUTING -o wlan0 -j MASQUERADE fi # # The End #
The Following User Says Thank You to mirakels For This Useful Post: | ||
![]() |
2010-05-14
, 15:16
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#30
|
This is strange. The N900 is linux based phone yet it is not "out-of-the-box" ready to work with linux.
Glad to know it works easily over USB though. I was shocked how easy my 3G USB dongle works in Linux these days, a lot better/easier than in Windows in fact.