17718ced0SMaksim Yevmenkin.\" $NetBSD: btpand.8,v 1.3 2008/08/17 14:43:07 plunky Exp $ 27718ced0SMaksim Yevmenkin.\" $FreeBSD$ 37718ced0SMaksim Yevmenkin.\" 47718ced0SMaksim Yevmenkin.\" Copyright (c) 2008 Iain Hibbert 57718ced0SMaksim Yevmenkin.\" All rights reserved. 67718ced0SMaksim Yevmenkin.\" 77718ced0SMaksim Yevmenkin.\" Redistribution and use in source and binary forms, with or without 87718ced0SMaksim Yevmenkin.\" modification, are permitted provided that the following conditions 97718ced0SMaksim Yevmenkin.\" are met: 107718ced0SMaksim Yevmenkin.\" 1. Redistributions of source code must retain the above copyright 117718ced0SMaksim Yevmenkin.\" notice, this list of conditions and the following disclaimer. 127718ced0SMaksim Yevmenkin.\" 2. Redistributions in binary form must reproduce the above copyright 137718ced0SMaksim Yevmenkin.\" notice, this list of conditions and the following disclaimer in the 147718ced0SMaksim Yevmenkin.\" documentation and/or other materials provided with the distribution. 157718ced0SMaksim Yevmenkin.\" 167718ced0SMaksim Yevmenkin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 177718ced0SMaksim Yevmenkin.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 187718ced0SMaksim Yevmenkin.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 197718ced0SMaksim Yevmenkin.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 207718ced0SMaksim Yevmenkin.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 217718ced0SMaksim Yevmenkin.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 227718ced0SMaksim Yevmenkin.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 237718ced0SMaksim Yevmenkin.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 247718ced0SMaksim Yevmenkin.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 257718ced0SMaksim Yevmenkin.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 267718ced0SMaksim Yevmenkin.\" 277718ced0SMaksim Yevmenkin.Dd August 17, 2008 287718ced0SMaksim Yevmenkin.Dt BTPAND 8 297718ced0SMaksim Yevmenkin.Os 307718ced0SMaksim Yevmenkin.Sh NAME 317718ced0SMaksim Yevmenkin.Nm btpand 327718ced0SMaksim Yevmenkin.Nd Bluetooth PAN daemon 337718ced0SMaksim Yevmenkin.Sh SYNOPSIS 347718ced0SMaksim Yevmenkin.Nm 357718ced0SMaksim Yevmenkin.Op Fl i Ar ifname 367718ced0SMaksim Yevmenkin.Op Fl m Ar mode 377718ced0SMaksim Yevmenkin.Fl a Ar addr 387718ced0SMaksim Yevmenkin.Fl d Ar device 397718ced0SMaksim Yevmenkin.Brq Fl s Ar service | Fl S Ar service Op Fl p Ar psm 407718ced0SMaksim Yevmenkin.Nm 417718ced0SMaksim Yevmenkin.Op Fl c Ar path 427718ced0SMaksim Yevmenkin.Op Fl i Ar ifname 437718ced0SMaksim Yevmenkin.Op Fl l Ar limit 447718ced0SMaksim Yevmenkin.Op Fl m Ar mode 457718ced0SMaksim Yevmenkin.Op Fl p Ar psm 467718ced0SMaksim Yevmenkin.Fl d Ar device 477718ced0SMaksim Yevmenkin.Brq Fl s Ar service | Fl S Ar service 487718ced0SMaksim Yevmenkin.Sh DESCRIPTION 497718ced0SMaksim YevmenkinThe 507718ced0SMaksim Yevmenkin.Nm 517718ced0SMaksim Yevmenkindaemon handles Bluetooth Personal Area Networking services 527718ced0SMaksim Yevmenkinin the system. 537718ced0SMaksim YevmenkinIt can operate in client mode as a Personal Area Networking User 547718ced0SMaksim Yevmenkin.Pq PANU 557718ced0SMaksim Yevmenkinor in server mode as Network Access Point 567718ced0SMaksim Yevmenkin.Pq NAP , 577718ced0SMaksim YevmenkinGroup ad-hoc Network 587718ced0SMaksim Yevmenkin.Pq GN 597718ced0SMaksim Yevmenkinor PANU host. 607718ced0SMaksim Yevmenkin.Nm 617718ced0SMaksim Yevmenkinconnects to the system via a 627718ced0SMaksim Yevmenkin.Xr tap 4 637718ced0SMaksim Yevmenkinvirtual Ethernet device and forwards Ethernet packets to 647718ced0SMaksim Yevmenkinremote Bluetooth devices using the Bluetooth Network Encapsulation 657718ced0SMaksim YevmenkinProtocol 667718ced0SMaksim Yevmenkin.Pq BNEP . 677718ced0SMaksim Yevmenkin.Pp 687718ced0SMaksim YevmenkinThe PANU client is the device that uses either the NAP or GN 697718ced0SMaksim Yevmenkinservice, or can talk directly to a PANU host in a crossover 707718ced0SMaksim Yevmenkincable fashion. 717718ced0SMaksim Yevmenkin.Pp 727718ced0SMaksim YevmenkinA GN host forwards Ethernet packets to each of the connected PAN 737718ced0SMaksim Yevmenkinusers as needed but does not provide access to any additional networks. 747718ced0SMaksim Yevmenkin.Pp 757718ced0SMaksim YevmenkinThe NAP service provides some of the features of an Ethernet bridge, 767718ced0SMaksim Yevmenkinwith the NAP host forwarding Ethernet packets between each of the 777718ced0SMaksim Yevmenkinconnected PAN users, and a different network 787718ced0SMaksim Yevmenkinmedia. 797718ced0SMaksim Yevmenkin.Pp 807718ced0SMaksim YevmenkinNote, the only differences between NAP and GN services as implemented by 817718ced0SMaksim Yevmenkin.Nm 827718ced0SMaksim Yevmenkinare in the SDP service record. 837718ced0SMaksim YevmenkinThe bridging of packets by the NAP must be configured separately. 847718ced0SMaksim Yevmenkin.Pp 857718ced0SMaksim YevmenkinThe options are as follows: 867718ced0SMaksim Yevmenkin.Bl -tag -width ".Fl a Ar address" 877718ced0SMaksim Yevmenkin.It Fl a Ar address 887718ced0SMaksim YevmenkinIn client mode, address of remote server. 897718ced0SMaksim YevmenkinMay be given as BDADDR or name, in which case 907718ced0SMaksim Yevmenkin.Nm 917718ced0SMaksim Yevmenkinwill attempt to resolve the address via the 927718ced0SMaksim Yevmenkin.Xr bt_gethostbyname 3 937718ced0SMaksim Yevmenkincall. 947718ced0SMaksim Yevmenkin.It Fl c Ar path 957718ced0SMaksim YevmenkinIn server mode, specify 967718ced0SMaksim Yevmenkin.Ar path 977718ced0SMaksim Yevmenkinto the 987718ced0SMaksim Yevmenkin.Xr sdpd 8 997718ced0SMaksim Yevmenkincontrol socket. 1007718ced0SMaksim YevmenkinThe default path is 1017718ced0SMaksim Yevmenkin.Pa /var/run/sdp . 1027718ced0SMaksim Yevmenkin.It Fl d Ar device 1037718ced0SMaksim YevmenkinRestrict connections to the local 1047718ced0SMaksim Yevmenkin.Ar device . 1057718ced0SMaksim YevmenkinMay be given as BDADDR or name, in which case 1067718ced0SMaksim Yevmenkin.Nm 1077718ced0SMaksim Yevmenkinwill attempt to resolve the address via the 1087718ced0SMaksim Yevmenkin.Xr bt_devaddr 3 1097718ced0SMaksim Yevmenkincall. 1107718ced0SMaksim Yevmenkin.Nm 1117718ced0SMaksim Yevmenkinwill set the 1127718ced0SMaksim Yevmenkin.Xr tap 4 1137718ced0SMaksim Yevmenkininterface physical address to the BDADDR 1147718ced0SMaksim Yevmenkinof the Bluetooth radio. 1157718ced0SMaksim Yevmenkin.It Fl i Ar ifname 1167718ced0SMaksim Yevmenkin.Nm 1177718ced0SMaksim Yevmenkinuses the 1187718ced0SMaksim Yevmenkin.Xr tap 4 1197718ced0SMaksim Yevmenkindriver to create a new network interface for use. 1207718ced0SMaksim YevmenkinUse this option to select a specific 1217718ced0SMaksim Yevmenkin.Xr tap 4 1227718ced0SMaksim Yevmenkindevice interface which must already be created. 1237718ced0SMaksim Yevmenkin.It Fl l Ar limit 1247718ced0SMaksim YevmenkinIn server mode, limit the number of simultaneous connections. 1257718ced0SMaksim YevmenkinThe default limit is 7 for NAP and GN servers, 1267718ced0SMaksim Yevmenkinand 1 for a PANU server. 1277718ced0SMaksim Yevmenkin.It Fl m Ar mode 1287718ced0SMaksim YevmenkinSet L2CAP connection link mode. 1297718ced0SMaksim YevmenkinSupported modes are: 1307718ced0SMaksim Yevmenkin.Pp 131*e1656a88SJoel Dahl.Bl -tag -width 8n -compact 1327718ced0SMaksim Yevmenkin.It auth 1337718ced0SMaksim Yevmenkinrequire devices to be paired. 1347718ced0SMaksim Yevmenkin.It encrypt 1357718ced0SMaksim Yevmenkinauth, plus enable encryption. 1367718ced0SMaksim Yevmenkin.It secure 1377718ced0SMaksim Yevmenkinencryption, plus change of link key. 1387718ced0SMaksim Yevmenkin.El 1397718ced0SMaksim Yevmenkin.Pp 1407718ced0SMaksim YevmenkinNOT YET SUPPORTED. 1417718ced0SMaksim YevmenkinUse global device settings to set authentication and encryption. 1427718ced0SMaksim Yevmenkin.It Fl p Ar psm 1437718ced0SMaksim YevmenkinUse an alternative L2CAP Protocol/Service Multiplexer 1447718ced0SMaksim Yevmenkin.Pq PSM 1457718ced0SMaksim Yevmenkinfor server mode or client mode 1467718ced0SMaksim Yevmenkin.Pq when not using Service Discovery . 1477718ced0SMaksim YevmenkinThe default PSM for BNEP is 15 1487718ced0SMaksim Yevmenkin.Pq 0x000f . 1497718ced0SMaksim Yevmenkin.It Fl s Ar service 1507718ced0SMaksim YevmenkinName of 1517718ced0SMaksim Yevmenkin.Ar service 1527718ced0SMaksim Yevmenkinto provide or connect to, the following services are recognised: 1537718ced0SMaksim Yevmenkin.Pp 154*e1656a88SJoel Dahl.Bl -tag -width 8n -compact 1557718ced0SMaksim Yevmenkin.It GN 1567718ced0SMaksim YevmenkinGroup ad-hoc Network. 1577718ced0SMaksim Yevmenkin.It NAP 1587718ced0SMaksim YevmenkinNetwork Access Point. 1597718ced0SMaksim Yevmenkin.It PANU 1607718ced0SMaksim YevmenkinPersonal Area Networking User. 1617718ced0SMaksim Yevmenkin.El 1627718ced0SMaksim Yevmenkin.Pp 1637718ced0SMaksim Yevmenkin.It Fl S Ar service 1647718ced0SMaksim YevmenkinAs per 1657718ced0SMaksim Yevmenkin.Fl s 1667718ced0SMaksim Yevmenkinexcept that 1677718ced0SMaksim Yevmenkin.Nm 1687718ced0SMaksim Yevmenkinwill not use SDP services for connection setup. 1697718ced0SMaksim Yevmenkin.El 1707718ced0SMaksim Yevmenkin.Pp 1717718ced0SMaksim YevmenkinWhen providing networking services, the Bluetooth PAN profile says that the 1727718ced0SMaksim Yevmenkin.Sq Class of Device 1737718ced0SMaksim Yevmenkinproperty of the bluetooth controller SHALL include Networking capability 1747718ced0SMaksim Yevmenkin.Pq set bit 0x020000 . 1757718ced0SMaksim YevmenkinSee 1767718ced0SMaksim Yevmenkin.Xr hccontrol 8 1777718ced0SMaksim Yevmenkinfor details. 1787718ced0SMaksim Yevmenkin.Pp 1797718ced0SMaksim YevmenkinAfter 1807718ced0SMaksim Yevmenkin.Nm 1817718ced0SMaksim Yevmenkinhas set up the client or server connection and opened the 1827718ced0SMaksim Yevmenkin.Xr tap 4 1837718ced0SMaksim Yevmenkininterface, it will create a pid file and detach. 1847718ced0SMaksim Yevmenkin.Sh FILES 185*e1656a88SJoel Dahl.Bl -tag -width "Pa /etc/bluetooth/hosts" -compact 1867718ced0SMaksim Yevmenkin.It Pa /dev/tap 1877718ced0SMaksim Yevmenkin.It Pa /etc/bluetooth/hosts 1887718ced0SMaksim Yevmenkin.It Pa /var/run/sdp 1897718ced0SMaksim Yevmenkin.It Pa /var/run/tap Ns Em N Ns No .pid 1907718ced0SMaksim Yevmenkin.El 1910b31f1f7SUlrich Spörlein.Sh EXIT STATUS 1920b31f1f7SUlrich Spörlein.Ex -std 1937718ced0SMaksim Yevmenkin.Sh EXAMPLES 1947718ced0SMaksim Yevmenkin.Dl ifconfig tap1 create 1957718ced0SMaksim Yevmenkin.Dl btpand -a host -d mydevice -s NAP -i tap1 1967718ced0SMaksim Yevmenkin.Dl dhclient tap1 1977718ced0SMaksim Yevmenkin.Pp 1987718ced0SMaksim YevmenkinWill create a connection to the NAP on 1997718ced0SMaksim Yevmenkin.Ar host , 2007718ced0SMaksim Yevmenkinand link that to the 2017718ced0SMaksim Yevmenkin.Ar tap1 2027718ced0SMaksim Yevmenkininterface. 2037718ced0SMaksim Yevmenkin.Pp 2047718ced0SMaksim Yevmenkin.Dl btpand -d mydevice -s GN 2057718ced0SMaksim Yevmenkin.Pp 2067718ced0SMaksim YevmenkinWill create a Group Network and register the GN service with the local 2077718ced0SMaksim YevmenkinSDP server. 2087718ced0SMaksim Yevmenkin.Sh SEE ALSO 2097718ced0SMaksim Yevmenkin.Xr bluetooth 3 , 2107718ced0SMaksim Yevmenkin.Xr tap 4 , 2117718ced0SMaksim Yevmenkin.Xr bridge 4 , 2127718ced0SMaksim Yevmenkin.Xr hccontrol 8 , 2137718ced0SMaksim Yevmenkin.Xr dhclient 8 , 2147718ced0SMaksim Yevmenkin.Xr ifconfig 8 , 2157718ced0SMaksim Yevmenkin.Xr sdpd 8 2167718ced0SMaksim Yevmenkin.Pp 2177718ced0SMaksim YevmenkinThe 2187718ced0SMaksim Yevmenkin.Qq Personal Area Networking Profile 2197718ced0SMaksim Yevmenkinand 2207718ced0SMaksim Yevmenkin.Qq Bluetooth Network Encapsulation Protocol 2217718ced0SMaksim Yevmenkinspecifications are available at 2227718ced0SMaksim Yevmenkin.Dl http://www.bluetooth.com/ 2237718ced0SMaksim Yevmenkin.Sh AUTHORS 2247718ced0SMaksim Yevmenkin.An Iain Hibbert 2257718ced0SMaksim Yevmenkin.Sh BUGS 2267718ced0SMaksim YevmenkinThere is no way to supply alternative values for the SDP record. 2277718ced0SMaksim Yevmenkin.Pp 2287718ced0SMaksim YevmenkinThere is no way to set net type or multicast address filters. 2297718ced0SMaksim Yevmenkin.Pp 2307718ced0SMaksim Yevmenkin.Nm 2317718ced0SMaksim Yevmenkindoes not do any address routing except to directly connected 2327718ced0SMaksim Yevmenkinunicast addresses. 2337718ced0SMaksim YevmenkinAll other packets are multicast. 2347718ced0SMaksim Yevmenkin.Pp 2357718ced0SMaksim YevmenkinAs 2367718ced0SMaksim Yevmenkin.Nm 2377718ced0SMaksim Yevmenkinuses the BDADDR of the Bluetooth radio as the physical address 2387718ced0SMaksim Yevmenkinof the tap, only one instance can be run per radio. 2397718ced0SMaksim Yevmenkin.Pp 2407718ced0SMaksim Yevmenkin.Nm 2417718ced0SMaksim Yevmenkincan only provide a single service. 242