Ping Bluetooth Device

1,134 views
Skip to first unread message

Mehmet Yildirim

unread,
Mar 8, 2011, 6:54:43 AM3/8/11
to Android Linux Kernel Development
Hi,

Is it possible to ping a bluetooth device by using adb? Or by any
other tool available?

Regards

Pavan Savoy

unread,
Mar 8, 2011, 6:58:55 AM3/8/11
to android...@googlegroups.com
there is l2ping

> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel


--
--Pavan Savoy

Mehmet Yildirim

unread,
Mar 8, 2011, 9:38:19 AM3/8/11
to Android Linux Kernel Development
"l2ping: permission denied" it says

What should I do to get permission?

On Mar 8, 12:58 pm, Pavan Savoy <pavan.sa...@gmail.com> wrote:
> there is l2ping
>

Arun K. Singh

unread,
Mar 8, 2011, 11:37:14 AM3/8/11
to android...@googlegroups.com
> "l2ping: permission denied" it says
>
> What should I do to get permission?

can you elaborate your end use-case here ...? are you trying to ping
from bt enabled android phone to another bt device? l2ping would only
ping another bt enabled device over bt transport if that is your real
intent.

for permissions you want to change the ownership of your l2ping
executable by chmod 777 l2ping ...etc.

Thanks,
Arun

Mehmet Yildirim

unread,
Mar 8, 2011, 11:51:08 AM3/8/11
to Android Linux Kernel Development
Hi,

I am trying to ping from my android phone to another bt device, which
is a bt headset. I want to ping continuosly the known mac addresses of
several headsets, after that I want to create events within my
application, when some of the headsets are in range.

Under system/bin I cannot find any l2ping executable. The file is not
existing. My android version is 2.2 and I dont have a root access. Do
I need root access to just execute l2ping?

Thanks for your help,

Arun K. Singh

unread,
Mar 8, 2011, 12:41:21 PM3/8/11
to android...@googlegroups.com
On Tue, Mar 8, 2011 at 10:21 PM, Mehmet Yildirim
<yildirim...@gmail.com> wrote:
> Hi,
>
> I am trying to ping from my android phone to another bt device, which
> is a bt headset. I want to ping continuosly the known mac addresses of
> several headsets, after that I want to create events within my
> application, when some of the headsets are in range.

why not try measure rssi strength of these bd addresses via hcitool?
That way you would be able to define your threshold rssi for what you
feel is "in range" condition ...l2ping would never let you have such
control....

>
> Under system/bin I cannot find any l2ping executable. The file is not
> existing. My android version is 2.2 and I dont have a root access. Do
> I need root access to just execute l2ping?

I think l2ping should be under usr/sbin/ but you should rely on a
grep in your root fs on phone. You don't need to be root to run l2ping
or similar bluez tools ...HTH ...

Thanks,
Arun
www.crazydaks.com

Mehmet Yildirim

unread,
Mar 8, 2011, 5:01:10 PM3/8/11
to Android Linux Kernel Development
As you recommended, hcitools may fit more to my needs, however,
neither "l2ping" and "hcitools" nor "grep" functionalities are
available on my device (HTC Desire). I found hcitools from web. Since
I dont have write access, I cannot "push" hcitools to the device.

On 8 Mrz., 18:41, "Arun K. Singh" <arun...@gmail.com> wrote:
> On Tue, Mar 8, 2011 at 10:21 PM, Mehmet Yildirim
>
Reply all
Reply to author
Forward
0 new messages