FX30s(WP7702) problem using positioningService.le_gnss

Do le_gnss.api need special permission? My test gps program as below…
<---- gpsTestComponent/Component.cdef ---->
sources:
{
gpsTestComponent.c
}

requires:
{
api:
{
le_gnss = le_gnss.api
}
}
<---- gpsTest.adef ---->
executables:
{
gpstest = ( gpsTestComponent )
}
processes:
{
envVars:
{
LE_LOG_LEVEL = DEBUG
}
run:
{
( gpstest )
}
maxFileBytes: 51200K
}
bindings:
{
gpstest.gpsTestComponent.le_gnss -> positioningService.le_gnss
}
version: 1.0.0
sandboxed: false
start: manual
<---- gpsTestComponent.c ---->
#include “legato.h”
#include “interfaces.h”

COMPONENT_INIT
{
LE_INFO("------------------------- START -------------------------------");

LE_INFO("------------------------- END -------------------------------");
exit(EXIT_SUCCESS);

}
<---- The result in Log is ---->
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | app.c app_Start() 2926 | Starting app ‘gpsTest’
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | app.c CreateFileLink() 1549 | Skipping file link ‘/legato/systems/current/apps/gpsTest/read-only/lib/libComponent_gpsTestComponent.so’ to '/legato/systems/current/appsWriteable/gpsTes
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | app.c CreateFileLink() 1549 | Skipping file link ‘/legato/systems/current/apps/gpsTest/read-only/bin/gpstest’ to ‘/legato/systems/current/appsWriteable/gpsTest/bin/gpstest’: Already e
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 52428800.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | proc.c proc_Start() 1389 | Starting process ‘gpstest’ with pid 2384
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2383.
Jan 6 00:05:33 | supervisor[2384]/supervisor T=main | proc.c proc_Start() 1354 | Execing ‘gpstest’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=unknown | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_refPathIteratorMap’ is truncated to ‘framework.hashMap_refPathIterat’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_refEventHandlers’ is truncated to ‘framework.hashMap_refEventHandl’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_refDefault Timer SafeRe’ is truncated to ‘framework.hashMap_refDefault Ti’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.MessagingClientInterfaces’ is truncated to ‘framework.MessagingClientInterf’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_refHandlersRef’ is truncated to ‘framework.hashMap_refHandlersRe’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_MessagingServices’ is truncated to ‘framework.hashMap_MessagingServ’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_MessagingClients’ is truncated to ‘framework.hashMap_MessagingClie’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.PipelineSIGCHLD-reports’ is truncated to ‘framework.PipelineSIGCHLD-repor’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME fs_Init() 838 | FS prefix path “/data/le_fs/”
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_refFsFileRefMap’ is truncated to ‘framework.hashMap_refFsFileRefM’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 1 blocks.
Jan 6 00:05:33 | UNKNOWN[2384]/ T=main | _componentMain.c _gpsTestComponent_Init() 29 | Initializing gpsTestComponent component library.
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.hashMap_refle_gnss_ClientHandle’ is truncated to ‘framework.hashMap_refle_gnss_Cl’
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME msgMessage_CreatePool() 112 | Pool name truncated to ‘msgs-ac786c9bdfedf53fb1ab994768’ for protocol ‘ac786c9bdfedf53fb1ab99476841610f’.
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME InitPool() 303 | Memory pool name ‘framework.msgs-ac786c9bdfedf53fb1ab994768’ is truncated to ‘framework.msgs-ac786c9bdfedf53f’
Jan 6 00:05:33 | serviceDirectory[889]/serviceDirectory T=main | serviceDirectory.c DispatchToServer() 713 | Client (uid 0 ‘root’, pid 2384) disagrees with server (uid 0 ‘root’, pid 1015) on protocol ID of service 'gpstest.gpsTestCompon
Jan 6 00:05:33 | UNKNOWN[2384]/framework T=main | LE_FILENAME ReceiveSessionOpenResponse() 684 | Unexpected server response: -6 (LE_FAULT).
Jan 6 00:05:33 | supervisor[856]/supervisor T=main | proc.c proc_SigChildHandler() 2035 | Process ‘gpstest’ (PID: 2384) has exited with exit code 1.
Jan 6 00:05:34 | _appStopClient[2385]/framework T=main | LE_FILENAME CreateSocket() 550 | Socket opened as standard i/o file descriptor 2!
Jan 6 00:05:34 | supervisor[856]/supervisor T=main | app.c app_SigChildHandler() 3480 | Process ‘gpstest’ in app ‘gpsTest’ faulted: Ignored.
Jan 6 00:05:34 | supervisor[856]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘gpsTest’ has stopped.

<---- I’ve tested in terminal and I can get gps position ---->
root@fx30s:~# gnss enable
The GNSS device is already enabled
root@fx30s:~# gnss start
Success!
root@fx30s:~# gnss get loc2d
Latitude(positive->north) : 25.045136
Longitude(positive->east) : 121.467152
hAccuracy : 10.00m
root@fx30s:~#

Hi @artistmonkey

Which firmware and legato versions are you using?
Can you download the latest firmware to module and retry?
https://source.sierrawireless.com/resources/airlink/software_downloads/fx30-firmware/fx30-firmware-catm/#sthash.JpscH8qZ.dpbs

Please provide some information about your module with the commands below?

  • legato version
  • legato status
  • cm info
  • cm radio
  • app status

root@fx30s:~# legato version
18.06.1_03c5394b4c271c054ae58a494f160e37_modified
root@fx30s:~# legato status
Systems installed:
41 [good] <-- current
Legato framework is running.
root@fx30s:~# cm info
Device: FX30S(WP7702)
IMEI: 354723090142505
IMEISV: 2
FSN: VU007185380810
Firmware Version: SWI9X06Y_02.16.06.00 7605a6 jenkins 2018/06/20 17:56:12
Bootloader Version: SWI9X06Y_02.16.06.00 7605a6 jenkins 2018/06/20 17:56:12
MCU Version: 002.009
PRI Part Number (PN): 9907957
PRI Revision: 001.000
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.028_002
SKU: 1103882
Last Reset Cause: Power Down
Resets Count: Expected: 96 Unexpected: 5
root@fx30s:~# cm radio
Power: ON
Current Network Operator:
Current RAT: Not available
Status: Registration was denied, usually because of invalid access credentials (LE_MRC_REG_DENIED)
Signal: No signal strength (0)
PS: Packet Switched Not registered (LE_MRC_REG_NONE)

root@fx30s:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] columbiaAtService
[running] dataConnectionService
[running] factoryRecoveryService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[stopped] gpsTest
root@fx30s:~#

Hi @artistmonkey

The GNSS application is running fine with FX30s(WP7702) Legato 18.06.1 on my side.
Please make sure the GNSS status is ready on your FX30s(WP7702) module.
I have attached the log and application GNSS for your reference.
log.txt (78.8 KB)
GpsTest.zip (257.5 KB)

le_gnss_GetAcquisitionRate()
le_result_t le_gnss_GetAcquisitionRate( uint32_t * ratePtr )
This function gets the GNSS device acquisition rate.

Returns
LE_OK on success
LE_FAULT on failure
LE_NOT_PERMITTED If the GNSS device is not in “ready” state.

Please help to tick “Solution” if your question is answered.

Thanks Donald, I test your sample gps program in my FX30s(WP7702) and still have the same problem.


And I check the status is ready

root@fx30s:~# gnss get status
ready
root@fx30s:~#

Sorry, I found that my build version is different from FX30.


After change legato framework version used in application to 18.06.1, everything is good now.
Big thank to you
BR
Angus