Reply
Thread Tools
Posts: 428 | Thanked: 54 times | Joined on Mar 2006 @ Washington DC
#21
I think his suggestion for it to be install-able is because us 770 users would like it too and we know Nokia is not going to release anymore firmware for the 770.
 
thoughtfix's Avatar
Posts: 832 | Thanked: 75 times | Joined on Dec 2005 @ Phoenix, AZ
#22
I moved this proposal to the wiki as suggested by Quim Gil at Nokia
You're welcome to add to it, etc.

https://maemo.org/community/wiki/bluetooth_pan_proposal
and linked it from
https://maemo.org/community/wiki/improvementideas.html

Millhouse: This wouldn't be the first time I built a product/enhancement spec to send down to developers, but since I am not their "bosses" in this situation I believe you are right. Can you word it better for me?

Last edited by thoughtfix; 2007-06-17 at 22:37. Reason: Fixed URL
 
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#23
Hello guys,

I'd love to see PAN supported by my Tablet (as just yesterday I figured out that my mac now supports it and my cellphone too!).
I do have a little question: will it be possible, with a PAN enabled cellphone, to connect TWO PCs to the Internet via the cellphone ?
I have tried with my Mac (connected via PAN with zero configuration from my side... gotta love it!) and my girl's one, but only one Mac at a time will connect to the internet.

I think it's a cellphone limitation, isn't it ? (SE K618i)
 
Posts: 2 | Thanked: 1 time | Joined on Jun 2007
#24
Hello everybody!!!

Before 4 days I bought a N800 and I love it immediately after I powered it up. I didn't believed that it gonna have a so fast interface and of course when I searched the Net for repositories and third party program I went crazy.

It's amazing what one man can do with a small device like that.

The first annoying problem was that there wasn't any automated way to connect to the internet through Bluetooth PAN. USB Dongles have become very cheap these days and so it is, I think, a good way to provide internet to your N800 everywhere a PC and an internet connection exists.

I recently have bought a USB Dongle(Bluetooth), before I bought the N800 and so having been in a situation where I had a PC and internet but not a Wifi connection I tried to connect to internet with N800 through Bluetooth PAN. So I tried to do it with a friends Ubuntu machine and after 3 days search in the threads and google I managed to get it work in an automated way (no Xterm commands or app launcher, only using Nokias Connection Manager).

I must admit that this is a difficult task as the post on the forum are very misleading when you have N800 and not N770 (DUMMY type not working).

At the time I am little stressed up with my thesis so I would like to ask if somebody wants to write a contol panel applet to fully automate the process and at the same time being able to configure the script with the IP address, gateway etc. (maybe DHCP enabled??). It will be I big surprize to Nokia people to provide such a feature out-of-the-box, maybe a deb package for OS 2007. As I see it a matter of time for me to get the free time to study the API and provide to the masses an easy to use, automated feature.

For the task I used dbus-scripts to be able to get the connection manager events.
Download this file dbus-scripts to your Tablet
Then as root run ''dpkg -i dbus-scripts_1.0-2_armel.deb'' from the directory you downloaded the file or you can just open the link from your N800's broswer.


