Hi!
I cannot find a working example, how to connect the Ublox C030-R412m target over USB with u-center to visualize GNSS data. I need a script that passes USB serial data to i2c (GNSS) module and vice versa. Any help is very appreciated.
Hi!
I cannot find a working example, how to connect the Ublox C030-R412m target over USB with u-center to visualize GNSS data. I need a script that passes USB serial data to i2c (GNSS) module and vice versa. Any help is very appreciated.
Hello,
ZOE-M8B aka on-board GNSS module seems to by connected via UART6 so why you need i2c?
BR, Jan
Good question ! Because I have a working example with I2C on my Arduino board with a ZOE-M8. I have tried out the following code. U-Center connects but I don’t se nothing in the U-Center text console.
#include "ThisThread.h"
#include "mbed.h"
#define BAUDRATE 9600
RawSerial pc(USBTX, USBRX);
RawSerial gnss(GNSSTXD, GNSSRXD);
DigitalInOut gnssEn(GNSSEN, PIN_OUTPUT, PushPullNoPull, 0);
void pcRecv() {
while(pc.readable()) {
gnss.putc(pc.getc());
}
}
void gnssRecv() {
while(gnss.readable()) {
pc.putc(gnss.getc());
}
}
int main() {
// GNSS initialization.
gnssEn.write(1);
ThisThread::sleep_for(100);
pc.baud(BAUDRATE);
gnss.baud(BAUDRATE);
pc.attach(&pcRecv, Serial::RxIrq);
gnss.attach(&gnssRecv, Serial::RxIrq);
while(true) {}
}
SOLUTION
This example code works, but only with low baudrate like 9600. Why? I don’t know. But it works.
you set the 115200 for both but GNSS use 9600 - ZOE-M8B (u-blox.com) page 27.
BR, Jan