PROBLEM

Adafruit cellular platform - SMS and IoT over celluar

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

PROBLEM

Post by sa7bi »

I get no gps from my fona 5320e

this is what i get :
Adafruit FONA 808 & 3G GPS demo
Initializing FONA... (May take a few seconds)
Attempting to open comm with ATs
---> AT
<--- OK
---> ATE0
<--- OK
---> ATE0
<--- OK
---> AT+CVHU=0
<--- OK
---> ATI
<--- Manufacturer: SIMCOM INCORPORATED
Model: SIMCOM_SIM5320E
Revision: SIM5320E_V1.5

+GCAP: +CGSM,+DS,+ES

OK

---> AT+CPMS="SM","SM","SM"
<--- +CPMS: 5,20,5,20,5,20
---> AT+CGPS=1
<--- ERROR
FONA is OK
Enabling GPS...
---> AT+CGPSPWR?
<--- ERROR
---> AT+CGPSINFO
<--- +CGPSINFO:,,,,,,,,
Waiting for FONA GPS 3D fix...
---> AT+CGPSINFO
<--- +CGPSINFO:,,,,,,,,

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

Hmm.. the output says the 3G module is reporting errors for the commands that turn the GPS module on.

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

Webp.net-resizeimage (2).jpg
Webp.net-resizeimage (2).jpg (320.43 KiB) Viewed 708 times
Webp.net-resizeimage (1).jpg
Webp.net-resizeimage (1).jpg (258.08 KiB) Viewed 708 times
RX=10 TX=11 RST=12
Webp.net-resizeimage.jpg
Webp.net-resizeimage.jpg (304.62 KiB) Viewed 708 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

I don't see anything unusual there.

Are you sure the LiPo is charged? A lot of FONA problems trace back to voltage spikes on the supply lines when the radio tries to talk to the cell tower.

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

i have fully charged my LiPo and i don't see any difference

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

Hmm.. try giving the FONA the command "AT+CGPSCOLD". That should force it to completely restart the GPS module.

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

i cant send a command trough serial monitor . So how can i put the command in my code ?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

Don't try sending the command through the Serial Monitor. Add it to your code, which produced the output in your first post of this thread.

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

i have send the command and i don't see any difference.

Adafruit FONA 808 & 3G GPS demo Initializing FONA... (May take a few seconds)
Attempting to open comm with ATs
---> AT
<--- AT
---> AT
<--- AT
---> ATE0
<--- ATE0
---> ATE0
<--- OK
---> AT+CVHU=0
<--- OK
---> ATI
<--- Manufacturer: SIMCOM INCORPORATED
Model: SIMCOM_SIM5320E
Revision: SIM5320E_V1.5

+GCAP: +CGSM,+DS,+ES

OK

---> AT+CPMS="SM","SM","SM"
<--- +CPMS: 20,20,20,20,20,20
FONA is OK
---> AT+CGPSCOLD
<--- OK
Enabling GPS...
---> AT+CGPSPWR?
<--- ERROR
---> AT+CGPSINFO
<--- +CGPSINFO:,,,,,,,,

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

Okay, the command was sent and accepted.

The SIM5320 doesn't support the 'AT+CGPSPWR' command, so you might as well delete that. Replace the 'AT+CGPS=1' command after the 'AT+CGPSCOLD' and see what that does.

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

I don't see the 'AT+CGPSPWR' command in my code
this my code :

Code: Select all

#include "Adafruit_FONA.h"

// standard pins for the shield, adjust as necessary
#define FONA_RX 10
#define FONA_TX 11
#define FONA_RST 12

// We default to using software serial. If you want to use hardware serial
// (because softserial isnt supported) comment out the following three lines 
// and uncomment the HardwareSerial line
#include <SoftwareSerial.h>
SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
SoftwareSerial *fonaSerial = &fonaSS;

// Hardware serial is also possible!
//  HardwareSerial *fonaSerial = &Serial1;

Adafruit_FONA fona = Adafruit_FONA(FONA_RST);

// Have a FONA 3G? use this object type instead
//Adafruit_FONA_3G fona = Adafruit_FONA_3G(FONA_RST);


void setup() {

  while (! Serial);

  Serial.begin(115200);
  Serial.println(F("Adafruit FONA 808 & 3G GPS demo"));
  Serial.println(F("Initializing FONA... (May take a few seconds)"));

  fonaSerial->begin(4800);
  if (! fona.begin(*fonaSerial)) {
    Serial.println(F("Couldn't find FONA"));
    while(1);
  }
  Serial.println(F("FONA is OK"));
  // Try to enable GPRS
  

  Serial.println(F("Enabling GPS..."));
  fona.enableGPS(true);
}

void loop() {
  delay(2000);

  float latitude, longitude, speed_kph, heading, speed_mph, altitude;

  // if you ask for an altitude reading, getGPS will return false if there isn't a 3D fix
  boolean gps_success = fona.getGPS(&latitude, &longitude, &speed_kph, &heading, &altitude);

  if (gps_success) {

    Serial.print("GPS lat:");
    Serial.println(latitude, 6);
    Serial.print("GPS long:");
    Serial.println(longitude, 6);
    Serial.print("GPS speed KPH:");
    Serial.println(speed_kph);
    Serial.print("GPS speed MPH:");
    speed_mph = speed_kph * 0.621371192;
    Serial.println(speed_mph);
    Serial.print("GPS heading:");
    Serial.println(heading);
    Serial.print("GPS altitude:");
    Serial.println(altitude);

  } else {
    Serial.println("Waiting for FONA GPS 3D fix...");
  }

  // Fona 3G doesnt have GPRSlocation :/
  if ((fona.type() == FONA3G_A) || (fona.type() == FONA3G_E))
    return;
  // Check for network, then GPRS 
  Serial.println(F("Checking for Cell network..."));
  if (fona.getNetworkStatus() == 1) {
    // network & GPRS? Great! Print out the GSM location to compare
    boolean gsmloc_success = fona.getGSMLoc(&latitude, &longitude);

    if (gsmloc_success) {
      Serial.print("GSMLoc lat:");
      Serial.println(latitude, 6);
      Serial.print("GSMLoc long:");
      Serial.println(longitude, 6);
    } else {
      Serial.println("GSM location failed...");
      Serial.println(F("Disabling GPRS"));
      fona.enableGPRS(false);
      Serial.println(F("Enabling GPRS"));
      if (!fona.enableGPRS(true)) {
        Serial.println(F("Failed to turn GPRS on"));  
      }
    }
  }
}
Last edited by adafruit_support_mike on Fri Apr 06, 2018 3:23 am, edited 1 time in total.
Reason: added CODE tags

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

Try switching over to the 'fonatest' sketch and use the menu commands from that to enable GPS and get a reading. Does the FONA work with that code?

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

no it doesn't work . this what i get
FONA> O
---> AT+CGPSPWR?
<--- ERROR
Failed to turn on
FONA> o
---> AT+CGPSPWR?
<--- ERROR
Failed to turn off
FONA>
+STIN: 25

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PROBLEM

Post by adafruit_support_mike »

Thank you.. something has to be going wrong at the hardware level.

Do you get the same output when you disconnect the GPS antenna?

User avatar
sa7bi
 
Posts: 24
Joined: Thu Mar 15, 2018 11:02 am

Re: PROBLEM

Post by sa7bi »

i have removed the gps antenne and i get the same output.
. Before the green led was always on and red one always blinking but now after a minute they go off why is that??

Locked
Please be positive and constructive with your questions and comments.

Return to “FONA”