{"id":88,"date":"2009-12-07T19:53:30","date_gmt":"2009-12-08T03:53:30","guid":{"rendered":"http:\/\/intr.overt.org\/blog\/?p=88"},"modified":"2009-12-07T19:53:30","modified_gmt":"2009-12-08T03:53:30","slug":"controlling-bluetooth-dun-with-upstart-on-the-n900-part-2","status":"publish","type":"post","link":"https:\/\/blog.intr.overt.org\/?p=88","title":{"rendered":"Controlling Bluetooth DUN with upstart on the n900: Part 2"},"content":{"rendered":"<p>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 <em>\/var\/run\/sdp<\/em> socket created by <em>bluetoothd<\/em> and needed by <em>sdptool<\/em> is not present when <em>bluetooth-dun<\/em> runs.<\/p>\n<p>I&#8217;ve now updated the <a href=\"http:\/\/intr.overt.org\/misc\/bluetooth-dun\">script<\/a> to wait until the socket appears before continuing. (And as upstart is asynchronous, only the DUN service is delayed by the wait).<\/p>\n<p>Now, the mechanism I used for the wait is a crude &#8216;while-not-exist&#8217; loop with a one second sleep. The dbus script does this so I felt it was morally acceptable. It&#8217;s crude and an <em>inotifywait<\/em> approach would be better but that utility isn&#8217;t installed by default. Finally, the delay should really be in the bluetoothd script so that it doesn&#8217;t signal readiness until it <em>really<\/em> is&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;ve now updated the script to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-rambling"],"_links":{"self":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts\/88"}],"collection":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88"}],"version-history":[{"count":0,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}