---
name: "l2ping"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/l2ping/8"
---

# l2ping(8)

send L2CAP ECHO\_REQUEST to remote devices

## NAME

**l2ping** – send L2CAP ECHO\_REQUEST to remote devices

## SYNOPSIS

**l2ping** \[**-fhn**\] **-a** *remote* \[**-c** *count*\] \[**-i** *wait*\] \[**-S** *source*\] \[**-s** *size*\]

## DESCRIPTION

The **l2ping** utility uses L2CAP ECHO\_REQUEST datagram to elicit an L2CAP ECHO\_RESPONSE datagram from a remote device.

The options are as follows:

- **-a** *remote*

  Specify the remote device to ping. The remote device can be specified by either its BD\_ADDR or name. If name was specified then the **l2ping** utility will attempt to resolve the name via [bt\_gethostbyname(3)](/bt_gethostbyname/3.md).

- **-c** *count*

  Number of packets to send. If this option is not specified, **l2ping** will operate until interrupted.

- **-f**

  Do not wait between sending each packet.

- **-h**

  Display usage message and exit.

- **-i** *wait*

  Wait *wait* seconds between sending each packet. The default is to wait for one second between each packet. This option is ignored if **-f** has been specified.

- **-n**

  Numeric output only. No attempt will be made to look up symbolic names for host addresses.

- **-S** *source*

  Specify the local device which should be used to send L2CAP ECHO\_REQUEST datagrams. The local device can be specified by either its BD\_ADDR or name. If name was specified then the **l2ping** utility will attempt to resolve the name via [bt\_gethostbyname(3)](/bt_gethostbyname/3.md).

- **-s** *size*

  Specify the number of payload bytes to be sent. The default size is 44 bytes. It is calculated as minimum L2CAP MTU (48 bytes) minus the size of the L2CAP signalling command header (4 bytes). The maximum size is 65531 bytes. Is is calculated as maximum L2CAP MTU (65535 bytes) minus four bytes of payload reserved for **l2ping** internal use. Use this option with caution. Some implementations may not like large sizes and may hang or even crash.

## EXIT STATUS

The **l2ping** utility exits 0 on success, and \>0 if an error occurs.

## SEE ALSO

[bluetooth(3)](/bluetooth/3.md), [netgraph(3)](/netgraph/3.md), [netgraph(4)](/netgraph/4.md), [ng\_l2cap(4)](/ng_l2cap/4.md), [l2control(8)](/l2control/8.md)

## AUTHORS

Maksim Yevmenkin ⟨*emax@FreeBSD.org*⟩

## BUGS

Could collect more statistic. Could check for duplicated, corrupted and lost packets.
