[android-developers] Implementing l2ping on Android, using RFComm connection
I am developing an app that will periodically "ping" a bluetooth-
connected device. This process is similar to the linux l2ping.
The first thing that comes to my mind is to write the ping logic in
native C, and integrate into android using NDK. But it will be a time-
consuming route.
Another approach is to keeping on initiating a RFCOMM connection on a
MAC. Like this
http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureRfcommSocketToServiceRecord(java.util.UUID)
This is not a desired approach because my logic has to actually keep
catching connection exception.
L2CAP, being a lower-level protocol, should have less overhead. My
question is that whether there's any significant battery overhead, as
well as decrease in lookup speed (the delay in reaching the bluetooth
device using a MAC), on using RFCOMM connection as a ping mechanism
instead of l2ping?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home