I'm using a SIM908 module on a custom board and am having trouble getting the GPS location from it. Everything else works on the module. I can send SMS, make calls and send and receive data from a webpage. But GPS doesn't seem to work. I am using the antenna pad directly on the chip with a passive antenna.
When I call
AT+GPSSTATUS? I receive
Location Unknown no matter what I do. I tested this outdoors with clear view to the sky. I expected it would at least give
Location Not Fix but
Location Unknown seems to indicate GPS is not on, even though I call
AT+CGPSRST=0 and get "OK" back almost every time. A few times, it has returned
ERROR GPS READY, which I can't find anywhere in the datasheets, but I assume is due to not having reset the SIM908 while testing new code.
I have posted my test code below. Am I missing something?
// DDDR initializations (not included) // UART Initialization uart0_init(UART_BAUD_SELECT(UART_BAUDRATE, F_CPU)); sei(); _delay_ms(500); // GSM Power on PORTD |= (1<<PORTD3); _delay_ms(1100); PORTD &= ~(1<<PORTD3); _delay_ms(2300); UWriteString("AT"); // Returns: "AT" and "OK" // So far all good _delay_ms(1000); // GPS Power on UWriteString("AT+CGPSPWR=1\r"); // Returns "OK" _delay_ms(10000); UWriteString("AT+CGPSRST=0\r"); // Have tried with =1 with no luck // Returns "OK" _delay_ms(10000); // VERY LONG DELAY _delay_ms(30000); _delay_ms(30000); _delay_ms(30000); _delay_ms(30000); _delay_ms(30000); _delay_ms(30000); // GPS STATUS UWriteString("AT+CGPSSTATUS?\r"); // Returns: "Location Unknown" _delay_ms(10000); UWriteString("AT+CGPSINF=2\r"); // Returns: "2,160745,0.000000,N,0.000000,E,0,0,99.989998,187.000000,M,-187.000000,M,,0000