maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Bluetooth PAN: Tethering N900 from another phone (https://talk.maemo.org/showthread.php?t=37710)

msoini 2009-12-18 20:04

Bluetooth PAN: Tethering N900 from another phone
 
For various weird reasons I'm not using a SIM card on N900 at the moment, and would love to get internet connection via Bluetooth from another phone.

I actually did succeed in this, although it works only in X Terminal, not in any GUI apps.

What I'm missing is:
How to create a "dummy" connection that would be visible to the list in "Internet Connection" dialog that is opened from Status Menu?

There used to be a way to do that in N810, N800 (type = DUMMY), but that doesn't work in N900, at least not in the same way.

........

Some info how to get as far as I did, if somebody wants to hack around.

First, I installed "maemo-pc-connectivity" (v0.5) with Application Manager. This is not really necessary otherwise, but I couldn't figure out how to make "bnep0" device appear.

Then I tried to set up the bluetooth tethering using that pc-connectivity app. It really didn't work, as it complains about PAND etc, which is obviously out of date for Fremantle. That would have only worked in N800 or so. But now the "bnep0" is there :)

The "manual setup" script that people used in N810 is also outdated for Fremantle, due to move from Bluez 3.x to Bluez 4.x. The API changed totally. And there's very little up-to-date documentation.

Luckily I am able to activate the connection from the other-phone-side, so I don't really need dbus-bluez API to work fully. But if somebody is interested, here's the Fremantle version for the script linked above:

Code:

find_connection(){
#find or create connection                                                                                                                                   
if dbus_method org.bluez / org.bluez.Manager.DefaultAdapter ; then
    ADAPTER=$(dbus_result)
    echo default adapter $ADAPTER

    if dbus_method org.bluez ${ADAPTER} org.bluez.Adapter.FindDevice string:"${BTADDR}" ; then
        DEVICE=$(dbus_result)
        echo device $DEVICE

        if dbus_method org.bluez ${DEVICE} org.bluez.Network.Connect string:"${PAN_ROLE}" ; then
            CONN=$(dbus_result)
            echo connection $CONN
        fi
    fi
fi
}

That works fine except the org.bluez.Network -part, which seems to be totally missing ?!? (My N900 has Sales firmware).

Anyways, what I really needed to run is the network setup, which is simply these lines:

Code:

#!/bin/sh

BNEPDEV=bnep0
IP=XXX.XXX.XXX.XXX
GW=XXX.XXX.XXX.XXX

ifconfig $BNEPDEV $IP up
route add default gw $GW

And that's it. The $IP and $GW variables depend on the device you connect to (i.e. the "another phone"). There are some default suggestions in the N810 version of the script if you want to take a look.

qwerty12 2009-12-18 20:36

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by msoini (Post 433791)
What I'm missing is:
How to create a "dummy" connection that would be visible to the list in "Internet Connection" dialog that is opened from Status Menu?

With the introduction of icd2, premiering in Diablo, you've needed to install a dummy plugin.

It's in nokia-binaries, so use any method of getting files from it (grab its Packages.gz, ..., etc.). I did this, from my FREMANTLE_ARMEL target:
apt-get install --reinstall -d libicd-network-dummy

This gave me its deb file in /var/cache/apt/archives. I then copied the deb to my N900 and did a dpkg -i. It gives instructions on adding the new connection; follow what it says and reboot.

http://imgur.com/IFxDX.png

msoini 2009-12-18 21:19

Re: Bluetooth PAN: Tethering N900 from another phone
 
Oh wow. This is seriously cool. There's actually no need to do any manual script running. The maemo-pc-connectivity package works just as advertised!

The only obstacle here is that the libicd-network-dummy package really needs to be installed for the maemo-pc-connectivity package to work.

So, to get this working (with GUI apps) do:
- install libicd-network-dummy from X Terminal
(you'll need to get that package from scratchbox armel install, as described above)
- install maemo-pc-connectivity with Application Manager
- configure according to the instructions
- activate the configuration with the maemo-pc-connectivity
- it works now, done :)

verhagke 2009-12-23 20:28

Re: Bluetooth PAN: Tethering N900 from another phone
 
So will this allow me to tether to a Blackberry dataplan over Bluetooth for example? In the documentation for pc connectivity suite, it mentions PCs (Wintel, Mac, Linux) only.

I have a company Blackberry with a decent dataplan which I can tether with over bluetooth. Currently don't have a dataplan on my N900. Would love ability to tether it to the Blackberry when I'm not near a wifi hotspot.

aironeous 2009-12-23 20:39

Re: Bluetooth PAN: Tethering N900 from another phone
 
OMG I'm supposed to understand any of this?
Sorry if I am being rude but I'm just an end user and I am thinking that I will be very unsatisfied with EDGE as it is so slow when i can put my AT&T sim back in my N95 8GB and just keep it charged and in my backpack or in my pocket and connect to it through bluetooth to my AT&T 3g until i can manage to get a tmobile account.
Can you please stick an app in extras or promise a firware upgrade giving us this option or give simple instructions on how to bluetooth connect to my AT&T symbian phone?
I know there are many AT&T symbian phone users out there that would appreciate it, thanks.

Matan 2009-12-23 21:20

Re: Bluetooth PAN: Tethering N900 from another phone
 
Does N95 support bluetooth PAN for tethering?

msoini 2009-12-25 09:11

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by verhagke (Post 439485)
So will this allow me to tether to a Blackberry dataplan over Bluetooth for example? In the documentation for pc connectivity suite, it mentions PCs (Wintel, Mac, Linux) only.

I have a company Blackberry with a decent dataplan which I can tether with over bluetooth. Currently don't have a dataplan on my N900. Would love ability to tether it to the Blackberry when I'm not near a wifi hotspot.

If you are successfully able to tether PC to your blackberry phone, then in theory you should be able to tether N900 to your blackberry too. The maemo-pc-connectivity application provides the functionality to do that. However, whether it actually works out for you, can be only found out by trying.

If you do try, then you'll want to tether just the pc to blackberry first, write down the ip addresses etc on the PC, and then tether with n900 and use same values in the settings. Good luck

msoini 2009-12-25 09:26

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by aironeous (Post 439504)
OMG I'm supposed to understand any of this?
Sorry if I am being rude but I'm just an end user and I am thinking that I will be very unsatisfied with EDGE as it is so slow when i can put my AT&T sim back in my N95 8GB and just keep it charged and in my backpack or in my pocket and connect to it through bluetooth to my AT&T 3g until i can manage to get a tmobile account.
Can you please stick an app in extras or promise a firware upgrade giving us this option or give simple instructions on how to bluetooth connect to my AT&T symbian phone?
I know there are many AT&T symbian phone users out there that would appreciate it, thanks.

For Nokia smartphones like N95, if you are looking for a hassle free way to use the N95's internet connection, then use the Joikuspot application or similar, which turns N95 into WiFi station. That way on N900 you don't have to do anything extra, just choose joikuspot from the list of internet connections.

dmg 2009-12-31 17:58

Re: Bluetooth PAN: Tethering N900 from another phone
 
I found the .deb here:


http://repository.maemo.org/pool/mae...+0m5_armel.deb

now, the wiki replaces

replace the /****/ with the following numbers:

4bc37c7c77ebe9
0177c050b805a8
dc79

with no spaces or lines in between. For some reason this forum does not want me to use those numbers. it mangles them when I try to use them contiguously


--dmg

qwerty12 2009-12-31 18:03

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by dmg (Post 448182)
[...]. For some reason this forum does not want me to use those numbers. it mangles them when I try to use them contiguously


--dmg

It mangles them because those keys aren't meant to be shared.

Go here to get your own key which is not to be shared.

Bingley Joe 2010-01-05 23:20

Re: Bluetooth PAN: Tethering N900 from another phone
 
Ok, this really is great once you get it going -- many many thanks to all who helped figure out the process.

Because I'm essentially a complete Linux noob, I thought I'd write up a more verbose description of how I got this working on OS X (10.6.2).

YMMV, and I take no responsibility for any trouble you get yourself into, but I hope this helps:


- Go into OS X's Bluetooth preferences and make sure Bluetooth is "On", and "Discoverable". Then click "Advanced", and select "Share my Internet connection with other Bluetooth devices". Click "OK" and close System Preferences.


- Download the most recent 'host-pc-connectivity' installer file from HERE. Currently (as of Jan 5, 2010):

https://garage.maemo.org/frs/downloa...vity-0.9.1.dmg

Run the installer PKG and follow whatever instructions it gives.


- visit the link provided by qwerty12 to obtain your own key for downloading the network dummy file in the next step


- visit the link provided by dmg and paste the key you obtained earlier into the URL where the wiki has 'mangled' it (aka: replaced it with asterisks)

If successful, the .deb file should download for you


- connect to the phone via Bluetooth and copy that file somewhere you'll be able to find it later via X-Terminal. I put it in Documents, so the rest of my instructions will assume that's where you put it as well. I also assume you've already got the root-shell enabled if you're monkeying around with this kind of thing (if not, you'll need to go get that package installed first)


- open X-Terminal and type the following:

Code:

sudo gainroot
dpkg -i /home/user/MyDocs/.documents/libicd-network-dummy_0.12+0m5_armel.deb

If all goes well, the package will install.

Execute the three commands listed in the installation's output (for adding the dummy network and getting autoconnect to work).

Reboot the phone.


EDIT:
- Install BlueTooth DUN using Application Manager
/EDIT


- Install 'maemo-pc-connectivity' using Application Manager and configure it according to the instructions HERE.

The important settings in my case were:

Bluetooth -- Enable, all other settings default
Bluetooth address -- click search and select appropriate computer
Internet -- Connect using Bluetooth, DNS: [enter your preferred primary DNS here]

Save your settings and exit back to the desktop.


- Open OS X's System Preferences and go into "Network"


- Select "Bluetooth PAN" from the list of network interfaces on the left (add it using the "+" symbol if it's not there).


- Click "Advanced..." and select "Manually" from the "Configure IPv4" dropdown


- Set "IPv4 Address" to "192.168.3.14", and "Subnet Mask" to "255.255.255.0". Leave "Router" empty. Click "OK" to return to Network prefs. Click "Apply".


- Go into OS X's "Sharing" preferences, select Internet Sharing, and enable "Bluetooth PAN" in the options there. Click "Start" to turn on internet sharing.


That's it! (or at least it was in my case, again YMMV) Now go to the Connection Switcher in the notification area of the N900 and select the Environment you created in the step above. If all goes well, after a second or two the phone will connect to the computer via Bluetooth, select the dummy network as its internet connection (you may need to go tell it to use the dummy connection the first time), and begin to pull data from the computer.

Very VERY cool.

:)

karatestarfish 2010-04-15 04:00

Re: Bluetooth PAN: Tethering N900 from another phone
 
Hi all. Sorry to revive an old thread, but I'm having problems with the setup.

The steps above were really useful, but when I apply the environment I created in the pc-connectivity manager, the bluetooth pairs with the PC no problems, but the network isn't setup.

Should there be a bnep0 interface at that point? The PC seems to set up a bluetooth network interface ok (using static IP), but nothing doing on the N900 side. Any suggestions?


EDIT: Ok, solved the issue well enough for now.

Connection switcher still doesn't work for me (except it does change the interface and DNS options properly). But if I initiate the network connection on the PC side, then run 'ifup bnep0', it will set up the network properly.

On an aside note, Windows 2000 networking sucks. I've had to use ssh as a socks proxy and a little utility called udpfwd to forward network requests properly. Nevertheless, I now have a successful bluetooth network connection!

Thanks to everyone who was helping me by PM, I appreciate the effort =)

igorgomes 2010-04-24 13:30

Re: Bluetooth PAN: Tethering N900 from another phone
 
Anybody got succeeded on this lately? I've tried yesterday but I couldn't install the connectivity because the upstart isn't installable. I've done the trick of disable one of the repos and tried, but no success.

I'm eager to use my laptop's internet connection with my N900 via bluetooth! Unfortunately I can't do it using the wireless because I use it to get the signal...

Any hints?

Thanks!

tirtawn 2010-04-25 00:07

Re: Bluetooth PAN: Tethering N900 from another phone
 
Another simple way: Buy another wireless Card (USB) then you have 2 wireless where the other one can be used to share internet. (Dumb approach but definitely works)

crasbelize 2010-06-05 09:21

Re: Bluetooth PAN: Tethering N900 from another phone
 
is there an app for this yet????

I tried several steps and got frustrated..... maemo-pan won't install because I am missing a 'blue-utilz'

Help???

Bingley Joe 2010-06-05 15:40

Re: Bluetooth PAN: Tethering N900 from another phone
 
I've gone through the procedure two more times now since PR1.2 was released (re-flashing -- don't ask :p), and it's worked every time on the first try, so I'm at a loss as to where the problem exists for others..

