Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS in TEST Mode #18

Open
bledogit opened this issue Nov 23, 2018 · 0 comments
Open

GPS in TEST Mode #18

bledogit opened this issue Nov 23, 2018 · 0 comments

Comments

@bledogit
Copy link

bledogit commented Nov 23, 2018

Hi,

I have been trying to get your library to work, Here are some issues I found that might be helpful to somebody:

  1. The GPS on the sim808 works without SIM. However, the init function returns false / error if there is no SIM. Minor issue, but would have been nice to know.

  2. The GPS data is accessed by putting the chip on test mode.

bool DFRobot_SIM808::attachGPS()
{
  Serial.println("DFRobot_SIM808::attachGPS");
	 if(!sim808_check_with_cmd("AT+CGNSPWR=1\r\n", "OK\r\n", CMD)) { 
        return false;
    }
	 if(!sim808_check_with_cmd("AT+CGNSTST=1\r\n", "OK\r\n", CMD)) { 
        return false;
    }
	return true;
}

this floods the serial port with a lot of information, so a small serial buffer is likely to overflow (arduino's default is 64 Bytes), so function getGPS() will likely overflow between calls, and never return anything. For this to work, the getGPS() function MUST be called before the serial overflows.

I don't see the point in putting the chip in TEST mode to access functionality that i think should be accessed by using (AT+CGNSINF) instead.

  1. the parse functions, don't work with the string returned by AT+CGNSINF as the format is slightly different.

Cheers....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant