Guest DarrellK Posted January 5, 2010 Report Posted January 5, 2010 (edited) It is, IMO, ridiculous that a smartphone can be sold without Bluetooth networking capabilities built in. I've read all the arguments about Network providers not being too keen on "tethering" as it is now called, I don't want to revisit that here. But just one point - SatNav devices which need to use BT networking to retrieve traffic updates. Because of this I might need to keep my old cheapo Sony phone with a PAYG sim in the car, just as a "modem" for the SatNav. ( I know I could buy a full navigation solution for the Pulse, and use that in the car, but I already have Tomtom on a Pocket PC device, so why should I have to?) That said, I know there are at least a couple of solutions for Android, Wifi Tether and pdanet, but these don't work on the Pulse, at least with currently available kernels/Android versions. Anyway, we should focus on getting DUN/PAN profiles started on the phone automatically with other BT profiles when BT is switched on. It should work exactly like it does on an old Sony/Nokia/whatever "dumb" phone. I think we should concentrate on DUN to start with - Wifi Tether (at least with a netfilter-enabled kernel) will be there for those who need "serious" tethering for a laptop, and many SatNav devices can only utilise DUN, not PAN. Looking at what we need versus what we've got at the moment, ***EDIT - pppd is started by default on the Pulse (at least with Paul's U8230 kernel - did you add this Paul?) and stupid amateur misunderstanding of grep output - pppd is not running*** it is possible to start the DUN service manually using an ADB shell, by issuing the command sdptool add --channel=2 DUN . After doing this the DUN service shows up with a sdptool browse xx:xx:xx:xx:xx:xx from a client laptop (and also in the BT service explorer in my Windows Mobile pda/satnav). But connection attempts fail (i.e. rfcomm bind seems to work, but rfcomm connect returns connection refused). I tried to (well succeeded) insert the necessary service start command into init.qcom.rc in Paul's U8230 ROM, and reflashed the boot partition on the Pulse, copying the format of the BT audio/headset commands in the init file: service dun /system/bin/sdptool add --channel=2 DUN user bluetooth group bluetooth net_bt_admin disabled oneshot Of course this was quite useless on its own, as the service must be disabled at this early stage in the Android boot process, as BT radio would not be up at this time, even if the user had it enabled at shutdown. What happens later on, at BT radio switch on, is that the audio profiles are enabled in android.server.BluetoothDeviceService.java: private final Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case MESSAGE_REGISTER_SDP_RECORDS: //TODO: Don't assume HSP/HFP is running, don't use sdptool, if (isEnabled()) { SystemService.start("hsag"); SystemService.start("hfag"); } break; case MESSAGE_FINISH_DISABLE: finishDisable(msg.arg1 != 0); break; } } }; If you follow the trail from there, you end up in android.os.SystemService.java: public class SystemService { /** Request that the init daemon start a named service. */ public static void start(String name) { SystemProperties.set("ctl.start", name); } /** Request that the init daemon stop a named service. */ public static void stop(String name) { SystemProperties.set("ctl.stop", name); } } I suppose one possible next step would be rebuild the android server stuff, to include a SystemService.start("dun") in there, but perhaps there is another way, which would avoid having to rebuild the core android stuff? One this I haven't found yet, is where the BT file transfer stuff is enabled. This also from the U8230 init.qcom.rc: service bm3OPP /system/bin/sdptool add --channel=4 OPUSH user bluetooth group bluetooth net_bt_admin disabled oneshot but I haven't yet found how this is enabled after BT radio comes up, but it must be done somewhere, because file send/receive works. Perhaps when I find this, it will point to another method of getting DUN up and running. I'm sure this wouldn't be the end of the matter, as there might be a need for some plumbing/config to make DUN talk to pppd correctly. But I thought I'd share what I've discovered so far. Please bear with me if all this is obvious and/or unoriginal research, I'm just an old-fashioned IBM AS/400 programmer feeling my way with all this new-fangled stuff :) . Edited January 5, 2010 by DarrellK
Guest DarrellK Posted January 5, 2010 Report Posted January 5, 2010 Edited post above - pppd is NOT running, perhaps not even available, stupid mistake on my part. we'll also need dund. Yes, I know I'm out of my depth, but I learn fast :) Darrell
Guest xangma Posted January 5, 2010 Report Posted January 5, 2010 Really sorry ... could be just cause i'm drunk, but I swear pdanet is working on my pulse =/
Guest DarrellK Posted January 5, 2010 Report Posted January 5, 2010 Really sorry ... could be just cause i'm drunk, but I swear pdanet is working on my pulse =/ Bluetooth or USB? from their page in Android Market: "Bluetooth DUN requires Android 2.0".
Guest xymod Posted January 7, 2010 Report Posted January 7, 2010 So does that mean that as it is the Pulse does not support PAN at all at the moment :) I was hoping I could use my bluetooth dongle at work (poor wifi in my office) to bridge a connection to my computer NIC under Windows Network Connections but to do that it appears I need to connect to a PAN enabled device. Or can I?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now