LinuxCommandLibrary

l2ping

Send L2CAP echo request and receive answer

TLDR

Ping a Bluetooth device

$ sudo l2ping [mac_address]
copy


Reverse ping a Bluetooth device
$ sudo l2ping -r [mac_address]
copy


Ping a Bluetooth device from a specified interface
$ sudo l2ping -i [hci0] [mac_address]
copy


Ping Bluetooth device with a specified sized data package
$ sudo l2ping -s [byte_count] [mac_address]
copy


Ping flood a Bluetooth device
$ sudo l2ping -f [mac_address]
copy


Ping a Bluetooth device a specified amount of times
$ sudo l2ping -c [amount] [mac_address]
copy


Ping a Bluetooth device with a specified delay between requests
$ sudo l2ping -d [seconds] [mac_address]
copy

SYNOPSIS

l2ping [-i ] [-s size] [-c count] [-t timeout] [-d delay] [-f] [-r] [-v] bd_addr

DESCRIPTION

L2ping sends a L2CAP echo request to the Bluetooth MAC address bd_addr given in dotted hex notation.

OPTIONS

-i The command is applied to device hciX , which must be the name of an installed Bluetooth device (X = 0, 1, 2, ...) If not specified, the command will be sent to the first available Blue‐ tooth device. -s size The size of the data packets to be sent. -c count Send count number of packets then exit. -t timeout Wait timeout seconds for the response. -d delay Wait delay seconds between pings. -f Kind of flood ping. Use with care! It reduces the delay time be‐ tween packets to 0. -r Reverse ping (gnip?). Send echo response instead of echo re‐ quest. -v Verify response payload is identical to request payload. It is not required for remote stacks to return the request payload, but most stacks do (including Bluez). bd_addr The Bluetooth MAC address to be pinged in dotted hex notation like 01:02:03:ab:cd:ef or 01:EF:cd:aB:02:03

AUTHORS

Written by Maxim Krasnyansky and Marcel Holtmann man page by Nils Faerber , Adam Laurie .

Copied to clipboard