With this script the only thing you want is to have you machine approprietly configured to accept and share your internet connection through bluetooth PAN. It not necessary to run "pand" commands first, as the script establish the connection for you. The only thing you have to do is Enable bluetooth and initiate the dummy ad-hoc connection. After you see the "Connected " message you will probably have Internet Connection working to N800(if your machine's configuration is OK).

I am posting the scripts here. They need futher testing.

add this line in "/etc/dbus-scripts.d/dbus-scripts-example"
Code:
/usr/bin/bluetoothPAN * * com.nokia.icd status_changed * WLAN_ADHOC
to this in a simple manner just copy paste to your terminal:
Code:
echo "usr/bin/bluetoothPAN * * com.nokia.icd status_changed * WLAN_ADHOC" >> /etc/dbus-scripts.d/dbus-scripts-example
Then restart dbus-scripts (as root):

Code:
/etc/init.d/dbus-scripts restart
open a ssh terminal and copy paste the following code.

Code:
echo '#! /bin/sh
#
# This script is invoked by dbus-scripts to enable Bluetooth PAN access
#


# 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

BTADDR='your BT MAC ADDRESS'
BTNAME=$5
# The following 2 lines are needed for the static configuration
# If you are using a DHCP configuration you can comment these 2 lines
IP=192.168.2.2
GW=192.168.2.1

# Here you MUST Define the DNS Server -- $NS variable
NS=192.168.2.1

IFACE=bnep0
PAN_ROLE=PANU # remote PAN role, one of PANU, NAP, GN

#thanks to inz on #maemo IRC channel for this
infoprint(){
dbus-send >/dev/null 2>&1 --system --print-reply --dest=com.nokia.statusbar /com/nokia/statusbar com.nokia.statusbar.system_note_infoprint "string:$*" &
}

dummy_wlan_down(){
if ifconfig wlan0 | grep -q "UP BROADCAST RUNNING" ; then
# OK wlan is up, do we have IP set up? if not (=our dummy ad-hoc) bring wlan0 down
ifconfig wlan0 | grep -q "inet addr" || ifconfig wlan0 down
fi
}

bnep_start(){
        dummy_wlan_down
        #insmod just to be sure
        insmod /mnt/initfs/lib/modules/current/bnep.ko
        #start PAN Bluetooth connection
        pand --connect $BTADDR -d $PAN_ROLE
        # wait for the interface created by pand
        s=60
        echo -n "Waiting $s secs for $IFACE"
        while [ $s -gt 0 ] ; do
                ifconfig $IFACE >/dev/null 2>&1 && break
                s=$((s-1))
                [ -t 1 ] && echo -n "."
                sleep 1
        done
        echo
        if ifconfig $IFACE >/dev/null 2>&1 ; then
        # bring it up
        echo "OK, bringing $IFACE up"

# Comment the following two lines if you want to use the DHCP configuration
        ifconfig $IFACE $IP up
        route add default gw $GW

        sleep 2
# Uncomment the following line if you want to have DHCP configuration
# WARNING -- You must set the DNS Server -- $NS variable -- search above for $NS variable
#      udhcpc -i bnep0

# The nameserver must be defined in the $NS variable,
# even with DCHP configuration, 
# because it seems like the udhcpc have to be 
# configured a little bit more, to work appropriatly.
        echo "nameserver $NS" > /tmp/resolv.conf.lo
            [ -t 1 ] || infoprint "Connected to $BTNAME"
        else
            echo "Error: $IFACE not available."
            [ -t 1 ] || infoprint "Connection failed for $BTNAME"
        fi
}

bnep_stop(){
        echo "OK, bringing $IFACE down"
# Uncomment this line if you're using DHCP configuration
# This line tries to kill the DHCP Client
#      kill -15 `ps uaxwww|grep udhcpc|grep -v grep|cut -c 1-5`
        ifconfig $IFACE down
        echo -n '' >/tmp/resolv.conf.lo
        pand -k $BTADDR
        sleep 1
        rmmod bnep
        [ -t 1 ] || infoprint "Disconnected from $BTNAME"
}

if [ "$5" = "BlueToothPAN" ]
then
case "$7" in
  CONNECTED)
        echo "Starting $BTNAME"
        bnep_start
  ;;
  IDLE)
        echo "Stopping $BTNAME"
        bnep_stop
  ;;
esac
fi

exit 0' > test
Follow the instruction of this thread to create a "not-so-dummy" adhoc connection BUT careful to give it the Name "BlueToothPAN" (case-sensitive). Make the appropriate modification to the script (address, dns, gateway) and you with have a fully working N800 connected to the internet, only choosing the "not-so-dummy" adhoc connection from the status bar applet.

If you have enabled a dhcp server, feel free to uncomment the lines for DHCP configuration mentioned in the script and comment the lines that are refering to Static Configuration if you don't want to setup a DHCP Server with PAN

