NG_BLUETOOTH(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’™ NG_BLUETOOTH(4) πŸ’™ β€” a Kernel Interfaces Manual moment

okay so bestie, gather round, because this page is literally the placeholder page of the Bluetooth stack and it's more important than it sounds πŸ‘‘ (it's section 4, kernel interfaces, iykyk)


πŸ¦‹ NAME πŸ¦‹

ng_bluetooth β€” the placeholder for global Bluetooth variables. that's it. that's the job. and it does it flawlessly πŸ’…


✨ SYNOPSIS ✨

#include <sys/types.h>
#include <netgraph/bluetooth/include/ng_bluetooth.h>

like, include these and you're in ✨


🌸 DESCRIPTION 🌸

the ng_bluetooth module is a placeholder for global Bluetooth variables. so it's not out here doing main character work, it's the backdrop that makes everyone else's main character energy possible 🫢

all Bluetooth variables can be examined and changed via sysctl(8) β€” yes, all of them, go look, it's giving open house 🏠✨

πŸŽ€ Bluetooth Variables πŸŽ€

below is the description of default variables. but heads up: each Bluetooth module might add its own variables to the tree, so the vibe is ever-expanding 🌈

  • net.bluetooth.version β€” a read-only integer variable that shows the current version of the Bluetooth stack. key word read-only, so no, you cannot change it, don't even try πŸ’€
  • net.bluetooth.hci.command_timeout β€” a read-write integer variable that controls the Host Controller Interface (HCI) command timeout, in seconds β€” i.e. how long the HCI layer will wait for the Command_Complete or Command_Status event from a Bluetooth device. it's giving "waiting for your text back" energy 😭
  • net.bluetooth.hci.connection_timeout β€” a read-write integer variable that controls the HCI connection timeout, i.e. how long the HCI layer will wait for the Connection_Complete event. normally this should not be required, since Bluetooth devices have connection timeout of their own and will send the event back ✨. this timeout is required to ensure that no connection will stall in case the HCI transport layer is broken. be careful when changing this variable. make sure you understand what you are doing. 🚨 no cap, that warning is real.
  • net.bluetooth.hci.max_neighbor_age β€” a read-write integer variable that controls time-to-live (in seconds) for entries in the HCI neighbor cache. every time a Bluetooth device performs an Inquiry operation, the results will be put in cache πŸ—‚οΈ. later when a Bluetooth device establishes a baseband connection, it will try to find the matching entry in the cache and use it. this might speed up establishment of the baseband connection. it's giving "remembering their name from the group chat" lowkey genius 🧠✨
  • net.bluetooth.l2cap.rtx_timeout β€” a read-write integer variable that controls the Link Layer Control and Adaptation Protocol (L2CAP) Retransmission Timeout (RTX), in seconds. every time the L2CAP layer submits a control command, the RTX timeout is set ⏰. the value of the RTX timeout should be greater or equal to the value of the HCI connection timeout. be careful when changing this variable. make sure you understand what you are doing. πŸ’… (and like, actually understand it)
  • net.bluetooth.l2cap.ertx_timeout β€” a read-write integer variable that controls the L2CAP Extended Retransmission Timeout (ERTX), in seconds. in some cases the remote peer may respond with PENDING status to the L2CAP control command πŸ™ˆ. in this case the L2CAP command timeout is reset to the ERTX timeout value. the value of the ERTX timeout should be greater or equal to the value of the RTX timeout. be careful when changing this variable. make sure you understand what you are doing. πŸ”₯ (last warning, bestie, for real)

πŸ‘€ SEE ALSO πŸ‘€

go read them, they're the friend group πŸŒˆπŸ’–


⭐ HISTORY ⭐

the ng_bluetooth module was implemented in FreeBSD 5.0. vintage but iconic, we stan an elder πŸŽ€


🌟 AUTHORS 🌟

Maksim Yevmenkin <m_evmenkin@yahoo.com> β€” absolute legend, thank you for your service πŸ«ΆπŸ‘‘


and that's the whole page, bestie, you ate that πŸ’…βœ¨ β€” this cutie came from the Debian build, dated November 9, 2002, so yeah, it's been serving NG_BLUETOOTH(4) realness since before most of us could read πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from