Forums - Migration - using PackSetPDSState and calling PDSSetServiceState results in error 1026: Requested operation would have no effect

5 posts / 0 new
Last post
Migration - using PackSetPDSState and calling PDSSetServiceState results in error 1026: Requested operation would have no effect
Mark_Kimmerly
Join Date: 6 Feb 12
Posts: 16
Posted: Tue, 2012-02-14 12:29

I'm attempting to modify the Gobi API SDK sample app to turn on the GPS on my Gobi 3000 (Dell Wireless 5630 MB mini-card).  Here is the method I added to the sample app:

 ULONG cGobiCMDLL::EnableGPS( ULONG enable )
{
     ULONG status = 1;
     if( mpFnPDSSetServiceState == 0 || mhGobi == 0)
     {
        return status;
     }

   // call the pack routine
   const ULONG QMI_MAX_BUFFER = 16640;
   ULONG reqLen = QMI_MAX_BUFFER;
   BYTE req[QMI_MAX_BUFFER];
   BYTE resp[512];
   ULONG resplen = 512;

   PackSetPDSState(&reqLen, &req[0], enable);

   // Call the QMI method
   status = mpFnPDSSetServiceState(mhGobi, 2000, reqLen, &req[0], &resplen, &resp[0]);
   return status;
}

mpFnPDSSetServiceState is initialized just like all of the other API methods (via LoadLibrary/GetProcAddress).

I added a call to this method at the end of void cAsyncGobiCMConnect::Call(), below the call to mpGobiCMDLL->SetNASServingSystemCB( NASServingSystemCallback ).  However, the status comes back with error code 8, "No connection to Gobi device".  All of the other calls using mpGobiCMDLL are succeeding fine.

I apologize if I'm leaving out important details, but can anyone help me understand why this isn't working?

 

  • Up0
  • Down0
Mark_Kimmerly
Join Date: 6 Feb 12
Posts: 16
Posted: Tue, 2012-02-14 14:16

Update:

Okay, I found that I needed to include service ID 6 (Position determination) in the Connect() call.  However, Now the method comes back with error code 1026 - Requested operation would have no effect.

Can someone explain why this is happening?

  • Up0
  • Down0
Alan_Soloway Moderator
Join Date: 2 Jun 11
Posts: 358
Posted: Tue, 2012-02-14 15:13

The general reason to get that error code is that the requested state would have no effect because that state is already true.

In this case, if you are trying to enable the GPS engine and it is already enabled, then you would get that error.  You can check if that is the case by doing the GetPDSState.

 

  • Up0
  • Down0
Mark_Kimmerly
Join Date: 6 Feb 12
Posts: 16
Posted: Tue, 2012-02-14 16:01

That was it, the service was already enabled.

Thanks again!
-Mark

  • Up0
  • Down0
Alan_Soloway Moderator
Join Date: 2 Jun 11
Posts: 358
Posted: Tue, 2012-02-14 16:04

My pleasure :).

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.