Closed tuando90 closed 7 months ago
modem.enableGPS() returns false?
Did you know that the positioning function cannot be used when the SIM7080 network is turned on?
modem.enableGPS() returns false?
Did you know that the positioning function cannot be used when the SIM7080 network is turned on?
@lewisxhe Yes, it returns false. I retry the enableGPS() function several times then after some time it works. I just used GPS and BLE. Do you have any idea?
oh ! Are you saying that after changing #if 0 to #if 1, calling modem.enableGPS() will return failure? oh ! I forgot about this. After running the SGNSCMD command, CGNSPWR will be rejected. The two commands cannot be used together. This was my mistake. I forgot to delete it. You can test it according to this application manual.
Hi @lewisxhe Do you mean I should change the setup code like this?
void setup()
{
// Same as example
/*********************************
* step 3 : start modem gps function
***********************************/
// When configuring GNSS, you need to stop GPS first
// modem.disableGPS();
delay(500);
#if 1
/*
! GNSS Work Mode Set
<gps mode> GPS work mode.
1 Start GPS NMEA out.
<glo mode> GLONASS work mode.
0 Stop GLONASS NMEA out.
1 Start GLONASS NMEA out.
<bd mode> BEIDOU work mode.
0 Stop BEIDOU NMEA out.
1 Start BEIDOU NMEA out.
<gal mode> GALILEAN work mode.
0 Stop GALILEAN NMEA out.
1 Start GALILEAN NMEA out.
<qzss mode> QZSS work mode.
0 Stop QZSS NMEA out.
1 Start QZSS NMEA out.*/
//GNSS Work Mode Set GPS+BEIDOU
modem.sendAT("+CGNSMOD=1,1,0,0,0");
modem.waitResponse();
/*
GNSS Command,For more parameters, see <SIM7070_SIM7080_SIM7090 Series_AT Command Manual> 212 page.
<minInterval> range: 1000-60000 ms
minInterval is the minimum time interval in milliseconds that must elapse between position reports. default value is 1000.
<minDistance> range: 0-1000
Minimum distance in meters that must be traversed between position reports. Setting this interval to 0 will be a pure time-based tracking/batching.
<accuracy>:
0 Accuracy is not specified, use default.
1 Low Accuracy for location is acceptable.
2 Medium Accuracy for location is acceptable.
3 Only High Accuracy for location is acceptable.
*/
// minInterval = 1000,minDistance = 0,accuracy = 0
modem.sendAT("+SGNSCMD=2,1000,0,0");
modem.waitResponse();
// Turn off GNSS.
/*
modem.sendAT("+SGNSCMD=0");
modem.waitResponse();
*/
#endif
delay(500);
// GPS function needs to be enabled for the first use
/*
if (modem.enableGPS() == false) {
Serial.print("Modem enable gps function failed!!");
while (1) {
delay(5000);
}
}
*/
}
I tried the above code but it doesn't seem to work. Could you please help?
Use ATDebug first, follow the instructions in the PDF linked above, and try it
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Hi Team,
I am facing an issue with
MinimalModemGPSExample.ino
example.When trying to change GNSS accuracy to Only High Accuracy If I change to code inside
#if 0 block
into:Then
modem.enableGPS()
often failed. I added the code to retry to enableGPS but sometimes it works and even if it works it takes long time to wait.Is there any suggestion to fix this problem?
Thanks in advance!