Posts: 1,097 | Thanked: 650 times | Joined on Nov 2007
#41
At long last (and with no changes in between except an OS upgrade), I am finally able to connect my N810 to my WM5 Blackjack via bluetooth to get fast HSDPA data conenction on my N810.

Everything works fine now .

I did make some changes to Fanoush's script, and since the last time updgraded my OS2008 to the last but one release (OS2008 1.2007.42-19). No BT hacks on my Blackjack itself (except I had my BJ unlocked recently before I made an international trip - but that should not be a contributor in any way to get things working).


Thanks for all the help.
I will get back home and list down my steps and the mods to the script itself, so that other Blackjack users might also benefit from it. (please give me some time).
 
Posts: 1,097 | Thanked: 650 times | Joined on Nov 2007
#42
Below are the steps as to how I setup on both devices and got BT PAN connection working on my Blackjack and Nokia N810.

On the Blackjack (with WM5)
--------------------------------------------

1) Turn on Bluetooth on your phone (Settings -> Connections -> Bluetooth
2) Goto Settings -> Connections -> Bluetooth -> My Information Setting
and note down the Device Name (as you set it up) and the Device address
(Note: these two values will go in the script that is setup on the N810 side for variables BTADDR and BTNAME)
3) Goto Applications -> File Explorer
4) Get into the \Windows directory
5) Scroll down to "Internet Sharing" program and start it
(see tips online on how to make a shortcut to it on WM5 desktop, since this has to be run each time you connect).
6) On PC Connection setting select Bluetooth PAN
On Network Connection : Select whichever setting came with your ISP (Media Net for me with AT&T)
7) Press Connect on the Blackjack menu after putting in above settings.


On Nokia N810 (with OS2008 OS)
------------------------------------------------

a) on IT get the root access by getting gainroot (install the becomeroot package).
becomeroot is available in the Eko One repository here:
http://www.gronmayer.com/it/index.ph...&system=maemo4


for all terminal commands, first get root permission by doing command

> "sudo gainroot"

b) Create a 'default' network connection from terminal with below command
> gconftool -s -t string /system/osso/connectivity/IAP/DEFAULT/type DUMMY


Note : Its is better to reboot you Nokia after this point and contiinute from there.

c) Setup Bluetooth pairing with your Bluetooth phone (by starting BT on both devices and pairing by entering the code as asked for on first time)

Edit : Just found that you also have to have Blutetooth Visible on the phone for the script top be able to connect. So Put BT ON and BT Visible YES.

d) Get the script as below and save on device as "pan_start.sh"
Replace the Lines for variables BTADDR and BTNAME with values as written down from Step 2 from Blackjack (Phone) setup.

e) Save the script on device as "pan_start.sh"

f) Make the file executable in terminal (as root - see sudo gainroot command above) as below by going to directory where file is saved

> cd <directory where file saved on device>

> chmod +x pan_start.sh

g) Now on Network connection - select the already created "DEFAULT" connection and connect

-------- At this step make sure Step 5, Step 6 and Step 7 is followed on Blackjack (phone) ----
-------- Make sure Bluetooth on Nokia N810 is started on ------

g) From terminal execute the pan_start script as below
> cd <directory where file saved on device>
> ./pan_start.sh

h) This should get you connected to the Phone over PAN on Bluetooth.

Hope this works for you all,
Allbest

pan_start.sh script follows below
--------------------------------------------

#!/bin/sh
# use gainroot to become root and relaunch itself

if [ `id -u` != 0 ] ; then
echo 'root'
#if not already root, call itself as root
exec sudo gainroot <<EOF
exec $0 $*
EOF
exit $?
else
echo 'notroot'
fi
# real script follows

BTADDR='00:12:34:AB:56:78' # replace with your BT Address of phone
BTNAME="Nil_blackjack" # user your Phone BT Name as assigned
#IP=192.168.2.2
#GW=192.168.2.1
NS=192.168.2.1
PAN_ROLE=NAP # remote PAN role, one of NAP, GN

infoprint(){
DBUS_SESSION_BUS_ADDRESS='unixath=/tmp/session_bus_socket' dbus-send --session --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint "string:$*" &
}

dbus_method(){
local dest=$1
shift
DBUS_REPLY=$(dbus-send 2>&1 --system --type=method_call --print-reply --dest="$dest" $* )
}

dbus_result(){
echo $DBUS_REPLY | cut -d ' ' -f 7 | tr -d \"
}

find_connection(){
#find or create connection
if dbus_method org.bluez /org/bluez org.bluez.Manager.ActivateService string:network ; then
NET_BUS=$(dbus_result)
# echo destination $NET_BUS
if dbus_method "${NET_BUS}" /org/bluez/network org.bluez.network.Manager.FindConnection string:"${BTADDR}" ; then
CONN=$(dbus_result)
else
if dbus_method "${NET_BUS}" /org/bluez/network org.bluez.network.Manager.CreateConnection string:"${BTADDR}" string:"$PAN_ROLE" ; then
CONN=$(dbus_result)
fi
fi
fi
}


bnep_start(){
#find_connection
if [ "$CONN" != "" ] ; then
echo connection $CONN
if dbus_method "${NET_BUS}" ${CONN} org.bluez.network.Connection.Connect ; then
BNEPDEV=$(dbus_result)
echo connected to $BNEPDEV
#ifconfig $BNEPDEV $IP up
#if route -n | grep -q '^0.0.0.0' ; then
# echo "default gateway already set, skipping GW and DNS setting"
#else
# route add default gw $GW
# echo "nameserver $NS" >/tmp/resolv.conf.lo
#fi
udhcpc -i $BNEPDEV
[ -t 1 ] || infoprint "Connected to $BTNAME"
fi
fi
}

