OK. I’ll document this in real time as I go.
I have the RedBoard connected to the ZED-F9P. The RB is still running the modified Example3. It is outputting RTCM on SoftwareSerial. The ZED-F9R is stand-alone. It is receiving the RTCM on UART2 RX. It has a fixed solution.
I’m connecting u-center to the F9P. I’m going to manually configure it to output RTCM on its UART2. Then I can disconnect the RB. Opening u-center:
Using View \ Message View
Open UBX-CFG-PORT
Set the Target to UART2
I see that Protocol Out is 5-RTCM3
That’s OK.
I need to manually enable RTCM 1005, 1074, 1084, 1094, 1124 and 1230
I select UBX-CFG-MSG
I select F5-05 RTCM3.3 1005, I tick UART2 and leave the rate box set to 1. I click Send at the bottom of the window.
I repeat for 1074, 1084, 1094 and 1124. All using a rate of 1.
They’re all enabled on I2C too. I do not disable those.
I repeat for 1230 but set the rate to 10.
I check UBX-MON-COMMS. I see the UART2 Tx Total increasing each time I click Poll. That shows something is being transmitted.
I move my jumper wire from the RB SS TX (Pin 3) over to the F9P UART2 TX pin. F9P UART2 TX is now connected to F9R UART2 RX. I connect GND on the F9P to GND on the F9R.
The F9R RTK LED is still off. That’s good.
I close the u-center port for the F9P and open the port for the F9R. I check UBX-MON-COMMS and I can see RTCM3 messages being received on UART2. The count increases each time I click Poll. UBX-NAV-PVT shows a Fixed Carrier Range. Even better.
OK. All. good. Time to disconnect the RedBoard. I disconnect the Qwiic cable. The RB and both ZEDs are still powered on via USB.
I hastily modify Example5, stripping out all Serial code and replacing the Serial1 code with SoftwareSerial. I will attach the code here.
I upload the new code onto the RedBoard. I let it run. Now I connect the RB to the ZED-F9R via Qwiic. I reset the RB to restart the code. It won’t do anything as I have not yet connected anything to pin 2.
Check the F9R via u-center. I still have a fixed solution. The MON-COMMS UART2 RTCM3 count is still increasing.
OK. I now move the serial jumper wire. I connect F9P UART2 TX to the RB pin 2 (RX). I have RB GND connected to F9R GND via the Qwiic cable. I have F9P GND connected to RB GND via a jumper wire.
The RB should now be receiving RTCM from the F9P via SoftwareSerial on pin 2, and pushing it to the F9R via I2C. Is that happening?
The RTK LED on the F9R has come back on. That’s not good.
I check the F9R with u-center. The F9R is not talking… Have I done something silly?
I turn off the F9R and the RedBoard. I restart the RedBoard. It provides power to the F9R via the Qwiic cable.
I reconnect to the F9R via u-center and USB. It’s still not happy.
I forgot to include myGNSS.checkUblox(); in the modified Example5 loop. I add that.
OK. The F9R is talking to u-center. I check UBX-MON-COMMS. I see the SKIPPED count on I2C RX increasing quickly. The I2C RTCM RX count is increasing, but only very slowly and mostly not at all.
Not good.
I’m trying to push the RTCM data 32 bytes at a time. store is char[32]. Is that too much? I change to 16 bytes.
Same thing. I see mostly SKIPPED. Very few RTCM3 RX counts…
This makes me think that SoftwareSerial RX cannot cope…
How do I prove this?
The RedBoard I’m using is this one: https://www.sparkfun.com/products/15123 . It can do 3.3V or 5V via a solder jumper.
It’s a bit extreme but we’re trying to get to the bottom of this. I cut the track which links the D0 RX header pin to the TXO Pin2 on the CH340. I add a single header pin onto the RX LED Cathode. I can then use a jumper wire to connect CH340 TXO from the RX LED to the ATmega328 D0 RX Pin30 when I want to upload new code. When I disconnect the jumper, I can use the ATmega328 RX for hardware Serial. I don’t care or worry about the ATmega328 TX to CH340 RXI connection.
OK. Hacking done. Code modified for Serial instead of SoftwareSerial and uploaded. Jumper disconnected. Reconnect the F9R via Qwiic. Reset the RB. Connect the F9P UART2 TX to RedBoard D0 RX - which I can now thanks to my hardware hackery.
F9R RTK LED went out almost immediately.
I check the F9R MON-COMMS with u-center. Success. I see zero SKIPPED I2C RX messages. And about 10 RTCM3 RX messages per second. NAV-PVT shows the F9R has a Fixed carrier solution.
Ta da!!
From all of this, we can conclude that: SoftwareSerial TX is OK for RTCM. But SoftwareSerial RX fails for RTCM - if you’re trying to push to I2C at the same time… On an ATmega328(P). At 38400 baud.
Buy yourself a pair of Artemis RedBoards and you should be good to go:
https://www.sparkfun.com/products/15444
Interesting challenge. I enjoyed that. And I hope this helps you sleep easy…!
Best wishes,
Paul
Example5_RelativePositioningInformation_SoftwareSerial.zip (1.86 KB)