Skip to content

Controlling Bluetooth DUN with upstart on the n900: Part 2

As I mentioned in a quick update to my old post; I got a report of DUN not auto starting reliably, if at all. I did some digging and the cause is that the /var/run/sdp socket created by bluetoothd and needed by sdptool is not present when bluetooth-dun runs.

I’ve now updated the script to wait until the socket appears before continuing. (And as upstart is asynchronous, only the DUN service is delayed by the wait).

Now, the mechanism I used for the wait is a crude ‘while-not-exist’ loop with a one second sleep. The dbus script does this so I felt it was morally acceptable. It’s crude and an inotifywait approach would be better but that utility isn’t installed by default. Finally, the delay should really be in the bluetoothd script so that it doesn’t signal readiness until it really is…

{ 2 } Comments

  1. Mox | 18th December 2009 at 12:30 | Permalink

    Hi, and thanks for your useful info and the script.

    I’m trying to get Bluetooth PAN working in the opposite direction, could you help me with that? See:

  2. Philip Langdale | 18th December 2009 at 15:53 | Permalink

    Looks like you found your answer in your thread. I’m glad that pc-connectivity is working as advertised!

{ 3 } Trackbacks

  1. [...] (Nota: questa è una traduzione dell’articolo originale di Philip Langdale che potete trovare qui) [...]

  2. Thetering via bluetooth « N900 | 8th December 2009 at 07:34 | Permalink

    [...] fonte: Wubble e sua correção [...]

  3. [...] : If you’d like DUN started automatically, check out this and this helpful post Share this [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *