L2TEST(1)
πΈ NAME πΈ
l2test β the L2CAP testing tool, bestie π no cap, that's literally it, that's the whole vibe.
β¨ DESCRIPTION β¨
okay so picture this: you wanna poke at L2CAP, right? π l2test is your girl. here's the usage, exactly as she wants it:
l2test <mode> [options] [bdaddr]
π Modes π
pick your main character moment, one (1) mode at a time:
-rβ listen and receive π«Ά-wβ listen and send-dβ listen and dump incoming data π-xβ listen, then send, then dump incoming data-tβ listen, then send and receive at the same time (multitasking queen)-qβ connect, then send and receive at the same time-sβ connect and send-uβ connect and receive-nβ connect and be silent π€« (the strong silent type, iconic)-yβ connect, then send, then dump incoming data-cβ connect, disconnect, connect, ... (the on-and-off situationship π)-mβ multiple connects-pβ trigger dedicated bonding π₯°-zβ information request
π OPTIONS π
all of these are optional, but the defaults are doing a LOT of heavy lifting, so read them, fr fr:
-b bytesβ bytes, you set 'em-i deviceβ which device we're on-P psmβ the PSM-J cidβ the CID-I imtuβ incoming MTU-O omtuβ outgoing MTU-L secondsβ enableSO_LINGER-W secondsβ enable deferred setup-B filenameβ use data packets from file π-N numβ send num frames (default = infinite βΎοΈ yes really, infinite)-C numβ send num frames before delay (default =1)-D millisecondsβ delay after sending num frames (default =0)-K millisecondsβ delay before receiving (default =0)-g millisecondsβ delay before disconnecting (default =0)-X modeβ l2cap mode (helpfor list, default =basic)-a policyβ chan policy (helpfor list, default =bredr)-F fcsβ use CRC16 check (default =1)-Q numβ Max Transmit value (default =3)-Z sizeβ Transmission Window size (default =63)-Y priorityβ socket priority-H sizeβ Maximum receive buffer size-Rβ reliable mode πͺ-Gβ use connectionless channel (datagram)-Uβ use sock stream-Aβ request authentication π-Eβ request encryption-Sβ secure connection-Mβ become master π-Tβ enable timestamps β°-V typeβ address type (helpfor list, default =bredr)-e seqβ initial sequence value (default =0)
bestie, notice how the synopsis line isl2test <mode> [options] [bdaddr]? every single one of the flags above slots into that[options]spot. and yes,helpis a real value you can hand to-Xand-aand-Vto get the list of what's allowed β go look, it's giving menu. β¨
π USAGE (and yeah, she says it all again) π
not me noticing the page literally repeats itself β but we keep every crumb, so here's the whole thing a second time, no skips:
l2test <mode> [options] [bdaddr]
π Modes (the encore) π
-rβ listen and receive-wβ listen and send-dβ listen and dump incoming data-xβ listen, then send, then dump incoming data-tβ listen, then send and receive at the same time-qβ connect, then send and receive at the same time-sβ connect and send-uβ connect and receive-nβ connect and be silent-yβ connect, then send, then dump incoming data-cβ connect, disconnect, connect, ...-mβ multiple connects-pβ trigger dedicated bonding-zβ information request
π Options (the encore) π
-b bytesβ bytes-i deviceβ device-P psmβ psm-J cidβ cid-I imtuβ imtu-O omtuβ omtu-L secondsβ enableSO_LINGER-W secondsβ enable deferred setup-B filenameβ use data packets from file-N numβ send num frames (default = infinite)-C numβ send num frames before delay (default =1)-D millisecondsβ delay after sending num frames (default =0)-K millisecondsβ delay before receiving (default =0)-g millisecondsβ delay before disconnecting (default =0)-X modeβ l2cap mode (helpfor list, default =basic)-a policyβ chan policy (helpfor list, default =bredr)-F fcsβ use CRC16 check (default =1)-Q numβ Max Transmit value (default =3)-Z sizeβ Transmission Window size (default =63)-Y priorityβ socket priority-H sizeβ Maximum receive buffer size-Rβ reliable mode-Gβ use connectionless channel (datagram)-Uβ use sock stream-Aβ request authentication-Eβ request encryption-Sβ secure connection-Mβ become master-Tβ enable timestamps-V typeβ address type (helpfor list, default =bredr)-e seqβ initial sequence value (default =0)
and that's the whole page, bestie π¦ go forth and L2CAP responsibly π
this one's from the General Commands Manual collection, stamped April 2018, page L2TEST(1) π
π¦ where this page comes from
- debian bookworm: bluez 5.66-1+deb12u1 Β· GPL-2.0-or-later
- debian bookworm: bluez 5.66-1+deb12u2 Β· GPL-2.0-or-later
- debian trixie: bluez 5.82-1.1 Β· GPL-2.0-or-later
- ubuntu jammy: bluez 5.64-0ubuntu1
- ubuntu jammy: bluez 5.64-0ubuntu1.5
- ubuntu jammy: bluez 5.64-0ubuntu1.6
- ubuntu noble: bluez 5.72-0ubuntu5 Β· GPL-2.0-or-later
- ubuntu noble: bluez 5.72-0ubuntu5.7
- ubuntu noble: bluez 5.72-0ubuntu5.8 Β· GPL-2.0-or-later
- ubuntu questing: bluez 5.83-1~exp1
- ubuntu questing: bluez 5.83-1~exp1ubuntu0.1
- ubuntu resolute: bluez 5.85-4 Β· GPL-2.0-or-later
- ubuntu resolute: bluez 5.85-4ubuntu0.3
- ubuntu resolute: bluez 5.85-4ubuntu0.4 Β· GPL-2.0-or-later
- ubuntu stonking: bluez 5.87-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms