PDA

View Full Version : Will N900 tether in Ubuntu?


DannStarr
2009-09-24, 00:07
I am unable to do this with my iphone. Apparently there is a workaround to make it possible, but I a) dont understand it, and b) from what I do understand, I need to download and install more packages in Ubuntu, but that would require an internet connection, and right now my only option is a tethered iphone!!

allnameswereout
2009-09-24, 00:33
Yes, after you enable unofficial/community BlueTooth DUN support (http://wiki.maemo.org/Fremantle_Unsupported_Bluetooth_profiles).

lma
2009-09-24, 00:49
Plus the unofficial/unsupported DUN server (http://wiki.maemo.org/index.php?title=Fremantle_Unsupported_Bluetooth_pr ofiles#DUN_server) on the N900.

DannStarr
2009-09-24, 11:27
Hmmm, interesting, thanks for that. What about through the USB cable, would that work straight out of the box?

lma
2009-09-24, 11:56
Probably, http://europe.nokia.com/find-products/devices/nokia-n900/specifications states:

Capability to serve as data modem via USB connection

ldrn
2009-09-24, 13:54
Plus the unofficial/unsupported DUN server (http://wiki.maemo.org/index.php?title=Fremantle_Unsupported_Bluetooth_pr ofiles#DUN_server) on the N900.

That is pretty cool -- you can make your N810 go online through your N900. :cool:

x61
2009-10-24, 18:14
This is strange. The N900 is linux based phone yet it is not "out-of-the-box" ready to work with linux.

The_Solutor
2009-10-24, 20:26
I'm sorry but this doesn't works ?

http://pc-connectivity.garage.maemo.org/2nd_edition/index.html

convulted
2009-10-24, 20:41
I'm sorry but this doesn't works ?

http://pc-connectivity.garage.maemo.org/2nd_edition/index.html

There doesn't seem to be a 64-bit version. I'll submit a feature request.

allnameswereout
2009-10-24, 20:45
Addendum: Ubuntu 9.10 Karmic with Blueman works _perfect_ with Bluetooth DUN/PAN because Network-Manager now supports these profiles! You set up your GPRS account (APN is important setting), select 'auto connect', then you configure Bluetooth via Blueman. Then you connect with Blueman to phone's N900 DUN (or, if you prefer, PAN) and Network-Manager will automagically enable PPP setup. You can even add another hook for VPN. So, no more need for wvdial. Even more perfect would be, if computer running Karmic would detect there is no WLAN, and then auto try Bluetooth, for example via BlueProximity.

The_Solutor
2009-10-24, 20:54
Yes but you have to take in account that BT is limited to a bit more than 1MBps while the HSPA can go easily over 6/7 MBps (and more with the n900).

Sharing the connection via BT is just meant for a quick tour.

For anything more the usb or wlan connection is required.

allnameswereout
2009-10-24, 21:02
Yes but you have to take in account that BT is limited to a bit more than 1MBps2.1Mbps max asymmetric. 1.45Mbps max symmetric (http://www.pixelbeat.org/speeds.html)

while the HSPA can go easily over 6/7 MBps (and more with the n900).Differs per telco.

The_Solutor
2009-10-24, 21:30
2.1Mbps max asymmetric. 1.45Mbps max symmetric (http://www.pixelbeat.org/speeds.html)
.

Those are raw values, noting to do with the real connection that you can obtain.

Just try yourself using dumeter/netmeter in windows or knemo or something similar in linux.


Differs per telco

Here (in italy) with all the four major provider you can get at least 5Mbps on a HSDPA 7.2/HSUPA covered territory.

This is what I get at my home with a Sonyericsson HSUPA 7.2 device.

http://img38.imageshack.us/img38/8950/md400agosto.jpg

mosi0815
2009-10-24, 22:12
I think it will work out of the box. If i connect a symbian device in PC Suite Mode to my Mac it does exactly the same like the N900 in this Video: http://www.youtube.com/watch?v=5vSqGSG9riU
Starting with Jaunty the Network Manager of Ubuntu also supports wireless broadband. I use this with my N97 and it is working perfectly. I think it will also show up as serial connected modem in Ubuntu and Network Manager will recognize it.

zgold550
2009-10-24, 22:34
I can confirm that the N900 tethers just fine with ubuntu using wvdial or gnome-ppp on Hardy and Jaunty. (I don't have a karmic machine... yet).

I have done this using the bluetooth DUN server mentioned previously in this thread.

I plan to release an application to enable the DUN server on the N900 within the next couple weeks to extras-testing and eventually to extras so that way you don't need to go into the command line.

johnkzin
2009-11-04, 13:04
What about wifi based tethering? (ie. using the N900 as a wifi access point, comparable to joikuspot and such)

DannStarr
2009-11-04, 14:08
What about wifi based tethering? (ie. using the N900 as a wifi access point, comparable to joikuspot and such)


That would be lush - I never had a problem connecting to ubuntu via joikuspot on my 5800, just the iPhone won't do it over USB - I've got a temporary fix now using "my wi"

vitb
2009-11-25, 22:48
Just for clarity - this is the case with DUND (pnatd script)?

Blueman "sees" n900 as "Network access point", and appears to connect, but there seems to be no Bluetooth net device created on the device side, and hereby no way to leverage actual connection.

maxppc
2009-11-27, 11:26
For Ubuntu users and probably for all others linux users is pretty straight, my experience is:

Ubuntu 9.10 Karmic Koala Desktop
plugged N900 to USB while the phone display is on!!
Selected "PC Suite" option on the N900
(then if you look at dmesg in your linux desktop you'll see a modem on ttyACM0)
On Network manager in my desktop I just clicked the broadband connection I already had with my internet key and I was online with full USB speed!

Probably if your linux does not support Broadband mobile from network manager you still able to use gnome-ppp or wvdial but absolutely you don't need to trick your n900 since it's already shown as a modem!

vitb
2009-11-27, 16:44
Well I second that with F11 and F12 - it just works via USB cable. However, BT is just better in a number of situations.

Alex Atkin UK
2009-11-27, 16:56
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.

snedley
2009-12-01, 03:33
I got my Mac to tether through my N900 using that unsupported BT DUN script (http://wiki.maemo.org/Fremantle_Unsupported_Bluetooth_profiles)

The script runs as root, which I created by ssh'ing into the phone as root (with openssh server installed). What is a good way to just get it to run whenever the phone boots and continue to run? Hack a script into the /etc/init.d dir and link it to /etc/rc2.d/ (since it appears that the default run level is 2 on this).

johnkzin
2009-12-01, 03:51
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.

I absolutely agree. Though others may chime in about it ravaging your battery life. Still, the ubiquity of wifi these days is greater than that of USB tethering, BT DUN, or BT PAN. IMO, it's easier, and more likely, that you'll be able to get your devices to talk to your N900 if it's acting as an access point, than through the other methods.

There just needs to be a "low power wifi" mode that's more commonly implemented. Something where all of the devices involved only expect to be within 1-2 meters of each other. That would probably help the battery life issue quite a bit.

ivotoby
2009-12-03, 10:47
I've made a howto (http://syntacticsugar.nl/2009/12/03/bluetooth-tethering-with-nokia-n900/#more-310) for getting tethering using Bluetooth work on Ubuntu Karmic .. It's focussed on DUN, not PAN (yet)..

dartarrow
2010-02-09, 04:57
I've got a tethering howto (http://dartarrow.net/using-nokia-n900-as-a-modem/137) for USB for linux. Tried with kubuntu 9.10 but should work with anything else. This uses wvdial.

rmerren
2010-02-09, 05:39
I had no problem tethering Ubuntu. Everything basically set itself up. The only tricky part was that you have to select "PC Suite" as the option on the phone when you connect it.

weirdbeard
2010-02-09, 08:09
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.

MiFi would kill your battery. You would have to be connected to the charger. Bluetooth uses much less power. MiFi should only be the option if you do not have bluetooth or your usb cable.

entwisi
2010-02-09, 13:41
works fine on my Aspire One running Ubuntu Netbook remix, in fact, it was originally set up to use my e90 but plugging teh N900 in teh vodafone connection was available and worked out teh box. I do have Bluetooth DUN installed if that makes a difference.

mirakels
2010-05-14, 15:03
Based on the usb wiki by dartarrow I setup my n900 as a router so I can access internet on my fedora 12 laptop via the cellular network without dun or wvdial. So the n900 is still fully usable. See below script that includes all the documentation.


#!/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
#

uvatbc
2010-05-14, 15:16
This is strange. The N900 is linux based phone yet it is not "out-of-the-box" ready to work with linux.

"Linux" is just the name of the kernel. The distribution on the phone is Maemo - Fremantle.
Out-of-the-box compatibility with every single feature of a desktop machine would be resource wasteful for a phone.
If you *do* want it, it's easily installable - either from Nokia repositories or community repositories.

In other words, "there's a *free* app for that".
Enjoy your N900.

mirakels
2010-05-14, 22:59
Hm, the dnsmasq setting fails after a reboot as the usb0 device is not there at that time.

I resolved this by changing the /etc/event.d/dnsmasq exec line to just

exec /usr/sbin/dnsmasq -k

This will make dnsmas q to listen to the grps/wlan devices too which we probably do not want, but for now that's fine with me...