BTPAND(8)
π BTPAND(8) β the Bluetooth PAN daemon, bestie edition
okay so real talk: this is btpand(8) from the System Manager's Manual, and she's the one who handles all your Bluetooth networking biz. sit down, grab a strawberry drink π, and let's get into it.
β¨ NAME β¨
btpand β the Bluetooth PAN daemon. that's it, that's her. π
πΈ SYNOPSIS πΈ
btpand [-i ifname] [-m mode] -a addr -d device
{-s service | -S service [-p psm]}
btpand [-c path] [-i ifname] [-l limit] [-m mode] [-p psm] -d device
{-s service | -S service}
two whole invocation flavors, pick your fighter π
π¦ DESCRIPTION π¦
so the btpand daemon is out here handling Bluetooth Personal Area Networking services on your system, no cap. she can run in two whole modes:
- client mode β as a Personal Area Networking User (
PANU), which is giving main character energy - server mode β as a Network Access Point (
NAP), Group ad-hoc Network (GN), or aPANUhost
how does she connect to your system? via a tap(4) virtual Ethernet device, and then she forwards Ethernet packets out to your remote Bluetooth devices using the Bluetooth Network Encapsulation Protocol (BNEP). iconic behavior, honestly.
π the three roles, explained
the PANU client β this is the device that's using either the NAP or GN service. she can also just talk directly to a PANU host in a crossover-cable kinda way. lowkey flexible.
a GN host β forwards Ethernet packets to each of the connected PAN users as needed, but does not provide access to any additional networks. she's here for the group hang, not the extended network.
the NAP service β this one gives you some of the features of an Ethernet bridge. the NAP host forwards Ethernet packets between each of the connected PAN users, and also to a different network media. very giving.
note that the only differences betweenNAPandGNservices as implemented bybtpandare in the SDP service record. the bridging of packets by theNAPhas to be configured separately. so like... don't assume, configure it. π₯
the options are as follows, bestie:
π OPTIONS π
-aaddress β in client mode, this is the address of the remote server. you can give it as aBDADDRor as a name, and if you give a name,btpandwill attempt to resolve the address via thebt_gethostbyname(3)call. π«Ά-cpath β in server mode, specify the path to thesdpd(8)control socket. the default path is/var/run/sdp. π-ddevice β restrict connections to the local device. you can give it as aBDADDRor as a name, and if you give a name,btpandwill attempt to resolve the address via thebt_devaddr(3)call. also,btpandwill set thetap(4)interface physical address to theBDADDRof the Bluetooth radio. π that part matters, remember it.-iifname βbtpanduses thetap(4)driver to create a new network interface for use. use this option to select a specifictap(4)device interface, which must already be created. no creating-on-the-fly, she's not doing that for you. π-llimit β in server mode, limit the number of simultaneous connections. the default limit is7forNAPandGNservers, and1for aPANUserver. okay queen of setting boundaries π-mmode β set theL2CAPconnection link mode. the supported modes are:authβ require devices to be paired.encryptβauth, plus enable encryption.secureβencryption, plus change of link key.
NOT YET SUPPORTED. use global device settings to set authentication and encryption. fr fr, don't come for her, she told you.
-ppsm β use an alternativeL2CAPProtocol/Service Multiplexer (PSM) for server mode or client mode (when not using Service Discovery). the default PSM forBNEPis15(0x000f). β-sservice β name of the service to provide or connect to. the following services are recognised:GNβ Group ad-hoc Network.NAPβ Network Access Point.PANUβ Personal Area Networking User.
-Sservice β same as per-s, except thatbtpandwill not use SDP services for connection setup. going rogue, love that for her. π
π§ one little profile requirement
when providing networking services, the Bluetooth PAN profile says that the βClass of Deviceβ property of the bluetooth controller SHALL include Networking capability (set bit 0x020000). see hccontrol(8) for details. this is not a suggestion, bestie, it's a SHALL. π
π and then she dips
after btpand has set up the client or server connection and opened the tap(4) interface, it will create a pid file and detach. she's out. πΈ
π FILES π
/dev/tap/etc/bluetooth/hosts/var/run/sdp/var/run/tapN.pid
β EXIT STATUS β
the btpand utility exits 0 on success, and >0 if an error occurs. classic, clean, no notes.
π₯ EXAMPLES π₯
ifconfig tap1 create
btpand -a host -d mydevice -s NAP -i tap1
dhclient tap1
this will create a connection to the NAP on host, and link that to the tap1 interface. three lines, whole vibe. β¨
btpand -d mydevice -s GN
this will create a Group Network and register the GN service with the local SDP server. one-liner queen. π
π SEE ALSO π
bluetooth(3), bridge(4), tap(4), dhclient(8), hccontrol(8), ifconfig(8), sdpd(8)
the "Personal Area Networking Profile" and "Bluetooth Network Encapsulation Protocol" specifications are available at
http://www.bluetooth.com/
go read them, iykyk π¦
π AUTHORS π
Iain Hibbert β we stan.
π BUGS π
okay so the known issues, and we're being honest about them:
- there is no way to supply alternative values for the SDP record.
- there is no way to set net type or multicast address filters.
btpanddoes not do any address routing except to directly connected unicast addresses. all other packets are multicast. so like, don't expect routing miracles. π- as
btpanduses theBDADDRof the Bluetooth radio as the physical address of the tap, only one instance can be run per radio. literally one. per radio. periodt. btpandcan only provide a single service. one service and one service only, she's monogamous like that π
and that's the whole page, bestie!! this was btpand(8) from the System Manager's Manual, Debian build, dated August 17, 2008 β go forth and PAN responsibly π
β¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2008 Iain Hibbert
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms