×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    74

    Bluetooth PMP Example - Limited Inquiry Access Code (LIAC)

    Hi,
    I have compiled & run the Btpmp example on mobile phone. Now I want to change the Generic Inquiry Access Code (GIAC) to Limited Inquiry Access code (LIAC) to discover only desired bluetooth devices not all.

    I have tried to set LIAC on both the devices and When I start discover devices, It shows no devices found. I have also tried to set 1 mobile phone in LIAC mode and other in GIAC. The phone which is in GIAC mode is able to search all phones including a phone with LIAC mode, but it is not able to discover services of a phone (LIAC mode).

    Here is function, which is used to set Inquiry Access code:

    iDiscoveredDeviceCount=0;
    // wipe existing device data list, start fresh
    iDevDataList=aDevDataList;
    iDevDataList->Reset();

    // load protocol for discovery
    TProtocolDesc pdesc;
    User::LeaveIfError(iSocketServ.FindProtocol(KBTLinkManagerTxt(), pdesc));

    // initialize host resolver
    User::LeaveIfError(iResolver.Open(iSocketServ, pdesc.iAddrFamily, pdesc.iProtocol));

    // start device discovery by invoking remote address lookup
    iAddr.SetIAC(KLIAC); // or KGIAC
    iAddr.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
    iResolver.GetByAddress(iAddr, iEntry, iStatus);
    SetActive();


    If you have any idea, please let me know.
    Thanks,
    hasan

  2. #2
    Registered User
    Join Date
    Aug 2007
    Posts
    74

    Re: Bluetooth PMP Example - Limited Inquiry Access Code (LIAC)

    Here is the solution:

    Add this part to Btpmp example's DeviceDiscoverer.cpp file

    // This is to set the scan mode to either KLIAC / KGLIAC
    RProperty:: Define(KPropertyUidBluetoothControlCategory, KPropertyKeyBluetoothLimitedDiscoverable, RProperty::EByteArray);

    TPckgBuf<TUint32> type = KLIAC; // or KGIAC
    RProperty::Set(KPropertyUidBluetoothControlCategory, KPropertyKeyBluetoothLimitedDiscoverable, type);
    -----------------------------------------------------------------------------

    // This is to set the inquiry mode to either KLIAC / KGLIAC
    // start device discovery by invoking remote address lookup
    iAddr.SetIAC(KGIAC);
    iAddr.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
    iResolver.GetByAddress(iAddr, iEntry, iStatus);
    SetActive();

    This will enable you to find the perticular set of devices, not all devices.
    Regards,
    Hasan

Similar Threads

  1. Replies: 4
    Last Post: 2011-03-05, 11:21
  2. Replies: 0
    Last Post: 2003-04-14, 13:10
  3. Using non-UI guided Bluetooth device inquiry -- issues
    By tkedem in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-03-30, 02:55
  4. Bluetooth Inquiry Problem.
    By manivannancoimbatore in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-02-14, 08:31
  5. Replies: 5
    Last Post: 2003-02-07, 11:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×