View Single Post
Posts: 83 | Thanked: 27 times | Joined on Jun 2008
#25
<edit>
This post is not accurate. Follow the steps in the wiki to get PAN working:
http://www.internettablettalk.com/wi...tle=Diablo_PAN
</edit>
Sorry for the delay, but I think it ended up being worth it to get a better feel of how well the process works. Also, I apologize if some info is incorrect, I don't have the device in front of me

First, let me say that the workaround thread previously mentioned was where I found most of the info:
http://www.internettablettalk.com/fo...ead.php?t=6794

I didn't end up using the scripts because they executed programs like 'pand' that don't exist on my n810. Oh yeah, I'm also very new to this so I'm not sure what the differences are between the n800 and n810.

Following these steps should make it possible for you to use bluetooth pan with diablo.

Requirements:
- Some way to get root access, preferably without a password. I think gainroot will work fine, but I used su for some reason.
- maemo-pan package. I used the existing script /usr/lib/maemo-pan/pan-control.


Setup Step 1: Create the files.

I created /home/user/bin and placed two files in it.

bt-pan.sh (thanks fanoush for some of the original code :
Code:
#!/bin/sh
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
        exec sudo gainroot <<EOF
exec $0 $*
EOF
        exit $?
fi
/usr/lib/maemo-pan/pan-control connect
wan-down.sh:
Code:
#!/bin/sh
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
        exec sudo gainroot <<EOF
exec $0 $*
EOF
        exit $?
fi
route del default gw
ifconfig wan0 down
# Not sure this is necessary? I don't think I'm using it now.
#route add default gw 192.168.0.1
Setup Step 2: Make them easy to execute.

In xterm, chmod the files to 755 - I assume this is necessary but Personal Menu may be able to execute them without this.

Code:
chmod 755 /home/user/bin/*
I set them up in PersonalMenu to make it a shell-less startup.
- Add
Name: Bluetooth PAN
Command: /home/user/bin/bt-pan.sh

- Add
Name: Wan Down
Command: /home/user/bin/wan-down.sh

Setup Step 3: Configure a dummy wifi. I was able to use an existing wifi connection, but using the dummy was more reliable.

- Go to Connection settings, select Connections, then 'Add' button. Again, these steps were copied from the workaround thread
I named mine 'PAN Dummy' (or something similar).
Used wlan. Selected adhoc.
On the last screen, clicked 'Advanced' and Auto-Retrieve IP address.

Luckily, these steps only have to be performed once. The steps below are what I use when I need to connect.

Run Step 1: Start the PAN app on your phone. This one is easy to forget when you're trying repeatedly

Run Step 2: Optional: Disconnect from any existing WiFi connection. I don't think that this is necessary, but give it a try if you run in to problems.

Run Step 3: Run bt-pan.sh (hopefully through Personal Menu). This should eventually (less than 30 seconds) turn the bluetooth icon in the sys tray blue. Most common reason for this step failing for me was forgetting 'Run Step 1.'

Run Step 4: Start the PAN Dummy network connection from the connectivity icon.

It is likely running at this point. I've had problems ('Page loading error') at this point, which might be related to routes being configured. Also, the previous thread mentioned that ad-hoc wifi is power hungry.

Run Step 5: (Optional?) Run wan-down.sh. I think this gets rid of the ad-hoc power hunger and likely also corrects routing errors.

If you still have trouble, you can try running (as root):
route add default gw 192.168.0.1

That's the gateway for my Samsung Blackjack anyway.

Run Step 6:
To disconnect, I've just been disconnecting the PAN app on my phone. I then specifically disconnect the 'PAN Dummy' connection before using my regular wifi.


TODO:

1. This will probably require some changes since I don't have the device in front of me.

2. It seemed to be flaky starting the first time. Disconnecting from the wifi might help that. It was also flaky getting my wifi back the first time (eg, I'd have to disconnect and then reconnect to my regular wifi).

3. I think it would be pretty easy to make the bt-pan.sh script wait for a wifi and auto-correct any route settings. Similar to the original thread's loop waiting for the Bluetooth network. I'll probably work on this later if it seems like a good idea.

4. So, how long will it likely take Nokia to provide some sort of actual fix for this?

Last edited by andreww; 2008-06-28 at 16:46. Reason: Noting there are better instructions available.
 

The Following 4 Users Say Thank You to andreww For This Useful Post: