Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

  I use IPOSDET_GetGPSInfo API to get current location, 20 seconds later, the callback still is no response. so I will cancel the callback.

my code snippet

        CALLBACK_Init(&m_cb, TxGsmLocationProvider::RequestGpsCallback, this->r_pOwner);
	AEEGPSReq req = AEEGPS_GETINFO_LOCATION | AEEGPS_GETINFO_VELOCITY;
	AEEGPSAccuracy accuracy = AEEGPS_ACCURACY_LEVEL1;

	MEMSET(&m_gpsInfo, 0, sizeof(m_gpsInfo));
	nErr = IPOSDET_GetGPSInfo(this->m_pIPosDet, req, accuracy, &this->m_gpsInfo, &this->m_cb);
	TLOG1("GPS: Request GPS err: %d", nErr);

	if(SUCCESS == nErr)
	{
           AEEApplet * pMe = (AEEApplet *)GETAPPINSTANCE();
	   JInt32 nTimerMs = TIMEOUT_MS;
	   ISHELL_SetTimer(pMe->m_pIShell, nTimerMs, (PFNNOTIFY)TxGsmLocationProvider::GPSWatchDogTimer, r_pOwner);	
	}

 reference link https://developer.brewmp.com/resources/tech-guides/position-determination-technology-guide/using-interfaces/using-interfaces-brew-mp-102-and-lower

question:

 1. how long is gps watch dog timer?   Is there empirical value?

 2. why wait so long?

thank you!

 

 

1.) If your application uses A-GPS then postion fix depends on netowrk speed, on the other hand if your application is using standalone GPS mode then getting pos fix depends on several external environmental factors. there is no empirical value but application can retry the attempts to get posfix.
2.) pls refer ans 1.
 
can you check for the error code in callback? In case it is taking time to get the posfix then your application might have recieved some error code in callback.
 
Also not that you can check application functionality on simulator as well using  NMEA files.
The BREW SDK provides GPS emulation; users can set the GPS emulation in the
Tools->GPS Emulation menu to use a pre-recorded NMEA file as GPS input, or
connect an NMEA-output capable GPS device. An offline utility called
NMEALogger.exe can be used to record an NMEA file from data coming from a GPS
device connected to the serial port of the desktop/laptop. This NMEA file can be
used later as GPS input. See the SDK User's Guide and the SDK Utilities Guide
for details. 
Users can set the GPS emulation in the Tools->GPS Emulation menu to use a
pre-recorded NMEA file as GPS input (e.g.: sdk\bin\dataFiles\toDownTown.bgp), or
connect an NMEAoutput capable GPS device. An offline utility called
NMEALogger.exe can be used to record an NMEA file from data coming from a GPS
device connected to the serial port of the desktop/laptop. 

1.) If your application uses A-GPS then postion fix depends on netowrk speed, on the other hand if your application is using standalone GPS mode then getting pos fix depends on several external environmental factors. there is no empirical value but application can retry the attempts to get posfix.
2.) pls refer ans 1.
 
can you check for the error code in callback? In case it is taking time to get the posfix then your application might have recieved some error code in callback.
 
Also not that you can check application functionality on simulator as well using  NMEA files.
The BREW SDK provides GPS emulation; users can set the GPS emulation in the
Tools->GPS Emulation menu to use a pre-recorded NMEA file as GPS input, or
connect an NMEA-output capable GPS device. An offline utility called
NMEALogger.exe can be used to record an NMEA file from data coming from a GPS
device connected to the serial port of the desktop/laptop. This NMEA file can be
used later as GPS input. See the SDK User's Guide and the SDK Utilities Guide
for details. 
Users can set the GPS emulation in the Tools->GPS Emulation menu to use a
pre-recorded NMEA file as GPS input (e.g.: sdk\bin\dataFiles\toDownTown.bgp), or
connect an NMEAoutput capable GPS device. An offline utility called
NMEALogger.exe can be used to record an NMEA file from data coming from a GPS
device connected to the serial port of the desktop/laptop. 

You can also try sample code available on Brew MP website (link below):
https://developer.brewmp.com/file/346291/c_sampleposdet.zip

You can also try sample code available on Brew MP website (link below):
https://developer.brewmp.com/file/346291/c_sampleposdet.zip

[Debug][2012-7-3 0:32:43 0][TxGsmLocationProvider.cpp:326]GPS status is 0x100001[Debug][2012-7-3 0:32:43 0][TxGsmLocationProvider.cpp:327]pAeeGpsInfo->fValid is 0so the status of AEEGPSInfo in callback is AEEGPS_ERR_GENERAL_FAILURE,  could you me give more Info for this issue.

[Debug][2012-7-3 0:32:43 0][TxGsmLocationProvider.cpp:326]GPS status is 0x100001[Debug][2012-7-3 0:32:43 0][TxGsmLocationProvider.cpp:327]pAeeGpsInfo->fValid is 0so the status of AEEGPSInfo in callback is AEEGPS_ERR_GENERAL_FAILURE,  could you me give more Info for this issue.

Try giving accuracy level as AEEGPS_ACCURACY_LEVEL1, is should work.

Try giving accuracy level as AEEGPS_ACCURACY_LEVEL1, is should work.

Try giving accuracy level as AEEGPS_ACCURACY_LEVEL6, it is should work.

Try giving accuracy level as AEEGPS_ACCURACY_LEVEL6, it is should work.

hi, 
I use the AEEGPS_MODE_ONE_SHOT as GPS mode,  the callback return value is 0x100001(AEEGPS_ERR_GENERAL_FAILURE)
but I use the AEEGPS_MODE_TRACK_LOCAL as GPS mode, our APP can get GPS info successfully.
then I use the c_sampleposdet.zip to test, it is the same result.
 
Device is Patech Calix (P6020),  Could you give some more information about this issue. 
Thank you very much!
 
 

hi, 
I use the AEEGPS_MODE_ONE_SHOT as GPS mode,  the callback return value is 0x100001(AEEGPS_ERR_GENERAL_FAILURE)
but I use the AEEGPS_MODE_TRACK_LOCAL as GPS mode, our APP can get GPS info successfully.
then I use the c_sampleposdet.zip to test, it is the same result.
 
Device is Patech Calix (P6020),  Could you give some more information about this issue. 
Thank you very much!
 
 

AEEGPS_MODE_ONE_SHOT should work but as getting the position fix depends on several external factors so looks like one shot is not working and flashing AEEGPS_ERR_GENERAL_FAILURE error code. Note that as per API reference AEEGPS_MODE_ONE_SHOT mode may not be optimal for repeated position determination requests and should be used when only a single position determination request placed.If an application needs to have control over the mode, use the AEEGPS_MODE_TRACK_LOCAL or AEEGPS_MODE_TRACK_NETWORK modes
On the other hand, AEEGPS_MODE_TRACK_LOCAL mode may be used by applications which are making multiple position determination requests and want the position results to be computed on the device. It is suited for applications which intend to perform tracking, and require frequent, fast location /velocity/ altitude information. This mode also minimizes requests to the network for position determination information.

AEEGPS_MODE_ONE_SHOT should work but as getting the position fix depends on several external factors so looks like one shot is not working and flashing AEEGPS_ERR_GENERAL_FAILURE error code. Note that as per API reference AEEGPS_MODE_ONE_SHOT mode may not be optimal for repeated position determination requests and should be used when only a single position determination request placed.If an application needs to have control over the mode, use the AEEGPS_MODE_TRACK_LOCAL or AEEGPS_MODE_TRACK_NETWORK modes
On the other hand, AEEGPS_MODE_TRACK_LOCAL mode may be used by applications which are making multiple position determination requests and want the position results to be computed on the device. It is suited for applications which intend to perform tracking, and require frequent, fast location /velocity/ altitude information. This mode also minimizes requests to the network for position determination information.