Skip to content

Conversation

@bledogit
Copy link

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

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.

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.

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

So, Renamed
bool DFRobot_SIM808::getGPS() to bool DFRobot_SIM808::getGPSTestData()

Created function DFRobot_SIM808::getGPS() (body) that uses the on demand poll of data

@hoerup
Copy link

hoerup commented Jun 10, 2019

Looks interesting - unfortunately, DFRobot doesn't seem to have much interest in their community. I have never seen them respond to issues or PR's on github :(

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

Successfully merging this pull request may close these issues.

2 participants