![]() |
Controlling Bluetooth DUN with Upstart
Hi all,
I spent some time today writing a suitable upstart script to control bluetooth DUN. This will let it start automatically and generally act seamlessly. You can read the details and get the script from my blog post |
Re: Controlling Bluetooth DUN with Upstart
Thank you for sharing!
I was searching for somethinig like this since long time! I'll try it in the next week and will post the results. :) |
Re: Controlling Bluetooth DUN with Upstart
Quote:
|
Re: Controlling Bluetooth DUN with Upstart
Great! I don't have the device yet but your script is going to be one of the first things I'll install. So, thanks :)
One thing I'd like to know - if there are any symbian experts around - is *if* and *how* a symbian phone can connect to the internet by tethering to another phone through bluetooth dun. This is because I am going to have my voice sim in a symbian phone and my data sim into the N900. Occasionally I'd like to use some symbian apps that go online, and the simplest way could be to tether. Any hint? |
Re: Controlling Bluetooth DUN with Upstart
What happens if Bluetooth is disabled at startup and is enabled manually after that? I only want to enable Bluetooth when I need it and then it should be already possible to connect my notebook to the N900 and use the 3G connection from the N900.
|
Re: Controlling Bluetooth DUN with Upstart
So, when you disable bluetooth in the UI, the hardware is turned off but all the software keeps running, so that doesn't cause any issues.
|
Re: Controlling Bluetooth DUN with Upstart
Hi ... I tried to setup the upstart script as per your suggestion:
Code:
Nokia-N900-42-11:~# cat /etc/event.d/bluetooth-dun Code:
Nokia-N900-42-11:~# ps -eaf | grep rfcomm Code:
Nokia-N900-42-11:~# initctl start bluetooth-dun |
Re: Controlling Bluetooth DUN with Upstart
Quote:
|
Re: Controlling Bluetooth DUN with Upstart
Has anybody got DUN connection working with Windows Vista?
|
Re: Controlling Bluetooth DUN with Upstart
I too had a problem with bluetooth-dun not starting after a clean boot.
I'm also going to document, for posterity, the steps I had to go through to get DUN running between a Gentoo Linux laptop and T-Mobile, using the N900 as the relay. The N900 setup was more or less what you specified (specifically putting http://intr.overt.org/misc/bluetooth-dun into /etc/event.d and running `start bluetooth-dun`) except that I kept getting "spawning too fast" messages when testing. For my laptop, I first had problems pairing--I'm sure this is some bug with the bluez version I was using, but I eventually gave up and put the line "34:7E:39:24:88:FC 9339" in /var/lib/bluetooth/*/pincodes where the "34:..." is the bluetooth address (from `hciconfig -a` on n900) and 9339 is the pin I wanted. A `rfcomm connect 0 34:7E:39:24:88:FC` then forced a pairing attempt and I was able to enter the pin 9339 on the n900. Also, the n900 was unable to see the laptop during discovery until I ran `hciconfig hci0 piscan` I don't think this was important to my efforts because the rfcomm explictly requested the pairing. I have, more or less, the following contents of my /etc/bluetooth/hcid.conf: ------------------------------------ options { autoinit yes; security user; pairing multi; } device { name "BlueZ@%h (%d)"; class 0x3e0100; iscan enable; pscan enable; lm accept; lp rswitch,hold,sniff,park; } ------------------------------------ /etc/bluetooth/rfcomm.conf ------------------------------------ rfcomm0 { bind yes; device 34:7E:39:24:88:FC; channel 1; comment "N900 connection"; } ------------------------------------ /etc/conf.d/net ------------------------------------ config_ppp0=( "ppp" ) link_ppp0="/dev/rfcomm0" username_ppp0='guest' password_ppp0='guest' pppd_ppp0=( "debug" "ipcp-accept-remote" "ipcp-accept-local" "holdoff 3" "defaultroute" "usepeerdns" "noauth" "noipdefault noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp local" "921600" "modem crtscts" ) phone_number_ppp0=( "*99#" ) chat_ppp0=( 'ABORT' 'BUSY' 'ABORT' 'ERROR' 'ABORT' 'NO ANSWER' 'ABORT' 'NO CARRIER' 'ABORT' 'NO DIALTONE' 'ABORT' 'Invalid Login' 'ABORT' 'Login incorrect' 'TIMEOUT' '5' '' 'ATZ' 'OK' 'ATM0' 'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' 'OK' 'AT+CGDCONT=1,"IP","internet2.voicestream.com"' 'OK' 'ATDT\T' 'TIMEOUT' '60' 'CONNECT' '' 'TIMEOUT' '5' '~--' '' ) preup() { case "${IFACE}" in ppp*) modprobe ppp_generic; modprobe ppp_async;; esac return 0 } postdown() { case "${IFACE}" in ppp*) rmmod ppp_async; rmmod ppp_generic;; esac return 0 } ------------------------------------ Note my use of internet2.voicestream.com and the username/password of guest/guest. One of those two changes (from internet3.voicestream.com and no username/password) was what I had to do to get DUN working over and above what has been documented here to date. |
Re: Controlling Bluetooth DUN with Upstart
I've got a fix for the failure to start automatically and updated the script. Details on my blog.
|
Re: Controlling Bluetooth DUN with Upstart
Great. Do you know how to connect the N900 with Windows 7 and use the 3G internet connection from the phone? Do I need any specific drivers or programs? With my Nokia 5800 and Windows 7 it was very easy. Just connect the phone via Bluetooth, go to the device control panel and click on "Connect". No program or additional driver was needed. Is it the same for the N900 with this script?
|
Re: Controlling Bluetooth DUN with Upstart
Now it starts correctly but i still have issues in connecting.
In windows7 i get error 734, PPP connection terminated. I'm using the same dial-up connection i use with n900 & usb cable. Any idea? DaSilva: once the script is running and device is pared, right click on n900 in bluetoooth devices, you will find dial-up or remote connection in contextual menu. I'm unsure how to set the dialup as it is not working for me... |
Re: Controlling Bluetooth DUN with Upstart
Quote:
It is starting/working like charm for me too.(WinXP+PC Suite Drivers) (OT: I still have some issues with other tools - proftpd ftp server - trying to automatically start them on boot and maybe same cause applies there) Could you please suggest the best way to troubleshoot/monitor upstart execution? |
Re: Controlling Bluetooth DUN with Upstart
This is sort of going in the reverse direction.
Does anyone have any experience tips on Bluetooth PAN between N900 and Windows 7? The 3G reception in the Office is rubbish and we don't have wireless, so I'm thinking that connecting to my office PC via bluetooth and then using its Internet connection might be the best thing. |
Re: Controlling Bluetooth DUN with Upstart
Quote:
I'll say it's ready for packaging as 'Bluetooth DUN support' |
Re: Controlling Bluetooth DUN with Upstart
Thank you, Philipl.
As another poster mentioned, what are the chances of packaging it for us code idiots? |
Re: Controlling Bluetooth DUN with Upstart
Quote:
I'm glad people are finding it useful! |
Re: Controlling Bluetooth DUN with Upstart
Packaging was easier than expected. It's now available from the extras-devel repository. I will be beginning the promotion process but for the impatient, you can turn on extras-devel to access it. Please take the warnings about this repository seriously and exercise caution over any packages you do install, including mine!
http://wiki.maemo.org/Extras-devel |
Re: Controlling Bluetooth DUN with Upstart
quick comments:
use XB-Maemo-Display-Name field use XB-Maemo-Icon-26 filed (48x48 icon) Use more user oriented description. Do not mention upstart script in description. It is Bluetooth DUN support, that people might even understand. |
Re: Controlling Bluetooth DUN with Upstart
Thank you very many, although just after I got this working I remembered Joikuspot :)
|
Re: Controlling Bluetooth DUN with Upstart
Quote:
|
Re: Controlling Bluetooth DUN with Upstart
The bluetooth-dun package is now in the main extras repository
|
All times are GMT. The time now is 06:18. |
vBulletin® Version 3.8.8