Diablo PAN

From Internet Tablet Talk

Contents

UPDATE! DIABLO FIX

As of 2008-09-28, Nokia has fixed the problem with Nokia's connection manager and now allows dummy connections. The update may have been included, but if not, see the bug below for more info.

https://bugs.maemo.org/show_bug.cgi?id=3306

The information below still works, so feel free to follow it if you have a special case or want to dig in to the details a bit more.

Older Info

As of 2008-06-28, maemo-pan doesn't function correctly in the Diablo release. This page documents a workaround for those that are desperate for a Bluetooth PAN connection with the cool new features offered by Diablo.

Requirements

There are a few requirements which you've probably already met if you've gotten this far:

  • gainroot (from the becomeroot package) (from Gourmand - or use rootsh utility, it works fine too)
  • maemo-pan (from Gourmand - for PC all following works with maemo-pan 1.0, but doesn't work with maemo-pan 1.0.1)

(added by Gourmand)

  • if you wanna connect to PC Windows XP instead of phone - buy Broadcomm BT dongle with Widcomm driver and install it properly (I didn't get working connection with Bluesoleil drivers and some other dongles)
  • create on PC local area connection drivered by Bluetooth network server - use manuals and wizards to complete this task
  • join this new connection and your outgoing Internet connection by Network Bridge (hope you know how...)

Set up

The following steps have to be performed once for the workaround.

  • Create the directory /home/user/bin/ (or any place you'd like) and create a file called bt-pan.sh with:
#!/bin/sh

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

/usr/lib/maemo-pan/pan-control connect
ifconfig wlan0 down
  • Set the permissions on the script to 755.
 $ chmod 755 /home/user/bin/bt-pan.sh
  • If you want easy access to this script, it can be set up with something like Personal Menu:
 Add:
 Name: BT Pan
 Command: /home/user/bin/bt-pan.sh
  • Configure an ad-hoc (computer to computer) WiFi connection:
 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.

(added by Gourmand):

  • If you wanna connect to PC instead of phone then edit a little /usr/lib/maemo-pan/pan-control script:

1. replace BTADDR with actual address of your BT PC dongle - you can find it in Bluetooth properties on PC, finally line in script must look like this:

BTADDR=00:1A:7D:0A:C2:8A

(this is address of my dongle - your's will be rather different) 2. you may be have to add path for some system utils - in my case script was unable find them by default, then me added path for ifconfig and udhcpc, just find these names in pan-control and replace to /sbin/ifconfig and /sbin/udhcpc (of course better add sbin to PATH)

  • other steps for connecting WinPC are the same as for phone

Starting

Connecting to Bluetooth PAN requires a few more steps at the moment.

  • Start the PAN app on your phone.
  • Connect to the 'PAN Dummy' network on the tablet. (from Gourmand - in my case this doesn't start right now, I get 3-5 connection error messages, but I'm stubborn...)
  • Run the bt-pan.sh script (hopefully through Personal Menu so you don't need to use Xterm).

Shutting Down

The order of these steps aren't so important, but they should both be done.

  • Close or disconnect the PAN app on your phone.
  • Disconnect from the 'PAN Dummy' network on your tablet. I am not able to use the 'Change connection...' item until I disconnect.

To Do

  • A bit of verification would be nice.
  • Single-action connection would be nice. The bt-pan script might be able to start the 'PAN Dummy' wifi automatically or dbus-scripts could be used to run it when 'PAN Dummy' is selected.

Sources

  • The script uses existing maemo-pan tools, and the ad-hoc/dummy hints were from this thread:

http://www.internettablettalk.com/forums/showthread.php?t=6794

  • This page is the cleaned up version of discussions from this thread:

http://www.internettablettalk.com/forums/showthread.php?t=21263

  • Bug filed against Maemo and confirmed by Nokia for this issue:

https://bugs.maemo.org/show_bug.cgi?id=3306

Comments/Testimonials

Thanks. This works like a charm. All hail to the power of linux! :) I downloaded the becomeroot package for gainroot. Installed maemo pan. Followed your instructions and was up and running within a few minutes. One comment though, what does 'ifconfig wlan0 down' do? Because mine seems to be running fine with that line commented out.

Awesome, glad I could contribute something useful to the community so soon :) I'm not positive, but I believe `ifconfig wlan0 down' brings down the ad-hoc network which supposedly uses a lot of battery power. - Andrew


I have not been able to successfully use this script. While I can manually run the connect command from xterm, the script fails to make the connection. Not sure what is causing the problem. I followed the steps including using 'Personal Menu'. When setting the the menu to run in terminal, an 'unexpected end of file, expecting fi' error occurred. I added fi after the last line, and the error goes away, but running it only results in Root Shell enabled message and the PAN connection never completes.

Hmm, sounds like something is missing from the script. You might want to double check each line... the only 'fi' should be after the exit $? line. You can send me a message with the full output (and the script) and I'll take a look. - Andrew (andreww)

<Update> I took your suggestion and re-examined my script. I had originally typed it us vi in xterm. This time I copied and pasted your script into a file and then copied that file to the device. I am not sure where the difference in the two existed '(other than the fi I had added while testing), the newly copied file is working great. Thanks for the article and the help.

JB(diggin6745)



For me it worked great (n800 with MotoQ) the only problem I had was that I created the bt-pan.sh file as root, and I wasn't able to start it later. Be sure to create it without being root. Thanks a lot for this steps. I really enjoy the performance and small tweaks of Diablo and didn't wan't to go back to Chinook just for the Pan. Tarkam

Nice! Strange -- my bt-pan.sh is owned by root, maybe it was the permissions? - Andrew


All times are GMT -4. The time now is 01:52 AM.