Symbian Developer Library



[Index] [Previous] [Next]

PAN-NAP Role Guide

The Network Access Point (NAP) role of the PAN profile allows a device to access networking resources such as a LAN or the internet over a Bluetooth® wireless connection via a NAP enabled device.



The NAP enabled device acts as a bridge between networks, such as the Piconet and the LAN or Internet, for routing Ethernet packets.

This document provides you with background details necessary to set up and configure a Symbian device to act as a NAP.


Key concepts/terms


Typical uses

The PAN profile NAP role may be used as follows:

Configuring the PAN-NAP Role

PAN-NAP listening

As with other PAN roles plus an entry is required in the PANServiceExtensions table for NAP services.


Setting this value to true advertises availability of PAN-NAP and PANU on the device and allows DHCP to act as in its Server role, responding to DHCP configuration requests as required.

Additional NAP related configuration details

Default PAN configuration

This configuration reverts the device to the default setting whereby PANU and PAN-GN are supported roles and the device may connect to a PAN-NAP device but can not accept a PAN-NAP connection request.

The following is used to set up a standard (Pre PAN-NAP) PAN listener.


If NapServiceEnabled is set to FALSE the device will advertise PANU and PAN-GN roles only and DHCP will be configured in the Client role.


A PAN agent notifier is used to decide how to deal with a request for an uplink. Either the user will be prompted or an automated policy will be used to to decide how to handle the uplink request. There are three possible return values for an uplink request:

Managing network communications

The PAN-NAP IP hook is used to ensure the DHCP server is properly used and to enforce the requirement that only approved clients are granted access to the uplink. Since the DHCP server only supports assigning a single IP address the IP hook ensures that that address is given to the correct device. Packets are tagged as having access to the uplink. Attempts to send packets through the DHCP server that are not properly tagged will be ignored. Please see the tutorial to learn how to load an IP hook.

Loading the NAPT protocol

Create a standard socket as NAPT and configure it at required providing:

For example:

RSocket iNaptSocket;
TBool iStartNapt;
TInt iIapsStarted;
TInt err = KErrNone;
if ((err = iNaptSocket.Open(iSockServ, _L("napt"))) == KErrNone)
    iNaptInfo().iPublicIap = iUplinkIapHelper->IapId();

    iNaptInfo().iPrivateIap = iPanIapHelper->IapId();
    iNaptInfo().iNetmaskLength = 16;
    iNaptSocket.SetOpt(KSoNaptSetup, KSolNapt, iNaptInfo);
    iStartNapt = EFalse;
  // some error
// NAPT addressing configured and started.

loads NAPT as follows:


See also

Please refer to the following for more information:

Related Items

Related APIs