4.3. Setting up the clients

From the client's point of view there is no difference whether your server has router or bridge configuration. The following steps are needed to establish a connection to a NAP.

  1. When you are connecting the first time edit /etc/affix/affix.conf file. Check that value "pan_role="panu" is enabled and role "nap" is disabled. After editing configuration file restart PAN giving the following commands.

    btpan stop

    btpan init [panu]

  2. Connect to NAP you habe set up. Give command:

    btpan -s connect <address>

Parameter -s prevents SDP query as you probably do not have SDP daemon running on the NAP server. If you leave the parameter out remember to start SDP daemon on server (run btsrv).

To check your connection type cat /proc/net/affix/pan. It lists all your active PAN connection. The example below states that your host is PAN user and it has connection to NAP which Bluetooth device address is 00:0c:76:b1:08:76.

Example 4-4. Output of cat /proc/net/affix/pan

role: PAN User
no local protocol filter
local multicast filter:
  - 33:33:ff:29:02:79
  - 33:33:ff:29:02:79
  - 33:33:00:00:00:01
  - 33:33:00:00:00:01
connections:
  - 00:0c:76:b1:08:76
no protocol filter
no multicast filter

The previous phase was analogous to connecting network cable to a traditional network interface card. The physical connection now exists. To transfer data over the line you still need to set the IP address for the network interface (pan0). You can try to run DHCP client manually or just set the address using ifconfig. Do one of the following.

Now you have a network connection established. You can add more PANUs (up to 7) repeating these steps in each client computer.

Note! If you have problems accessing network check that the routing information is correct. It should use pan0 interface as a default gateway. If you give route command the routing information might look like the following.

Example 4-6. Routing table

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.21.38.0 * 255.255.254.0 U 0 0 0 pan0
default herl1-cgw1.rese 0.0.0.0 UG 0 0 0 pan0