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 β€” enable SO_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 (help for list, default = basic)
  • -a policy β€” chan policy (help for 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 (help for list, default = bredr)
  • -e seq β€” initial sequence value (default = 0)
bestie, notice how the synopsis line is l2test <mode> [options] [bdaddr]? every single one of the flags above slots into that [options] spot. and yes, help is a real value you can hand to -X and -a and -V to 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 β€” enable SO_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 (help for list, default = basic)
  • -a policy β€” chan policy (help for 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 (help for 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) πŸŽ€