maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Bluetooth-PAN in Diablo (https://talk.maemo.org/showthread.php?t=21263)

fgullama 2008-06-25 05:27

Bluetooth-PAN in Diablo
 
Hi all,

Has anybody had any luck getting the Bluetooth PAN for Maemo add on to work in Diablo?:

https://garage.maemo.org/projects/maemo-pan

It worked fine before I installed Diablo, but now Bluetooth-PAN does not come up as a choice to connect to. It does still list it in connections however. It's late so perhaps I'm missing something simple...

Thanks,

Frank

qwerty12 2008-06-25 05:33

Re: Bluetooth-PAN in Diablo
 
Nokia seem to have had a bit of play with icd.
It will only allow you to add types of connections that have a library to define them.
And it's closed source, so I don't know if anyone can make a DUMMY library for it. :/

dcarter 2008-06-25 05:42

Re: Bluetooth-PAN in Diablo
 
Quote:

Originally Posted by qwerty12 (Post 195427)
Nokia seem to have had a bit of play with icd.
It will only allow you to add types of connections that have a library to define them.
And it's closed source, so I don't know if anyone can make a DUMMY library for it. :/

Was this not the case before maemo-pan added the Bluetooth-PAN profile? Surely Nokia knows we will one way or another!

A shame to have a DUNny phone with Diablo, otherwise a slick OS indeed!

dcarter

smman 2008-06-25 07:42

Re: Bluetooth-PAN in Diablo
 
I hope fanoush and pycage help us. :-(

anidel 2008-06-25 07:55

Re: Bluetooth-PAN in Diablo
 
Just give time to time... this will be fixed by the 'community' for the community.

fgullama 2008-06-25 12:56

Re: Bluetooth-PAN in Diablo
 
I appreciate the responses and all the efforts made by those smarter than myself :) In the interim, I guess it's back it's time to go back to the previous release for me... I've used this functionality consistently since I found out about it. It breathed new life into my IT, and made it much more useful for me. I hope this gets fixed soon!

Frank

ponkwillis 2008-06-25 13:44

Re: Bluetooth-PAN in Diablo
 
Hi

You are not alone. I am in exactly the same situation.

I've been waiting for Diablo for weeks now - Saw it yesterday. I immediately upgraded. Turns out bluetooth PAN is no longer working. I played around with numerous settings to some how have it working. Exact same thing - shows up in connections, but if you select connection, it's not there in the list.

Heartbroken, I've downgraded to the older OS. I hope and wish it starts working again. I have a palm treo 750 (windows mobile 6) that I pair it up with.

Thanks to the great peeps who wrote maemo-PAN - kick *** application!

Request Nokia to include PAN connectivity options in future releases. There are a lot of devices out there that don't support DUN.

Linear2202 2008-06-25 15:03

Re: Bluetooth-PAN in Diablo
 
Me as well. It gave my n810 much more usefulness when needed. I hope this gets working again.

David

meizirkki 2008-06-25 15:16

Re: Bluetooth-PAN in Diablo
 
For me it was the only way to connect my tablet to internet...

Amros 2008-06-25 18:44

Re: Bluetooth-PAN in Diablo
 
Bluetooth-PAN was one of the killer apps for making my Blackjack and N810 play nicely; here's to hoping it gets updated :)

Bundyo 2008-06-25 20:40

Re: Bluetooth-PAN in Diablo
 
Vote for it:
Bug 3306

brookiemonsta 2008-06-26 09:33

Re: Bluetooth-PAN in Diablo
 
Thanks for the link Bundyo.

I've voted - this bug is bugging me bad at the moment! Can't get microb or email etc to realise the device is actually connected to the ineternet via bluetooth. Thank goodness for apt-get!

BTW I get an error message due to an incorrect ssl certificate when I click on the bugzilla link above. Swapping "bugs" for "bugzilla" seems to fix the problem. So the working link becomes: https://bugs.maemo.org/show_bug.cgi?id=3306

smman 2008-06-26 09:44

Re: Bluetooth-PAN in Diablo
 
I've voted, too.

sd_proto 2008-06-26 11:30

Re: Bluetooth-PAN in Diablo
 
A vote from me too!

Bundyo 2008-06-26 11:32

Re: Bluetooth-PAN in Diablo
 
Btw, you can make a Wifi Ad-Hoc link and use it instead, but it drains the battery real fast since it is using wifi all the time.

Good to check the mail or something fast.

karlwood 2008-06-26 21:00

Re: Bluetooth-PAN in Diablo
 
I had the same problem but I noticed if I looked at the connection details it had <PCS VISION PASSWORD> (or something similar) in the password entry for the connection. I deleted this then was able to connect fine. Hope this helps someone.

Un27Pee 2008-06-26 21:26

Re: Bluetooth-PAN in Diablo
 
same here and the phone connection wizard does not help

Benson 2008-06-26 21:27

Re: Bluetooth-PAN in Diablo
 
You say a WiFi AP link; I think you mean ad-hoc (i.e., no AP)?

qwerty12 2008-06-26 21:42

Re: Bluetooth-PAN in Diablo
 
No, I believe for ppc's (which seem to be one of the most common pan devices and judging from his posts is what Bundyo owns) there are programs that share the current internet connection on the ppc and "emulate" an ap for the tablet to connect to.

Benson 2008-06-26 22:07

Re: Bluetooth-PAN in Diablo
 
Ah, OK; I thought it was a reference to setting up an ad-hoc connection (to nothing) so the browser etc. knew there was an internet connection.

(As far as I know, PAN probably works; the problem seems to be only with the dummy connection; switching to links2 might make it work... I haven't had the opportunity to try that stuff out yet, but that was the case with USB-ethernet on pseuDiablo.)

Bundyo 2008-06-27 04:56

Re: Bluetooth-PAN in Diablo
 
Nope, i meant ad-hoc :) I'm pairing to a computer.

I really have a ppc, but i'm using DUN for it :D

fanoush 2008-06-27 06:53

Re: Bluetooth-PAN in Diablo
 
Quote:

Originally Posted by Benson (Post 196361)
Ah, OK; I thought it was a reference to setting up an ad-hoc connection (to nothing) so the browser etc. knew there was an internet connection.

(As far as I know, PAN probably works; the problem seems to be only with the dummy connection; switching to links2 might make it work... I haven't had the opportunity to try that stuff out yet, but that was the case with USB-ethernet on pseuDiablo.)

Yes this was a workaround when they broke DUMMY connections last time (in OS2007). It was possible to setup ad-hoc connection and bring the wi-fi interface down in PAN setup script so there was no battery drain. See http://www.internettablettalk.com/fo...2174#post52174

meizirkki 2008-06-27 15:22

Re: Bluetooth-PAN in Diablo
 
Ok, if it works, can you tell me (and other beginners) how to easily do it, i have already set up my pc and in chinook i used maemo-pan to connect.

andreww 2008-06-27 16:58

Re: Bluetooth-PAN in Diablo
 
I haven't been able to check battery drain yet, but I have managed to get Bluetooth working with a dummy wifi connection. I'm also using personal menu so the steps are pretty easy (no shell after writing the initial scripts). I'll provide the shell scripts in an hour or so, gotta run.

andreww 2008-06-27 19:38

Re: Bluetooth-PAN in Diablo
 
<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?

Matan 2008-06-27 20:27

Re: Bluetooth-PAN in Diablo
 
Some of the connection/disconnection process can be automated with dbus-scripts.

If you install this package, you can then have a script run whenever you connect to 'PAN Dummy' (or disconnect), thus making connection as simple as connecting to DUN supporting phone.

meizirkki 2008-06-28 07:20

Re: Bluetooth-PAN in Diablo
 
Thanks for this great how-to, ill test it as soon ai i have flashed to diablo. (i downgraded back to chinook because pan did not work).

meizirkki 2008-06-28 08:22

Re: Bluetooth-PAN in Diablo
 
what is ad-hoc?

andreww 2008-06-28 09:02

Re: Bluetooth-PAN in Diablo
 
I think ad-hoc is for computer to computer wifi networks. I can see two reasons for needing it:
1. You need to convince Maemo that you have a working connection, which would be difficult without a valid wifi connection.
2. When using the bluetooth pan startup script, it will cause an existing wifi connection to be dropped. It seems like ad-hoc connectiosn get around this.

That being said, now that I have access again, I think my instructions need to be revised a bit:

1. Start the PAN app on the phone.
2. Connect to the 'PAN Dummy' ad-hoc network.
3. Run bt-pan.sh. Everything should work at this point.
4. Run wlan-down.sh. I believe this reduces power consumption associated with the ad-hoc network.

I can dump this on a wiki page if a few other people confirm that it works.

meizirkki 2008-06-28 09:26

Re: Bluetooth-PAN in Diablo
 
I cant connect to "PAN Dummy" because there isn't any connection visible. :(

meizirkki 2008-06-28 09:30

Re: Bluetooth-PAN in Diablo
 
When i run bt-pan.sh. connection opens and i can use apt-get from console.

andreww 2008-06-28 09:37

Re: Bluetooth-PAN in Diablo
 
Try this for the setup:

Settings -> Control Panel -> Connectivity -> Connections (button) -> New (button)
Connection name: PAN Dummy
Connection type: WLAN
Click Next, then 'No' if prompted to scan for networks.
Network name: pandummy
Network is hidden: Check
Network mode (Important!): Ad hoc
Security method: None
Click Next, then the 'Advanced' button.
Select the IP Addresses tab.
Uncheck the 'Auto-retrieve IP address' check box.
Leave the other settings with their default values and click OK
Click Finish to save the network.

If that doesn't seem accurate, are you using an n800? I'm not sure if there are differences.

meizirkki 2008-06-28 09:40

Re: Bluetooth-PAN in Diablo
 
im using n810 but its not english language, that was the problemm, thanks for help, i'll test it

andreww 2008-06-28 09:52

Re: Bluetooth-PAN in Diablo
 
Cool, I was able to combine the scripts in to one based on the info from this thread. My wiki skillz are clearly lacking, but this is probably easier to read than my constant corrections to the thread itself:
http://www.internettablettalk.com/wi...tle=Diablo_PAN

Bundyo 2008-06-30 13:02

Re: Bluetooth-PAN in Diablo
 
Looks like this is going to be fixed.

bsving 2008-07-06 23:38

Re: Bluetooth-PAN in Diablo
 
I have problem getting the scripts to run. Osso-xterm, chmodded, correct path etc, but it will not find the file. I get no file error, even though the file is there and can be edited and so on. any ideas?

thanks

andreww 2008-07-07 05:23

Re: Bluetooth-PAN in Diablo
 
Quote:

Originally Posted by bsving (Post 200010)
I have problem getting the scripts to run. Osso-xterm, chmodded, correct path etc, but it will not find the file. I get no file error, even though the file is there and can be edited and so on. any ideas?

thanks

I'm not exactly sure what you mean. Is it possible that you're missing gainroot (which comes from the becomeroot package) or the maemo-pan package?

I've seen it mentioned elsewhere that if you're using a FAT file system (eg from an SD card or the 2gb onboard flash on the n810), you won't be able to execute because that bit is never set in the permissions. If this is the case, try putting the shell script in /home/user somewhere.

If neither of those help, try pasting the full output from the terminal when you execute the pan script.

bsving 2008-07-07 05:54

Re: Bluetooth-PAN in Diablo
 
I made the script in windows (copy paste), copied to mmc, then cp to home/user/bin/ and chmod'ed. I try to execute the script using the whole path (/home/user/bin/bt-pan.sh), but I simply receive 'no file' error as if I would have a typo in the file name. I have gainroot and use the default osso xterm.

andreww 2008-07-07 06:36

Re: Bluetooth-PAN in Diablo
 
1 Attachment(s)
Ah, sounds to me like the most likely problem is extra carriage returns that Windows editors usually add (although I did notice there are extra spaces on the wiki page -- I'll try to fix that). If you're familiar with vi, you can just copy and paste the content in that way.

I've attached the file here, so you can just save it and send it to your tablet (or, preferably, download it directly there). The forum made me add a .txt extension to it so you should rename it to bt-pan.sh first.

bsving 2008-07-07 07:23

Re: Bluetooth-PAN in Diablo
 
excellent :) this reply is written using n800 connected to htc s730.


All times are GMT. The time now is 00:33.

vBulletin® Version 3.8.8