← 返回命令列表

Linux command

l2ping 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Ping a Bluetooth device

l2ping [AA:BB:CC:DD:EE:FF]

Send specific number of packets

l2ping -c [5] [AA:BB:CC:DD:EE:FF]

Set packet size

l2ping -s [1024] [AA:BB:CC:DD:EE:FF]

Use specific Bluetooth adapter

l2ping -i [hci0] [AA:BB:CC:DD:EE:FF]

Set timeout

l2ping -t [10] [AA:BB:CC:DD:EE:FF]

说明

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.

参数

-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 (no delay between packets).
-r
Reverse ping mode (send echo response instead of echo request).
-v
Verify that response payload is identical to request payload.

FAQ

What is the l2ping command used for?

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.

How do I run a basic l2ping example?

Run `l2ping [AA:BB:CC:DD:EE:FF]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -i _hciX_ do in l2ping?

Use specific Bluetooth adapter.