View Single Post
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#7
Hi ... I tried to setup the upstart script as per your suggestion:
Code:
Nokia-N900-42-11:~# cat /etc/event.d/bluetooth-dun
description "DUN over Bluetooth"
author "Philip Langdale"

respawn
console none

start on started bluetoothd
stop on stopping bluetoothd

pre-start script
sdptool add --channel 1 DUN
end script

exec rfcomm -S -- listen -1 1 /usr/bin/pnatd '{}'

post-stop script
sdptool del `sdptool browse local | grep Dial-Up -A 1 -m 1 | tail -n 1 | cut -d ' ' -f 3`
sleep 1
end script
Nokia-N900-42-11:~#
However the job doesn't seem to automatically start after rebooting the N900:
Code:
Nokia-N900-42-11:~# ps -eaf | grep rfcomm
  933 root         0 SW<  [krfcommd]
 1845 root      2092 S    grep rfcomm
Nokia-N900-42-11:~#
I need to start it manually via:
Code:
Nokia-N900-42-11:~# initctl start bluetooth-dun
bluetooth-dun (start) waiting
bluetooth-dun (start) starting
bluetooth-dun (start) pre-start, process 1851
bluetooth-dun (start) spawned, process 1853
bluetooth-dun (start) post-start, (main) process 1853
bluetooth-dun (start) running, process 1853
Nokia-N900-42-11:~#
Nokia-N900-42-11:~# ps -eaf | grep rfcomm
  933 root         0 SW<  [krfcommd]
 1853 root      1552 S    rfcomm -S -- listen -1 1 /usr/bin/pnatd {}
 1857 root      2092 S    grep rfcomm
Nokia-N900-42-11:~#
Do you have any idea?