LinuxCommandLibrary

l2ping

sends L2CAP echo requests to a Bluetooth device, similar to ping for IP networks

TLDR

Ping a Bluetooth device

$ l2ping [AA:BB:CC:DD:EE:FF]
copy
Send specific number of packets
$ l2ping -c [5] [AA:BB:CC:DD:EE:FF]
copy
Set packet size
$ l2ping -s [1024] [AA:BB:CC:DD:EE:FF]
copy
Use specific Bluetooth adapter
$ l2ping -i [hci0] [AA:BB:CC:DD:EE:FF]
copy
Set timeout
$ l2ping -t [10] [AA:BB:CC:DD:EE:FF]
copy

SYNOPSIS

l2ping [options] bdaddr_

DESCRIPTION

l2ping sends L2CAP echo requests to a Bluetooth device, similar to ping for IP networks. Measures round-trip time, detects packet loss, and tests Bluetooth connectivity. Part of the BlueZ Bluetooth stack.

PARAMETERS

-i hciX

Use specific Bluetooth adapter.
-c count
Number of packets to send.
-s size
Size of data packets in bytes.
-t timeout
Response timeout in seconds.
-d delay
Delay between pings in seconds.
-f
Flood ping mode (use with care).
-r
Reverse ping mode.

CAVEATS

Requires root privileges. Not all Bluetooth devices respond to L2CAP pings. The Bluetooth adapter must be up and enabled.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community