In the meanwhile, I bought two Raspberry Pi Ultimate GPS Hat. I thought the first GPS Hat might be broken, but both of them shows the same behaviour - the buffer received from the UART, is completely filled with 0 values (512 bytes)!
See processBuffer(byte[] buffer, int count) Method in the NmeaGpsModule class.
private void processBuffer(byte[] buffer, int count) {
for (int i = 0; i < count; i++) {
if (mParser.getFrameStart() == buffer[i]) {
handleFrameStart();
} else if (mParser.getFrameEnd() == buffer[i]) {
handleFrameEnd();
} else if (buffer[i] != 0){
//Insert all other characters except '0's into the buffer
mMessageBuffer.put(buffer[i]);
}
}
}
I use the GPS example with the following settings:
public static final int UART_BAUD = 9600;
public static final float ACCURACY = 2.5f; // From GPS datasheet
Any ideas? Whats wrong?