i want to set the Baudrate of the Neo 6m GPS Modul to 115200 or a higher value. I'm building a time messurement system where it simply takes to long to recive the Nema sentence with the standart 9600 Baudrate.
I use this board: https://www.amazon.de/gp/product/B07VQGQRK6/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
I did a scatch in the Arduino IDE and want to include it into my bigger project. Here is the Code i tryed to follow this instructions: NEO-6M Howto: change serial data rate via serial interface (boost from 9.6k to 115k) — for NEO-6, NEO-7, NEO-8 | by Victor | Medium
I also fount the manuel for the Neo 6m: ДКО Электронщик - все для работы и хобби электронщика на electronshik.ru
The problem is that in my case the GPS Modul is fixed on the board an i can't directly connect it to the PC. So there is no option of using the U-Center to config the GPS Modul.
This code won't work. I get no serial feedback at all.
Any Tips or links to a solution are welcome.
#include <SoftwareSerial.h>
void setup() {
Serial.begin(115200);
Serial1.begin(9600, SERIAL_8N1, 34, 12); //default mode
changeBaudrate();
delay(100);
Serial1.flush();
Serial1.end();
}
void loop(){
Serial1.begin(115200, SERIAL_8N1, 34, 12); //new 115k boost mode
Serial.println("try to send data with 115200");
delay(1000);
while(Serial1.available()){
Serial.write(Serial1.read());
Serial1.println();
}
Serial1.flush();
Serial1.end();
Serial1.begin(9600, SERIAL_8N1, 34, 12); //new 115k boost mode
Serial.println("try to send data with 9600");
delay(1000);
while(Serial1.available()) {
Serial.write(Serial1.read());
Serial1.println();
}
Serial1.flush();
Serial1.end();
}
void changeBaudrate() {
// CFG-PRT
byte packet[] = {
0xB5, // sync char 1
0x62, // sync char 2
0x06, // class
0x00, // id
0x14, // length
0x00, //
0x01, // payload
0x00, // payload
0x00, // payload
0x00, // payload
0xD0, // payload
0x08, // payload
0x00, // payload
0x00, // payload
0x00, // payload
0xC2, // payload
0x01, // payload
0x00, // payload
0x07, // payload
0x00, // payload
0x03, // payload
0x00, // payload
0x00, // payload
0x00, // payload
0x00, // payload
0x00, // payload
0xC0, // CK_A
0x7E, // CK_B
};
sendPacket(packet, sizeof(packet));
}
void sendPacket(byte *packet, byte len) {
for (byte i = 0; i < len; i++)
{
Serial1.write(packet[i]);
Serial.println("in Send Packet");
}
}
I just get feedback if i set the connection to 9600 baudrate:
Serail Plot:
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.245 -> in Send Packet
23:42:16.338 -> try to send data with 115200
23:42:17.368 -> try to send data with 9600
23:42:18.409 -> $GPRMC,,V,,,,,,,,,,N*53
23:42:18.409 -> $GPVTG,,,,,,,,,N*30
23:42:18.409 -> $GPGGA,,,,,,0,00,99.99,,,,,,*48
23:42:18.409 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
23:42:18.501 -> $GPGSV,1,1,00*79
23:42:18.550 -> $GPGLL,,,,,,V,N*64
23:42:18.596 -> $GPTXT,01,01,00,rxbuf alloc port 1*51
23:42:18.829 -> try to send data with 115200