Updating the Network PSY Central Repository Initialization File

This topic shows you how to modify the settings of the Network PSY and the Network Location Manager so that they do not conflict with each other.

As described in Network PSY Overview, the Network PSY does not integrate directly with positioning hardware. It uses the Network Location Manager with a Network Protocol Module to connect the Location Server (eposserver.exe) to positioning hardware.

There are two places that information about the properties of the Network PSY and Network Protocol Module are stored:

  • The Network PSY registers itself as a PSY with the LBS subsystem using a Central Repository Initialization file 10285abe.cre with keys defined by the Positioning Plug-in Information API.

  • The Network Location Manager uses the file networklocationmanager.ini to specify the positioning properties of your Network Protocol Module and network.

The description of the properties of the Network PSY and the Network Protocol Module must be correctly described in both networklocationmanager.ini and 10285abe.cre.

This procedure assumes you have created a Network Protocol Module for your device's positioning hardware and have modified networklocationmanager.ini to describe correctly the properties of the Network Protocol Module/network.


  • The contents of networklocationmanager.ini as supplied with the Symbian platform are shown below. You need to modify this if your Network Protocol Module and network have different properties from the ones shown here.
    
    # networklocationmanager.ini
    
    [1]
    Version= 0.1.1        #
    ModuleId= 271064387    # dec
    ModuleName= "NetLocManager"    # 
    TechnologyType= 0010    # binary
    DeviceLocation= 0010    # binary
    Capabilities= 1111    # binary
    ClassesSupported= 111111    # binary
    TimeToFirstFix= 20000    # ms
    TimeToNextFix= 20000    # ms
    HorizontalAccuracy= 100 # real
    VerticalAccuracy= 100 # real
    CostIndicator= 3    # dec
    PowerConsumption = 2 # dec
    ExecutableName= "lbsnetlocmanager.exe"
    

  • If necessary, modify the Network PSY Central Repository Initialization text file 10285abe.txt as follows:
    1. Modify the Central Repository Initialization file for the Network PSY so that the values are the same as those in networklocationmanager.ini. The Central Repository Initialization file for the Network PSY implementation supplied with the Symbian platform is datasourcemodules\lbsposfwadaptation\lbsnetpsy\cenrep\10285abe.txt. It contains the following:
      
      cenrep
      version 1
      [owner]
      0x101f97b2
      [defaultmeta]
       0
      [platsec]
       cap_rd=ReadDeviceData cap_wr=WriteDeviceData
      [Main]
      0x1 int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x2 int 0 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x3 int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x4 int 20000000 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x5 int 20000000 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x6 real 100 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x7 real 100 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x8 int 3 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x9 int 2 0 cap_rd=alwayspass cap_wr=alwaysfail
      0xa int 2 0 cap_rd=alwayspass cap_wr=alwaysfail
      0xb int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
      0xc int 15 0 cap_rd=alwayspass cap_wr=alwaysfail
      0xd int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
      0xe int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
      0xf string "\\resource\\lbsnetpsy_name.rsc" 0 cap_rd=alwayspass cap_wr=alwaysfail
      0x10000000 int 2000000 0 cap_rd=alwayspass cap_wr=alwaysfail
      
      For a full description of the meanings of these keys, see Positioning Plug-in Information API. The important keys for this task are shown in the following table:
      Key name Key value Meaning Description

      KPSYTimeToFirstFix

      0x4

      Time to First Fix

      This must be the same time as the TimeToFirstFix value in networklocationmanager.ini.

      Important note: In the PSY Central Repository Initialization file the time is specified in microseconds. In the Integration Module .ini file the time is specified in milliseconds.

      KPSYTimeToNextFix

      0x5

      Time to Next Fix

      This must be the same time as the TimeToNextFix value in networklocationmanager.ini.

      Important note: In the PSY Central Repository Initialization file the time is specified in microseconds. In the Integration Module .ini file the time is specified in milliseconds.

      KPSYHorizontalAccuracy

      0x6

      Horizontal Accuracy

      This must be the same as the HorizontalAccuracy value in networklocationmanager.ini. The value is specified in metres.

      KPSYVerticalAccuracy

      0x7

      Vertical Accuracy

      This must be the same as the VerticalAccuracy value in networklocationmanager.ini. The value is specified in metres.

      KPSYCostIndicator

      0x8

      Cost Indicator

      This must be the same as the CostIndicator value in networklocationmanager.ini. The value is an integer taken from the TPositionQuality::TCostIndicator enum.

      KPSYPowerConsumption

      0x9

      Power Consumption

      This must be the same as the PowerConsumption value in networklocationmanager.ini. The value is an integer taken from the TPositionQuality::TPowerConsumption enum.

      KPSYTechnologyType

      0xa

      Technology Type

      This must be the same as the TechnologyType value in networklocationmanager.ini. The value is taken from the TPositionModuleInfo::_TTechnologyType enum.

      Important note: In the PSY Central Repository Initialization file the value is specified as decimal integer. In the Integration Module .ini file the value is specified in binary.

      In the file shown above, the value of 2 for this key specifies that the Network PSY supports a technology type of ETechnologyNetwork = 2 = 0010 in binary.

      KPSYCapabilities

      0xc

      Device Capabilities

      This must be the same as the Capabilities value in networklocationmanager.ini. The value is taken from the TPositionModuleInfo::_Capabilities enum.

      Important note: In the PSY Central Repository Initialization file the value is specified as a decimal integer. In the Integration Module .ini file the value is specified in binary.

      In the file shown above the value of 15 for this key specifies that the Network PSY supports the capabilities:

      ECapabilityHorizontal + ECapabilityVertical + ECapabilitySpeed + ECapabilityDirection = 15 decimal or 1111 in binary.

    2. Make a binary version of the Central Repository Initialization text file 10285abe.txt. The LBS build process makes a binary version of the Network PSY Central Repository files and copies them to epoc32\winscw\c\private\10202BE9. To rebuild the Network PSY Central Repository file you can use the makefile createlbsnetpsyrep.mk in datasourcemodules\lbsposfwadaptation\lbsnetpsy\group. Use the ROM macros to copy the Network PSY DLL and the Central Repository files into a device ROM.