Velleman / VMA430_GPS_Module

Library for working with the VMA430 - GPS Module U-BLOX NEO-7M
Other
7 stars 5 forks source link

"TimeOut UBX packet!" from serial monitor with original arduino micro (also outdoor) #4

Open Antoine1111111 opened 3 years ago

Antoine1111111 commented 3 years ago

Hello,

I always receive this message when running the serial monitor for my arduino micro:TimeOut UBX packet! Even outdoor I have this problem.

Thank you in advance!

midasgossye commented 3 years ago

Hi @Antoine1111111, thanks for reaching out to us!

The TimeOut UBX packet! means that the Arduino didn't receive any correct data packet from the GPS in the last 1,5 seconds. This is probably caused by the fact that your GPS module failed to be configured properly by the Arduino to send out the correct data packets periodically. The most probable cause for this is a wrong connection of the data wires between the GPS module and the Arduino, but of course bugs in the Library or sketch can also not be excluded...

Can you copy-paste (or send a screenshot) of al of the messages appearing in the Serial Monitor before the TimeOut UBX packet! messages start appearing?

Antoine1111111 commented 3 years ago

SerialMonitor This is what I have:

midasgossye commented 3 years ago

@Antoine1111111 Thanks for the quick reply! I managed to test out the GPS module with our library with an Arduino Micro, and I got the exact same behaviour as you did... After some googling it turns out not all pins on the Arduino Micro (and Arduino Leonardo) can be used as a SoftwareSerial port, which is used to communicate with the GPS module. The Arduino site page about SoftwareSerial (https://www.arduino.cc/en/Reference/softwareSerial) states the following:

Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

By connecting the GPS module to (for instance) pins 8 & 9 instead of pins 2 & 3, and changing line 31 of the example code to the following line fixed the issue:

SoftwareSerial ss(8, 9); // RX, TX

For this to work, connect RXD of the module to Pin 9, and TXD to Pin 8

Using this procedure I managed to get it to work, can you let us know if this solves the issue for you as well?

Antoine1111111 commented 3 years ago

Oh okay, I didn't think about that. Thank you very much! It works on mine too 👍

midasgossye commented 3 years ago

No worries, thanks for bringing this issue to our attention. Ideally, this should have been mentioned in our README and/or code comments somewhere. We will add it asap so other people don't have to go through the trouble of finding this out by themselves.

Antoine1111111 commented 3 years ago

Great!