DIY RTK BASE-NTRIP Caster CORS Server with ESP32 and Free DDNS provider - F9P PX1122R

In this post, we will try to guide you in as much detail as possible to be able to build an NTRIP CASTER RTK server with ESP32.

Yes, you didn’t get it wrong!

You will have your own fully functional NTRIP CASTER CORS server that can be used for any RTK application without RTK2GO any more (ESPrtk version 3.9.95 ).

I would like to give all thanks for RTK2GO.com , It is always my top recommendation for a high quality and free NTRIP service. The SNIP team has created a great service !

For DIY users, hopefully the parameters below meet their needs :

  • Realtime CORS NTRIP CASTER server.
  • Support NTRIP Client (Rover PUSH-DOWN).
  • Support NTRIP Server (Basestation PUSH-UP).
  • Support analysis of NMEA GGA/RMC from Rover and display on map.
  • MAX SOCKET : 9 + 1 (including Admin dashboard).
  • MAX BAN IP : 50
  • MAX ACCOUNT : 100
  • MAX BANDWIDTH : 3600000 bps
  • BASE EACH ACCOUNT : 1
  • ROVER EACH ACCOUNT : 10
  • NMEA/RTCM injection : GGA , RTCM 1005,1006,1007,1008,1032,1033,1004,1012 (for TOPCON, Trimble and Hemisphere)
  • Admin management page (Account, kick or ban connection, map, graph, restart …)
  • Runs in local network ( address 192.168.x.x:port )
  • Run in the global network and connect anywhere in the world with the free DDNS service!
  • Access and Server type select (img)
  • Account manager for each Base/Rover (img)
  • Custom STR editor for each Base/Rover (img)
  • Socket manager , force kick out, ban IP user , IP/Port/Acount/Speed …… for each Base/Rover (img)
  • Set limit bandwidth , limit time , limit rover numbers , VRS , password login ,…. for each Base/Rover (img)
  • STR/NMEA/GGA/RMC collector , real time tracking and position viewer by map view , auto marker , tooltip – popup ,… for each Base/Rover (img)
  • View all position of Base and Rover on a single page (img)
  • Mountpoint Sourcetable view on browser (img)
  • Dash board viewer : CASTER PROFILE , CURRENT TOTAL BANDWIDTH , TOTAL SOCKET OPENNING, SERVER UPTIME + STREAM COUNT BYTE, MOST ACTIVE ACCOUNT 24 HOUR , LAST 24 HOUR REVENUE , LAST 24 MINUTES REVENUE ,MOST ACTIVE ACCOUNT 1 MINUTE , Socket StatusData in (Kbps)Data out (Kbps), SOCKET DETAIL (Socket , Mode,IP +Time +In bps+Out bps+In&Out bps+Lat +Long+ Acount Name +HTTP User Agent ) ,BANDWIDTH (ALL+IN+OUT) , SOCKET COUNT (All+BASE+ROVER) (img)

Learn all the powerful features here:

We also created a video tutorial here: #ESPrtk- DIY NTRIP CASTER CORS Server with ESP32 and free DDNS host name - ESP32 RTK - F9P PX1122R. - YouTube

Hardware preparation

ESPrtk NTRIP CASTER is supported since version 3.9.89 .

But we recommend using the latest version of ESPrtk. ( currently 3.9.95 ).

Learn about ESPrtk 3.x.x version here: 3.x.x Firmware Support

Hardware.

Register and download the firmware for the ESP32

The process of downloading firmware for ESP32 consists of 2 steps.

  • Upload the register file Register.bin (If it is a new ESP32 chip).
  • Upload the App.bin file.

Please read this article carefully: Tutorial - Register / Update firmware for ESPrtk - ESPrtk -ESP32 RTK

Configure ESP32 and GNSS module RTK

ESPrtk Configure – Action Planning

ESPrtk Configure – Internet WIFI

ESPrtk Configure – CASTER port

ESPrtk Configure – Auto inject RTCM 1008,1007,1033,1004,1012…

For PX1122R Navspark.

FULL Size - ESPrtk MQTT NTRIP Radio LoRa Bluetooth F9P M8P F9P Ublox Navspark Ethernet ENC28J60 WW5500 MPU9250 IMU SD Card SARA 2G 3G 4G Cellular

Click here for more detail : http://esprtk.wap.sh/tt/t3/tt_w__cfg_base_navspark.html

GNSS Configure – PX1122R Base mode

GNSS Configure – PX1122R RTCM out

Hardware connect for F9P and BASE station configure.

ESPrtk ZED-F9P M8P - LEA -NEO Other
TX-UART1 RX1 RX1 RX-UART Conigure
RX-UART1 TX1 TX1 TX-UART Conigure
TX-UART2 RX2 RX2 RX-UART Conigure
RX-UART2 TX2 TX2 TX-UART Conigure

