LILYGO T-Beam // NEO-6M

void sendPacket(byte *packet, byte len)
{
    for (byte i = 0; i < len; i++)
    {
        GPSSerial.write(packet[i]);
    }
}

void setup() {
    GPSSerial.begin(9600, SERIAL_8N1, GPS_RX, GPS_TX);

    byte payload[14] = {0xB5,0x62,0x06,0x08,0x06,0x00,0xE8,0x03,0x01,0x00,0x01,0x00,0x01,0x39};
    sendPacket(payload, sizeof(payload));

    GPSSerial.end();

    GPSSerial.begin(115200, SERIAL_8N1, GPS_RX, GPS_TX);)
}

void loop() {
}

DOCS: