vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.91k stars 708 forks source link

GPS Issues: SARA-R422M8S #728

Open detchison opened 1 year ago

detchison commented 1 year ago

[ X] I have read the Troubleshooting section of the ReadMe

What type of issues is this?

[ ] Request to support a new module

[ ] Bug or problem compiling the library [ ] Bug or issue with library functionality (ie, sending data over TCP/IP) [X] Question or request for help

What are you working with?

Modem: uBlox SARA-R422M8S-000 Main processor board: Nordic Nrf52840 TinyGSM version: 0.11.5 Code:

modem.enableGPS(); delay(15000L); float lat2 = 0; float lon2 = 0; float speed2 = 0; float alt2 = 0; int vsat2 = 0; int usat2 = 0; float accuracy2 = 0; int year2 = 0; int month2 = 0; int day2 = 0; int hour2 = 0; int min2 = 0; int sec2 = 0; for (int8_t i = 15; i; i--) { DBG("Requesting current GPS/GNSS/GLONASS location"); if (modem.getGPS(&lat2, &lon2, &speed2, &alt2, &vsat2, &usat2, &accuracy2, &year2, &month2, &day2, &hour2, &min2, &sec2)) { DBG("Latitude:", String(lat2, 8), "\tLongitude:", String(lon2, 8)); DBG("Speed:", speed2, "\tAltitude:", alt2); DBG("Visible Satellites:", vsat2, "\tUsed Satellites:", usat2); DBG("Accuracy:", accuracy2); DBG("Year:", year2, "\tMonth:", month2, "\tDay:", day2); DBG("Hour:", hour2, "\tMinute:", min2, "\tSecond:", sec2); break; } else { DBG("Couldn't get GPS/GNSS/GLONASS location, retrying in 15s."); delay(15000L); } } ### Scenario, steps to reproduce Using a SARA-R422M8S, with the allFunctions example code, cannot get a GPS Loc to be returned, "CME ERROR: Operation not allowed" instead when the AT+ULOC command is sent. ### Expected result Expecting a GPS location to be returned. ### Actual result Error Response ### Debug and AT command log [250465] Requesting current GPS/GNSS/GLONASS location AT+ULOC=2,1,0,120,1 +CME ERROR: Operation not allowed [250483] Couldn't get GPS/GNSS/GLONASS location, retrying in 15s.