FULL Size - ESPrtk MQTT NTRIP Radio LoRa Bluetooth F9P M8P F9P Ublox Navspark Ethernet ENC28J60 WW5500 MPU9250 IMU SD Card SARA 2G 3G 4G Cellular

GNSS Configure – F9P RTCM 3 output

Read detail here : Configure F9P/M8P Ublox as BASE Station

FULL Size - ESPRTK NTRIP CASTER SEVER ESP32 F9P PX1122R UBLOX SKYTRAQ NAVSPARK TRIMBLE TOPCON HEMISPHERE JOHN DEERE

GNSS Configure – F9P Base FIX/Survey mode

Read detail here : Configure F9P/M8P Ublox as BASE Station

FULL Size - ESPRTK NTRIP CASTER SEVER ESP32 F9P PX1122R UBLOX SKYTRAQ NAVSPARK TRIMBLE TOPCON HEMISPHERE JOHN DEERE

GNSS Configure – F9P Save All configure to Flash

Read detail here : Configure F9P/M8P Ublox as BASE Station

FULL Size - ESPRTK NTRIP CASTER SEVER ESP32 F9P PX1122R UBLOX SKYTRAQ NAVSPARK TRIMBLE TOPCON HEMISPHERE JOHN DEERE

** Hardware connection – ETHERNET + Full standards.**

For RTK Basestation applications with up to several months or years of continuous uptime, we always recommend users to use the W5500 Ethernet module for their systems to ensure a stable 24-hour connection !.

In addition, it is possible to add 1 buzzer on the ERROR LED pin (3.3V Active Buzzer) and 1 small OLED module to be able to see the operating status, (connection status, error, flow rate, etc.) of the whole. system .

To connect ESPrtk with RTK receiver, Ethernet, OLED …, Click here for more detail.

FULL Size -

ETHERNET select.

FULL Size -

Account for DDNS service

There are many DDNS service providers, either free or purchase.

In this article, we choose NO-IP. You can get the service free for 30 days (or even free forever as long as you need confirmation of renewal for your account at the end of the month).

First access NO-IP at: https://www.noip.com/

We go to user account management. (This will be the username and password used to configure DDNS in the Router below).

Then add a new domain name .

In this example, my DDNS account is

(Of course you’ll need to create your own one that’s different from the one I’m using!).

Router Configure

Router Configure – Disble Firewall + Enable NAT

Router Configure – NAT Port

Router Configure – Add DDNS provider

Router Configure – Force DHCP assign a fixed Local IP address by MAC address

Check Port open

Make sure your ESP_CASTER is working when checking the port status !

Check CASTER Server address

Check with real app and device

Test the actual operation with multi-connection and multi-device support.

  • NTRIP Client Lefebure :1
  • NTRIP Client RTKLIB : 3
  • NTRIP Client SNIP : 1
  • NTRIP Server RTKLIB : 1


Check Admin Dashboard page


Build multi CASTER Server on multi port

Multi CASTER – Hardware prepare

Multi CASTER – NAT Multi Port

Multi CASTER – Force DHCP assign a fixed Local IP address by MAC address

Multi CASTER – Final Full Test

Quick check our ESP32 NTRIP CASTER server here:

Admin dashboard login:

  • Name login : admin
  • Password: abc123ABC

NTRIP Client/Server login:

  • Name login: name_0 (or name_1 , name_2 ,…)
  • Password: pass_0 ( or pass_1 , pass_2 ,…)

Learn all the powerful features here:

We also created a video tutorial here: #ESPrtk- DIY NTRIP CASTER CORS Server with ESP32 and free DDNS host name - ESP32 RTK - F9P PX1122R. - YouTube

What we want to emphasize is that this is a server run by only low cost ESP32 module, no need for Raspberry PI computer or a complicated server system !
Hope this project helps all of you.
The Router in our guide may be different from yours. If you have difficulty in setting up DDNS, NAT port, firewall,… Feel free to ask us on this forum or via email : contact@esprtk.com
We will try to help you set up your system successfully for free !

At the end of the article, we would like to thank @Torriem , @Timmy95 and @M_elias (on TheCombineForum ) for announcing that the AGOPENGPS forum has moved to a new hosting address.
Congratulations on the growth of AGOPENGPS !
Best regards – ESPrtk Dev Team.

7 Likes

Hi .
See the video here :

6 Likes

We will keep this system of 4 CASTER servers running continuous for 1 year from September 20, 2021 to September 20, 2022 (maybe longer if possible).