If you are using Windows you will need to Share your Internet Connection and if you running a custom configuration the thing is get more strange. You will have search to google

If noone has the time or the knowledge to write the the applet I am afraid you will have to wait until either nokia(29 June - New firmware) or me provide a complete solutionn to the matter.

Viva Open Source and Linux.

PS: Maybe a dumb question. Is it possible to find the sources of connection manager or are they proprietary code of Nokia?

Last edited by PePPeRV; 2007-07-02 at 01:31.
 

The Following User Says Thank You to PePPeRV For This Useful Post:
Posts: 25 | Thanked: 1 time | Joined on Apr 2007
#25
Thanks for this trick...only problem is that i get this error:

/media/mmc2/Download # dpkg -i dbus-scripts_1.0-2_armel.del
dpkg: error processing dbus-scripts_1.0-2_armel.del (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
dbus-scripts_1.0-2_armel.del

Any ideas? I'm using a N800 with the latest stock firmware.

Thanks,

Ninja
 
gleitz's Avatar
Posts: 11 | Thanked: 2 times | Joined on May 2007 @ Boston, MA
#26
Make sure you are pointing to the right mmc card. I use the external mmc, which is mmc1. Perhaps try redownloading the file?

Has anyone has success doing this under windows? I'm using BlueSoleil bluetooth drivers, shared internet connection with PAN IP address is 192.168.0.1. My IP address in windows is 192.169.1.22. I set the script to have:
IP=192.168.0.20
GW=192.168.0.1
NS=192.168.0.1

Do I need to do something special because I am already using DHCP with my Windows IP address? I tried uncommenting "# udhcpc -i bnep0" but the script does not work. Am I supposed to comment something as well?

Last edited by gleitz; 2007-06-29 at 09:44.
 
Posts: 25 | Thanked: 1 time | Joined on Apr 2007
#27
Yeah, that was my first thought...but I pointed to the right card. The really odd part is that while I was in the fs using MidnightCom as root I coultn't find the dbus-scripts directory that the deb looks for...I am now officially stuck and confused as I can't even do it manually.

Any other thoughts? Thanks.

Ninja
 
gleitz's Avatar
Posts: 11 | Thanked: 2 times | Joined on May 2007 @ Boston, MA
#28
Are you root w/ "sudo gainroot"?
 
Posts: 25 | Thanked: 1 time | Joined on Apr 2007
#29
Originally Posted by gleitz View Post
Are you root w/ "sudo
gainroot"?
Yes.

Ninja
 
gleitz's Avatar
Posts: 11 | Thanked: 2 times | Joined on May 2007 @ Boston, MA
#30
I ditched the BlueSoleil drivers and switched to WIDCOMM. I followed the HOWTO-BlueToothNetworking instructions for Windows and WIDCOMM along with the dbus-scripts suggestion/bluetoothPAN script and now have the bluetooth PAN functioning properly, but it still requires some xterm commands to work.

I uncommented "# udhcpc -i bnep0," but I am unsure what PePPeRV is referring to when they say "comment the 2 lines above." Does that refer to "ifconfig..." and "route..." above the sleep command?

My steps are as follows:

1. Open xterm, sudo gainroot
2. pand -Q10 (accept network access on PC from n800)
3. pand -l (displays "bnep0 00:10:C6:91:18:F9 PANU)
4. Connect to network "BlueToothPan" using connection manager
5. udhcpc -i bnep0 (says deleting routers, route: no such process, and adding dns 192.169.0.1

At this point the internet works correctly, but with a little less automation that I would have liked from the script. Any thoughts on what might be the problem?

Additionally, there are a ton of echo statements in PePPeRV's script, but I never get any console output. Do I need to enable something to get the output from the bluetoothPAN script?

Thx!

EDIT: a shell script run from "osso-statusbar-cpu" automates the process, removing the xterm requirement

Last edited by gleitz; 2007-06-30 at 06:46.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:47.