bolderflight / ublox

Arduino and CMake library for communicating with uBlox GPS receivers.
MIT License
101 stars 32 forks source link

Problem with use UBLOX Lib #6

Closed Gennadiy1990 closed 5 years ago

Gennadiy1990 commented 5 years ago

Hi! I planned to use your library for Arduino Nano 5Volt. GPS Ublox M8N-0-01. For the test, I used a simple sketch

include "UBLOX.h"

UBLOX gps(Serial, 9600); //Serial-not Serial 1-3!!!!! void setup() { pinMode(2, OUTPUT); gps.begin(); } void loop() {

if (gps.readSensor()) { digitalWrite(2, HIGH); } delay(500); digitalWrite(2, LOW); } Led flashes if gps.readSensor() == true. Led flashes sometimes. But often do not catch fire. This means that the library does not accept the package from the GPS.
The receiver outputs a level of 3.3V. Therefore, I decided to check whether the Arduino perceives such a signal. I wrote the next sketch. Bit by bit broadcast through Arduino.

int BAUD = 9600; byte oneword = 0; void setup() { Serial.begin(BAUD); } void loop() { if ( Serial.available() ) { oneword = Serial.read() ; Serial.write( oneword) ; }

}

Packages as in my opinion are broadcast without problems. Ublox-center accepts and decodes them correctly. Full packet length of 100 bytes. 09:20:23 R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' 09:20:24 R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' 09:20:25 R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution'

The title is correct, the length indicated is 92 bits = 0x5C - the same too. I can not understand what the problem is the second day! Please help!

09:02:45 0000 B5 62 01 07 5C 00 58 89 17 07 E3 07 03 04 09 02 µb \ X ã 0010 2D 37 12 00 00 00 B7 3F FC FF 03 01 0A 08 13 99 -7 ·?üÿ 0020 4D 12 54 DE 05 1E B8 F2 01 00 26 8F 01 00 98 1E M TÞ ¸ò & 0030 00 00 31 21 00 00 FF FF FF FF E9 FF FF FF 15 00 1! ÿÿÿÿéÿÿÿ 0040 00 00 17 00 00 00 2B 51 0E 01 D9 01 00 00 E5 EF +Q Ù åï 0050 56 00 CD 00 00 E0 AC 4C 22 00 00 E0 00 E0 00 00 V Í à¬L" à à 0060 00 80 49 8F I

09:02:46 0000 B5 62 01 07 5C 00 40 8D 17 07 E3 07 03 04 09 02 µb \ @ ã 0010 2E 37 12 00 00 00 DD 3F FC FF 03 01 0A 07 04 99 .7 Ý?üÿ 0020 4D 12 72 DE 05 1E 4E F3 01 00 BD 8F 01 00 D9 1E M rÞ Nó ½ Ù 0030 00 00 46 21 00 00 A0 00 00 00 B7 FF FF FF FE FF F!   ·ÿÿÿþÿ 0040 FF FF B0 00 00 00 2B 51 0E 01 9B 03 00 00 5A 0C ÿÿ° +Q Z 0050 57 00 D5 00 00 E0 AC 4C 22 00 00 E0 00 E0 00 00 W Õ à¬L" à à 0060 00 80 3E D6 >Ö

09:02:47 0000 B5 62 01 07 5C 00 28 91 17 07 E3 07 03 04 09 02 µb \ ( ã 0010 2F 37 12 00 00 00 04 40 FC FF 03 01 0A 07 F8 98 /7 @üÿ ø 0020 4D 12 88 DE 05 1E 67 F3 01 00 D5 8F 01 00 05 1F M Þ gó Õ 0030 00 00 50 21 00 00 44 00 00 00 D4 FF FF FF 09 00 P! D Ôÿÿÿ 0040 00 00 51 00 00 00 2B 51 0E 01 50 03 00 00 7C 26 Q +Q P |& 0050 57 00 D5 00 00 E0 AC 4C 22 00 00 E0 00 E0 00 00 W Õ à¬L" à à 0060 00 80 25 57

Gennadiy1990 commented 5 years ago

Solved!