Some note :
Because we are making the login account (of the Admin Dashboard page) available to everyone, that means anyone can log in, view and change the configuration content on it.
So, if more than 2 people are logged into the Admin Dashboard page at the same time, the previous login will be automatically logged out, all you need to do is just click the login button again!
Hope you just only login, watch , go around and don’t try to attack this server.
It’s just a lovely ESP32 chip and only supports up to 10 connections at the same time! ( 40 connections for multi 4 server).
We need to keep it working as a demo so everyone can evaluate it’s feature.
Thank you so much your interested :two_hearts:

4 Likes

Hello.
On Admin Dashboard page. You can see the temperatures of ESP32 chip ( internal sensor ).
For long time running, using an heatsink will be the solution


1 Like

Dumb question: Is it possible to extract the corrections, feed them into AOG, or Agio and do the calculations inside AOG? Currently, the Ntrip function in AOG only sends out the needed Ntrip strings.

I would like to move both the uncorrected coordinates and the corrections inside of AOG.

Or possibly even connect a cheap GPS and get the corrections without the precision.

1 Like

You want to do the rtk calculations in AOG? I don’t think just any receiver can be used, especially one that only outputs NMEA strings but I could be mistaken. You could maybe take a look at rtklib to see what data you need in order for it to post process.

2 Likes

Thank you @m_elias .

Hi Ken.
Sorry, I’m trying to understand what you mean.
Are you looking to send NMEA RMC/GGA data to NTRIP CASTER to track your tractor on the map of the Admin Dashboard page?
( Is that why you just need cheap GPS module and don’t need high precision !?)

No. I want to use a good Ntrip source, and a cheap rover GPS. I’m not after precision, in the field, but accuracy. We have several situations where 1 meter is close enough. But the GPS drift is the problem. If we can simply get access to the raw corrections we can apply them to the positions inside AOG.

1 Like

Oh yeah.
So RTKlib will be good source for your system .

1 Like

Don’t know the difference between accuracy and precision?

Are there any dual frequency multi-constellation GNSS chips that can provide raw RTK measurements but do not provide the actual RTK accurate output? I cannot see any gain by moving the RTK calculations to a laptop, on the contrary a lot of data to transfer and quite a lot of processing power that the GNSS receiver could do (and no way to make use of that processing power that is not used at the receiver).

1 Like

Would 25 $ be low enough? PX1172R-20 : Decimeter Accuracy RTK Module - NavSpark Store

1 Like

Accuracy could also be called repeatability. So if you have good accuracy and poor precision, it means your absolute position might not be correct but you can always come back to the same spot (no drift).

2 Likes

Yes.
A good GPS/GNSS receiver will have low position drift.
A good antenna , good G-P-HDOP sky , good environment , ( less clouds , low humidity , less multipath , less noise …) , and good atomic clock…
In general, even an RTK receiver will always face such conditions.
For conventional GPS/GNSS receivers and DGPS/RTK receivers, the concepts of absolute accuracy and relative accuracy are often used to distinguish.

Both the GPS/GNSS receiver and the RTK Receiver are still drifting in the absolute coordinate system (the coordinate system associated with the earth).
But only the RTK receiver does not drift (cm) in its own relative coordinate system (the coordinate system attached to the base station).

An accurate rifle will hit the target in the same location every time. A precise rifle has a scope and it applies the corrections needed to hit the center.

In a relative coordinate system, you only need accuracy to repeat the same spot each day. GPS raw is neither accurate nor precise. Eliminating the drift, is one of these, the other is more precise GPS. It takes both the get sub centimeter.

Rtcm gives 1015, 1016, and 1017 corrections. These corrections are what I’m trying to get to.

2 Likes

Are you expecting a lower cost receiver that might not provide the correct position but would give perfect repeatability? If there was one, we would stop using RTK receivers with a base for correction signal. The point being that if this cheap system would provide RTK accuracy (centimetre level differential and absolute accuracy) if the absolute error was once measured and then subtracted. Sounds like a free lunch that does not exist in real life.

2 Likes

I’m thinking rtk accurate and precise base station. But less precise rovers. Possibly free lunch. But would love to extract the corrections and apply them to the GPA coordinates that I do have and see if standing still is standing relatively still. Not looking for completely still, but close enough to be considered not moving, a 1 meter variation would be tolerable.

1 Like

I once tried a test where I had two static GPS receivers outputting nmea and I used the drift from the one receiver to correct the second receiver but the result was not an improvement. To get rtk accuracy you have to apply the corrections at a much lower level in the receiver or output the necessary data for post-processing with rtklib.

2 Likes

The rtklib tools has a program for applying real-time corrections but I am not familiar with what sort of data stream it needs from your Rover GPS receiver.

1 Like

I’ve dug into my local state supplied Ntrip. I’ve decoded the messages enough to determine what messages they are transmitting. The message number string starts with a 12 bit number. I’ll look into the rtklib. Thank you.

1 Like