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