ublox
ublox copied to clipboard
No output to serial port
Hello @flybrianfly
Please tell me, have you tried running the library with such an ancient and godforsaken module as NEO-6M
?
Perhaps the problem is related to the NEO-6M
module itself, but perhaps also to the version of the UBX
protocol in it ... perhaps the version is outdated, the module shows through the u-center
software 7.03 (45969)
.
First, I configure the module through the u-center at 5 Hz
(tried it at 10 Hz
).
Although according to the datasheet for NEO-6M
up to 1 Hz is possible and the y-center highlights the field in red, in the binary console
there is a noticeable change in the output speed, but on the module itself the red LED
always blinks with the same frequency - 1 Hz
.
I also disabled all NMEA
and UBX
messages and enabled only three: VEDNED
, POSLLH
, SOL
.
Code, upload to stm32f411
#include "ubx.h"
#define SERIAL_BAUD 115200
#define GNSS_BAUD 115200
HardwareSerial Serial2(USART2); // PA2(TX2), PA3(RX2)
bfs::Ubx gnss(&Serial2);
void setup() {
/* Serial to display data */
Serial.begin(SERIAL_BAUD);
while(!Serial) {}
gnss.Begin(GNSS_BAUD);
}
void loop() {
// forwarding serial2 to serial
// if (Serial2.available() > 0)
// Serial.write(Serial2.read());
// Serial2.write(Serial.read());
delay(20);
if(gnss.Read()) {
Serial.print(gnss.fix());
Serial.print("\t");
Serial.print(gnss.num_sv());
Serial.print("\t");
Serial.print(gnss.lat_deg(), 6);
Serial.print("\t");
Serial.print(gnss.lon_deg(), 6);
Serial.print("\t");
Serial.print(gnss.alt_wgs84_m(), 2);
Serial.print("\n");
}
}
Compile is OK
There is peace and quiet in the port ...
None of the existing libraries want to work with this module.
I can only read data from the module using a self-written parser, but the parser has a drawback - it does not work if a delay is added to the parser code, even 10 ms
, and the messages are no longer parsed.
Therefore, I want to make the module work with normal UBX
parsing libraries.
Therefore, I cannot add a filter library to the parser code and update it.
The data simply will not be updated and entered into the filter.
A vicious circle and probably a way out of it is the purchase of a modern module from Ublox
.