×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jan 2005
    Posts
    63

    Angry SetMajorClassOfDevice() not working...

    Hi all,

    i am a problem with Bluetooth device searching...my code is below, can anyone tell me that why SetMajorClassOfDevice(EMajorDeviceLanAccessPoint); is not working...my code is:

    // Code Here
    TInt error=KErrNone;
    TPtrC deviceName;
    RSocketServ socketServ;
    TInt ret_val;
    ret_val=socketServ.Connect();

    TProtocolDesc pInfo;
    _LIT(KL2Cap, "BTLinkManager");

    TBuf<32> tbuf_L2cap;
    tbuf_L2cap=KL2Cap;
    ret_val=socketServ.FindProtocol(tbuf_L2cap,pInfo);

    RHostResolver hr;
    ret_val=hr.Open(socketServ,pInfo.iAddrFamily,pInfo.iProtocol);

    TInquirySockAddr addr;
    TNameEntry entry;
    addr.SetIAC(KGIAC);

    TRequestStatus status;
    addr.SetMajorClassOfDevice(EMajorDeviceLanAccessPoint);
    /* addr.SetMinorClassOfDevice(EMinorDeviceLANFullyAvailable|EMinorDeviceLANServiceOne|EMinorDeviceLANServiceTwo
    |EMinorDeviceLANServiceThree|EMinorDeviceLANServiceFour|EMinorDeviceLANServiceFive|
    EMinorDeviceLANServiceSix|EMinorDeviceLANNoService);
    addr.SetAction(KHostResInquiry|KHostResName|KHostResIgnoreCache);
    */
    hr.GetByAddress(addr, entry,status);
    User::WaitForRequest(status);

    if (status == KErrNone)
    {
    do
    {
    deviceName.Set(entry().iName);

    TBuf<20> Dnane=deviceName;
    //CEikonEnv::Static()->AlertWin(Dnane);

    error = hr.Next( entry );
    }while( error != KErrHostResNoMoreResults );
    }

    // End Code

    My problem:

    1.In this when i am calling addr.SetIAC(KGIAC); function i am getting all the devices and when i am putting KLIAC instead of KGIAC then i am not getting any one devices...why...???

    2.Why SetMajorClassOfDevice() is not working, when i am paasing the approapriate Major device Class to this function...???

    can anyone help me...

    Thanks Alot

    Amit

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, Great Britain
    Posts
    98

    Re: SetMajorClassOfDevice() not working...

    Quote Originally Posted by amitsingh18
    1.In this when i am calling addr.SetIAC(KGIAC); function i am getting all the devices and when i am putting KLIAC instead of KGIAC then i am not getting any one devices...why...???
    Are any of the devices you are enquiring on set into Limited Inquiry mode? If not, then the KLIAC will return nothing. As I understand it, this mode is cheifly used if you have access to both client and server, for example for point to point between two phones.

Similar Threads

  1. on emulator working, on ngage isn't working
    By bojkar in forum Symbian
    Replies: 4
    Last Post: 2005-09-21, 17:15
  2. sendRedirect not working
    By nicole_yap in forum Mobile Java General
    Replies: 0
    Last Post: 2005-09-16, 03:35
  3. why program not working properly..
    By shahzad73 in forum Mobile Java General
    Replies: 0
    Last Post: 2003-03-09, 13:34
  4. 7650 / BlueUSB Bluetooth USB dongle / PC-suite not working!
    By mahaikol in forum Bluetooth Technology
    Replies: 7
    Last Post: 2002-12-28, 06:47

Posting Permissions

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