I guess it could be an OS issue.. what operating systems are people using?

crasbelize 2010-06-06 05:42

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by Bingley Joe (Post 701201)
I've gone through the procedure two more times now since PR1.2 was released (re-flashing -- don't ask :p), and it's worked every time on the first try, so I'm at a loss as to where the problem exists for others..

I guess it could be an OS issue.. what operating systems are people using?

Maemo 5 - 10.2010.19-1.002

i just need help installing something 'bluez-utiliz'

Bingley Joe 2010-06-06 05:57

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by crasbelize (Post 701901)
Maemo 5 - 10.2010.19-1.002

i just need help installing something 'bluez-utiliz'

Ah, OK. I was wondering more if it was a problem on the computer side.

I'm not familiar at all with bluez-utilz -- what's it do?

TiagoTiago 2010-09-18 02:11

Re: Bluetooth PAN: Tethering N900 from another phone
 
I'm a bit lost, i got the Dummy showing in the connections list, but i'm stuck now, what is the next step? (I'm intending to use a N73 as the modem btw)

Matan 2010-09-18 11:54

Re: Bluetooth PAN: Tethering N900 from another phone
 
Why not use DUN? It is the default method for using a phone as a modem. According to the manual, N73 has DUN, but not PAN.

Instructions for using a BT DUN modem are here:

http://talk.maemo.org/showthread.php?t=37198

TiagoTiago 2010-09-18 13:21

Re: Bluetooth PAN: Tethering N900 from another phone
 
Ah, thanx, i'll try that


well, still trying, the step by step guide is all over the place :(

helloct 2011-04-10 01:11

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by qwerty12 (Post 448185)
It mangles them because those keys aren't meant to be shared.

Go here to get your own key which is not to be shared.

I got this message when i try to install it, "Unable to install "libicd-network-dummy". Incompatible application package." :(

codye75 2011-04-10 01:28

Re: Bluetooth PAN: Tethering N900 from another phone
 
I tried following the methods described in this post, but still can't get it going. A step by step guide for this would be appreciated.

helloct 2011-04-10 01:44

Re: Bluetooth PAN: Tethering N900 from another phone
 
Quote:

Originally Posted by codye75 (Post 984804)
I tried following the methods described in this post, but still can't get it going. A step by step guide for this would be appreciated.

I dont know why its so hard to make clear step by step for this. This is one reason why Linux is far behind. :mad:


All times are GMT. The time now is 09:05.

vBulletin® Version 3.8.8