Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output to serial port #21

Open
brightproject opened this issue Dec 15, 2023 · 0 comments
Open

No output to serial port #21

brightproject opened this issue Dec 15, 2023 · 0 comments

Comments

@brightproject
Copy link

brightproject commented Dec 15, 2023

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).
RATE_10HZ

Although according to the datasheet for NEO-6M
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.
NAV_message_ON

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
compileOK

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant