maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC) (https://talk.maemo.org/showthread.php?t=58570)

9000 2010-08-15 05:54

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by chrisp7 (Post 786606)
Im trying to set this up for my ipad. I find the wifi hotspot programmes really unreliable.

Im having a couple of issues with the installation. I have skipped steps 4.1 to 4.3 as Im assuming the DUP application on the ipad covers this?? However the issue is - I have created the script "bluetooth-pan.sh" ie saved the scriped in notepad and renamed it to bluetooth-pan.sh.
Copied it into the correct folder over SSH. Then in terminal at step 4.3.2 have typed in the code but nothing seems to happen, the same for 4.3.3. I have tried both in root and both not.
Do you have any idea what I could be doing wrong?

PS I have the latest power-kernel installed and bluetooth 'on'.

Your valuable suggestion pointed out what was missing from the procedures:

1) Install pc-connectivity-manager
2) The script cannot be created under notepad, it should be done directly under xterminal
3) Setup sudoers

For 1) I've installed pc-connectivity-manager long time ago, I didn't realize it may be essential to the bluetooth PAN. I added it back in procedure.

For 2) notepad would introduce some ^M characters in the transfer.

It doesn't matter. I've attached a tarball which contain the script bluetooth-pan.sh. You can download the tarball, put it under /home/user/, run the following command to extract it:

Code:

tar xvf bluetooth-pan.tar
then cat /home/user/bluetooth-pan.sh, you should see the content.

For 3) I found that sudoers might not by default having all the privilege granted to user. That's good, as it's more secure. Therefore, you might need to add the following files bluetooth-pan.sudoers under the /etc/sudoers/ (as root)

Code:

user ALL = NOPASSWD: /home/user/bluetooth-pan.sh
and then update the sudoers as root:
Code:

update-sudoers
I've also attached this file in the tarball.

The above has been updated in the procedures.

Thank you for your suggestion. Please let me know when you've further query.

DaSilva 2010-08-15 10:55

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by 9000 (Post 754636)
When I finish my book I'll spare time to do that. Thanks. ^^

So what is the progress with your book? ;)

9000 2010-08-15 14:52

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by DaSilva (Post 786885)
So what is the progress with your book? ;)

I might need to go deep down the forth layer of my dream where I might be able to find enough time to finish it XD

chrisp7 2010-08-15 20:57

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by 9000 (Post 786755)
Your valuable suggestion pointed out what was missing from the procedures:

1) Install pc-connectivity-manager
2) The script cannot be created under notepad, it should be done directly under xterminal
3) Setup sudoers

For 1) I've installed pc-connectivity-manager long time ago, I didn't realize it may be essential to the bluetooth PAN. I added it back in procedure.

For 2) notepad would introduce some ^M characters in the transfer.

It doesn't matter. I've attached a tarball which contain the script bluetooth-pan.sh. You can download the tarball, put it under /home/user/, run the following command to extract it:

Code:

tar xvf bluetooth-pan.tar
then cat /home/user/bluetooth-pan.sh, you should see the content.

For 3) I found that sudoers might not by default having all the privilege granted to user. That's good, as it's more secure. Therefore, you might need to add the following files bluetooth-pan.sudoers under the /etc/sudoers/ (as root)

Code:

user ALL = NOPASSWD: /home/user/bluetooth-pan.sh
and then update the sudoers as root:
Code:

update-sudoers
I've also attached this file in the tarball.

The above has been updated in the procedures.

Thank you for your suggestion. Please let me know when you've further query.

Thats great, thanks v v much for the help.

So I have installed the pc-connectivity manager, put the tar in /home/user and extracted it in terminal as you instructed.

I then try this command: chmod u+x /home/user/bluetooth-pan.sh

but it doesnt seem to 'do' anything. I tried it as root and not as root.

Also when I try the next command (as root):

user ALL = NOPASSWD: /home/user/bluetooth-pan.sh

it says /bin/sh: user: not found

Does that mean anything to you!?

9000 2010-08-15 23:28

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
The second script is the content of the file /etc/sudoers.d/bluetooth-pan.sh you should create and you should run update-sudoers for it to take effect such that sudo bluetooth-pan.sh work.

It is strange that the script doesnt work under root, probably wrong path. You may want to check the correct path of the file, i.e.

Code:

root
sudo /home/user/bluetooth-pan.sh

You may refer to latest version of the script for detail procedures. Tell me again what I missed.

WorldKaoss 2010-08-16 01:43

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
it doesn't work for me :( when I run the sudo /home/user/bluetooth-pan.sh nothing happens.

the first time I created the files in notepad, uploaded them in the right folders, chmoded them, updated the sudoers and it was the same... after that I used the files in the tar and made the same things .. restarted the device, still the same.

I must say from now that in settings, PC-Connectivity Manager is set on "None", should the "default" be enabled? what settings should I put in?

9000 2010-08-16 01:47

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by WorldKaoss (Post 787531)
it doesn't work for me :( when I run the sudo /home/user/bluetooth-pan.sh nothing happens.

the first time I created the files in notepad, uploaded them in the right folders, chmoded them, updated the sudoers and it was the same... after that I used the files in the tar and made the same things .. restarted the device, still the same.

I must say from now that in settings, PC-Connectivity Manager is set on "None", should the "default" be enabled? what settings should I put in?

The setup of sudoer is only for your convenient, if this doesn't work for you, try enter root and run the script directly.

Code:

root
sh /home/user/bluetooth-pan.sh


WorldKaoss 2010-08-16 02:43

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
now this is what I get -> http://img823.imageshack.us/img823/1412/69583474.png

however I have installed the extended kernel (setting) and (general) and I rebooted the device .. and as I know iptables is in that kernel. Also I tried to search in the App Manager for iptables and it isn't listed, what should I use to install it? apt-get install iptables?

9000 2010-08-16 02:50

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
I see...the iptables is missing. May be it's not installed by default.

In this case I think you should install iptables.

Code:

root
apt-get install iptables

I'll add that part back in the prereq. of the procedures, thanks for your feedback.

Besides, I notice that the script run fine, so you should see a menu for choosing internet connection at the beginning. Did you see that?

WorldKaoss 2010-08-16 03:13

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
it's weird because it doesn't pop up to select a connection (I tried connected to wifi and disconnected, to see) but I get the notification in that yellow field with "Bluetooth PAN Activated".

Also, I've tried connecting to the internet after pairing the pc with phone (and I've set up the IP manually on the PC) and it still doesn't work.

If you find the bug that isn't showing the connection choser let me know, I'm really interested in this and I would like to help you fix it by providing feedback.

thanks for the help


All times are GMT. The time now is 23:59.

vBulletin® Version 3.8.8