bnep_stop(){
#find_connection
if [ "$CONN" != "" ] ; then
echo connection $CONN
if dbus_method "${NET_BUS}" ${CONN} org.bluez.network.Connection.Disconnect ; then
echo "OK, bringing down"
echo -n '' >/tmp/resolv.conf.lo
[ -t 1 ] || infoprint "$BTNAME disconnected"
fi
fi
}

echo "Searching for $BTADDR ..."
[ -t 1 ] || infoprint "Searching for $BTADDR"
find_connection
if [ "$CONN" = "" ] ; then
echo $DBUS_REPLY
echo "Setting up connection to $BTADDR failed"
[ -t 1 ] || infoprint "Connection to $BTADDR failed"
exit
fi

COMMAND=$1
if [ "$COMMAND" = "" ] ; then
dbus_method "${NET_BUS}" ${CONN} org.bluez.network.Connection.IsConnected
if [ "$(dbus_result)" = "true" ] ; then
COMMAND=stop
else
COMMAND=start
fi
echo $COMMAND
fi

case $COMMAND in
start) bnep_start ;;
stop) bnep_stop ;;
esac

Last edited by nilchak; 2008-02-08 at 19:28.
 

The Following User Says Thank You to nilchak For This Useful Post:
Posts: 11 | Thanked: 1 time | Joined on Feb 2008
#43
EDIT: i see the instructions now. i give it a try on my Dash. Thanks

interesting i just posted a thread about this issue....can i use this with T-Mobile Dash with WM5 ? Could you please write instructions for newbie on how to use this ^

Last edited by Kolyan2k; 2008-02-08 at 12:44.
 
Posts: 2 | Thanked: 0 times | Joined on Feb 2008
#44
How do you set up the N800 as the master on the NAP network? I believe the script posted above is to connect the N800 to a NAP master but what I need to do is have the N800 be the master so I can have other bt devices connect to it on a PAN.


I have compiled udhcpd to the N800 and now I want to set up a PAN network with my N800 as the master, then I can have several BT devices connect to it, get assigned an IP address via udhcpd and gain internet access through the N800

Last edited by Gerrath; 2008-02-13 at 12:39.
 
Posts: 11 | Thanked: 1 time | Joined on Feb 2008
#45
already ran in to few problems. 1. I cant find BT address on dash. (when I connected dash to n810, tablet does show bt address. I wonder if its the same number) 2. I dont know how to access documents folder from terminal on n810 (this is where my script file is)

Last edited by Kolyan2k; 2008-02-08 at 20:52.
 
Posts: 1,097 | Thanked: 650 times | Joined on Nov 2007
#46
Kolyan

You can also find your phone BT address from the Nokia N810 itself (if yuo have already successfully paired with the phone).

On N810 - goto Settings -> Control Panel -> Phone (on Connectivity block)
and select the phone you have paied from drop down and do EDIT.
That will give you the BT address of the paied phone itself.

As you mentioned, it is indeed the same number.

To get into the Documents folder (it is a hidden folder in terminal mode)

on terminal
> cd /home/user/MyDocs/.documents

that should get you to the scripts file location.

As an aside, are you a bong (in the bengali sense) ?
 
Posts: 11 | Thanked: 1 time | Joined on Feb 2008
#47
thanks for reply no. I am not bengali.

after sudo gainroot I get msg. enable rd mode if u want........ is this correct

and after executing the script I get an error:

line1: #!/bin/sh: not found root
 
Posts: 11 | Thanked: 1 time | Joined on Feb 2008
#48
ok. thanks alot. it does work. i also followed these instructions to enable RD mode. This N810 is a big pain in the a55, but i might keep it after all. (still thinking). Now i just need to get Gnumeric and Abiword to work on N810 (i tried without success so far)

* Click the globe symbol at the upper left of the Nokia display.
* Choose "Open new browser window."
* Enter "http://gronmayer.com/it" into the address window. There are actually many software repositories on the Web, this is a personal favorite that seems to have a wide selection.
* Scroll to the bottom of the page and click "Select All Repositories." You can always delete some or all of them later, this step assures you will have a wide selection.
* Click the "Install Selected" button.
* Click "OK" to a bunch of "Add Catalog" prompts that will appear, one for each repository.
* The above steps automatically launch the application manager, but you can also launch it by clicking the four-blocks icon and choosing "Settings" and then "Application Manager".
* Choose "Browse Installable Applications."
* Choose "All".
* Scroll down to "Becomeroot", select it and choose "Install".

Now we have "becomeroot" available to get around a problem with the Nokia N810 — it doesn't have a root password and no straightforward way to create one. Ordinarily one would execute "su" and get to root access on a new system because there is no assigned password, then assign one. But the Nokia N810 is set up so there is no defined root password and no way to assign one — except by way of "becomeroot".

* Click the four-blocks icon and choose "Utilities".
* Scroll to the bottom of the list and select "Xterm".
* Type in "sudo gainroot". You will see a root prompt.
* Execute the "passwd" command and carefully assign a root password.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#49
if the script in post #42 fails in mysterious ways then check long lines, some parts splitted to multiple lines in quoting above must be single long line to work correctly, see
http://www.internettablettalk.com/fo...034#post104034
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
Posts: 9 | Thanked: 0 times | Joined on Jan 2008
#50
Nilchak,

Why do I get permission denied when I run the script? I have installed becomeroot package and I am in root already. --->#. I have followed your instructions to the letter and I am just stuck at being unable to run the script. Thanks for any help.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 21:10.