7.6. btpan

Use this command to establish and manage Personal Area Network (PAN) connection. In a simple PAN called piconet is one network access point (NAP) and from one to seven PAN users (PANU). Piconets can be joined and this is called scatternet. Network access point might have also connection to LAN or Internet and it share this connection with PANUs acting as a gateway.

7.6.1. General commands

help <command name> Show quick help for this command

7.6.2. PAN commands

init [role] [flags] Initializes the host. A host has two roles: network access point and PAN user. Give this as a parameter. Keywords are "nap" and "panu". Role can be also defined in configuration file /etc/affix/affix.conf file. Edit the configuration file also to enable or disable automatic PAN setup on boot.

When PAN is initialized ifconfig command shows pan interface named pan0 (if only one interface).

stop Remove pan0 network interface and uninitialized PAN.

discovery [service] Search for PAN hosts in your neighborhood. Service is one of the following keywords: NAP or PANU. SDP is used to discover hosts. To be discovered a host must have SDP server (brsrv) running.

connect <address> [service] Establish a PAN. Address is the remote Bluetooth device's address. If the remote host is not running Service Discovery Server (SDP) server use option -s to prevent SDP query, which would fail.

disconnect Disconnect from a remote host.

ctl <interface> [m (start_addr stop_addr)* ] [p (range_start range_stop)* ] Set protocol or multicast filter settings of your Bluetooth device. This allows the saving of the network bandwidth. After the interface name give whether 'm' or 'p' to add multicast or protocol filter respectively. This is followed by a set of accepted ranges. If no range is given the filter is reset to default.

For example if someone in the network is multicasting video. It is good idea to configure NAP so that video is not sent to Bluetooth devices to save the piconet's bandwidth. See the examples below how to set filters.

You can find list of protocol types at http://www.iana.org/assignments/ethernet-numbers

// show list of all filters
btpan ctl pan0 

// reset multicast filter
btpan ctl pan0 m 

// Enable only IPv4 and ARP
btpan ctl pan0 p 0x800 0x800 0x806 0x806 

// Enable only IPv6 neighbor discovery Multicast address range type
btpan ctl pan0 m 0x333300000000 0x333FFFFFFFF