{"id":7261,"date":"2020-11-12T16:01:44","date_gmt":"2020-11-12T16:01:44","guid":{"rendered":"https:\/\/www.use-snip.com\/kb\/?post_type=ht_kb&#038;p=7261"},"modified":"2021-03-05T15:53:01","modified_gmt":"2021-03-05T15:53:01","slug":"ntrip-rev1-versus-rev2-formats","status":"publish","type":"ht_kb","link":"https:\/\/www.use-snip.com\/kb\/knowledge-base\/ntrip-rev1-versus-rev2-formats\/","title":{"rendered":"NTRIP Rev1 versus Rev2 formats"},"content":{"rendered":"<p>This article briefly explains the difference between the NTRIP Client connection format style used in NTRIP Rev1 (version 1.0) and Rev2 (version 2.0) and provides examples.<\/p>\n<h2>Background<\/h2>\n<p>The creation of NTRIP Rev2 was largely motivated by the need to correct a few minor oversights in the original Rev1 standard. This included correcting the protocol details to adhere to emerging HTTP standards, and also adding greater log-on security for Base Stations. A number of new features were also added, but their adoption and deployment at this point remains very low. In fact the initial Rev1 version remains so popular today that among NTRIP Client devices, Rev1 users outnumber Rev2 users by about 25:1.<\/p>\n<p>For those seeking the specific details of the either version, both standards are available from RTCM (<a href=\"https:\/\/rtcm.myshopify.com\/collections\/differential-global-navigation-satellite-dgnss-standards\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>).\u00a0 The formal names of the two documents are given below. It is most cost effective to purchase them as a set.<\/p>\n<p style=\"padding-left: 40px;\">RTCM 10410.0 (RTCM Paper 200-2004\/SC104-STD, Version 1.0), with Amendment 1,<br \/>\nStandard for Networked Transport of RTCM via Internet Protocol (Ntrip)<\/p>\n<p style=\"padding-left: 40px;\">RTCM 10410.1 Standard for Networked Transport of RTCM via Internet Protocol (Ntrip)<br \/>\nVersion 2.0 with Amendment 1, June 28, 2011<\/p>\n<p>In this article we are concerned with how the rover device (the <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip-client\/\" target=\"_blank\" rel=\"noopener noreferrer\">NTRIP Client<\/a>) connects to the <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip-caster\/\" target=\"_blank\" rel=\"noopener noreferrer\">NTRIP Caster<\/a> device. This information is valid for any Caster, not just the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> NTRIP Caster. Some similar changes were made for Base Station connections (<a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">NTRIP Servers<\/a>), between Rev1 and Rev2, but are not covered here.<\/p>\n<p>In an OSI layer context, the NTRIP protocol lives <em>on top<\/em> of the HTTP protocol, which in turn lives <em>on top<\/em> of the TCP\/IP protocol. The purpose of the protocol is the allow the connecting client device to authenticate itself with the data provider (the Caster) and then to select a data stream. Once this initial process has occurred, the selected data stream is sent back to the device over the open socket. With the exception of additional periodic <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/nmea-gga-strings-in-ntrip-clients\/\" target=\"_blank\" rel=\"noopener noreferrer\">NMEA-183 $GGA<\/a> sentences (used by <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/nearest-mountpt-use\/\" target=\"_blank\" rel=\"noopener noreferrer\">NEAR streams<\/a> to select the correct Base Station for each user), the NTRIP Client device sends nothing further. In this context, NTRIP is a simple and elegant publish\/subscribe mechanism.<\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #008000;\"><strong>Note<\/strong><\/span>: In the examples that follow <em>mountPt<\/em> is the name for the Base Station or \u2018stream\u2019 that is being requested.\u00a0 And <em>user<\/em> and <em>password<\/em> are used for the user password pair, which is in turn sent in a Base64 encoded format (i.e. user:password becomes dXNlcjpwYXNzd29yZA==).\u00a0 All of these strings are case sensitive and generally limited to ASCII content without the use of white space. Consult the standard for further details regarding valid strings and allowed characters.\u00a0 The &lt;cr&gt;&lt;lf&gt; delimits the end of each line in the HTTP header.\u00a0 A final line with only &lt;cr&gt;&lt;lf&gt; serves to delimit the end of the header (not shown).<\/p>\n<h2>NTRIP Client Rev1 connections<\/h2>\n<p>Because NTRIP was originally based on HTTP and a protocol called Shoutcast (<a href=\"https:\/\/en.wikipedia.org\/wiki\/SHOUTcast\" target=\"_blank\" rel=\"noopener noreferrer\">historic details<\/a>), it uses the common GET verb to request the desired mountPt.<\/p>\n<p>A minimal NTRIP Client Rev1 example with no user log on is:<\/p>\n<pre style=\"padding-left: 40px;\">GET \/mountPt HTTP\/1.0&lt;cr&gt;&lt;lf&gt;\r\nUser-Agent: NTRIP theSoftware\/theRevision&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>A minimal NTRIP Client Rev1 example with a user log on is:<\/p>\n<pre style=\"padding-left: 40px;\">GET \/mountPt HTTP\/1.0&lt;cr&gt;&lt;lf&gt;\r\nUser-Agent: NTRIP theSoftware\/theRevision&lt;cr&gt;&lt;lf&gt;\r\nAuthorization: dXNlcjpwYXNzd29yZA==&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>When a request is accepted by the NTRIP Caster, the Caster replies with:<\/p>\n<pre style=\"padding-left: 40px;\">ICY 200 OK&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>And thereafter binary content (typically <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/rtcm-3-message-list\/\" target=\"_blank\" rel=\"noopener noreferrer\">RTCM 3.x<\/a> messages) follows.\u00a0 In case of any type of error the caster table is returned and the connection is dropped.<\/p>\n<h3>Details<\/h3>\n<p>After the <strong>GET<\/strong> keyword a single space is expected to be found, followed by &#8220;\/&#8221; then the name of the requested data stream, another space, and then the HTTP revision.\u00a0 As a rule, HTTP expects a single space (hex 0x20) as the delimiter, any additional white space may cause problems.<\/p>\n<p>The keyword \u201c<strong>User-Agent:<\/strong>\u201d is used to convey two key concepts.\u00a0 First that this is an NTRIP Caster (and not a browser or some other agent) and second what make\/model of software is being used.\u00a0 [<span style=\"color: #008000;\"><em><strong>Note<\/strong><\/em><\/span>: The term \u201cSource-Agent:\u201d was invented by NTRIP for Base Stations sending in data and is used in Rev1. It was deprecated in Rev2]<\/p>\n<p>The keyword NTRIP is considered as case insensitive for historical reasons, although upper case is most common.<\/p>\n<p>This keyword is followed by the model of NTRIP Client software being used. This most typically in the format of \u201cMaker-Model\/Revision\u201d\u00a0 without white space.\u00a0 A typical list of recent Clients strings on a popular pubic caster can be found <a href=\"http:\/\/rtk2go.com:2101\/SNIP::STATUS#agents\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>\u00a0 with typical NTRIP device strings.<\/p>\n<p>The keyword \u201c<strong>Authorization:<\/strong>\u201d is used to send the user and password encoded in a common Base64 format, when present.<\/p>\n<p>The simplest request consists\u00a0 of only two or three lines in a common HTTP header form.\u00a0 But the HTTP header can often contain additional meta information. In addition, if the HTTP 1.1 form is used some additional information is then required.\u00a0 See <a href=\"https:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html\" target=\"_blank\" rel=\"noopener noreferrer\">rfc2616<\/a> for details.<\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #008000;\"><strong>Aside #1<\/strong><\/span>: The proper way to request the caster table is to by sending \u201c\/\u201d after the GET verb.\u00a0 And not by sending arbitrary strings such as \u201cCasterTable\u201d &#8211; which only works because the default behavior of the NTRIP Caster when an error is detected is to return the caster table and then disconnect.<\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #008000;\"><strong>Aside #2<\/strong><\/span>: When sending data to the Caster from a Base station using Rev1, the keyword \u201cSOURCE\u201d is used, in Rev2 this is replaced with \u201cPOST\u201d along with other changes.<\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #008000;\"><strong>Aside #3<\/strong><\/span>: When sending NMEA-183 $GGA data to the Caster, the NTRIP Client should wait until the &#8220;ICY&#8221; reply has been received indicating that the connection is accepted.<\/p>\n<h2>NTRIP Client Rev2 connections<\/h2>\n<p>In Rev2 of NTRIP a few details were cleaned up in order to better follow HTTP.\u00a0 Most of the Rev2 changes are found in the way an NTRIP Server (the Base Station) connects to the Caster.\u00a0 In the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> Caster this is called a <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/the-pushed-streams-tab\/\" target=\"_blank\" rel=\"noopener noreferrer\">PUSH-In<\/a> connection.<\/p>\n<p>A minimal NTRIP Client Rev2 example with no user log on is:<\/p>\n<pre style=\"padding-left: 40px;\">GET \/mountPt HTTP\/1.1&lt;cr&gt;&lt;lf&gt;\r\nHost: theCaster.com:2101&lt;cr&gt;&lt;lf&gt;\r\nNtrip-Version: Ntrip\/2.0&lt;cr&gt;&lt;lf&gt;\r\nUser-Agent: NTRIP theSoftware\/theRevision&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>A minimal NTRIP Client Rev2 example with a user log on is:<\/p>\n<pre style=\"padding-left: 40px;\">GET \/mountPt HTTP\/1.1&lt;cr&gt;&lt;lf&gt;\r\nHost: theCaster.com:2101&lt;cr&gt;&lt;lf&gt; \r\nNtrip-Version: Ntrip\/2.0&lt;cr&gt;&lt;lf&gt;\r\nUser-Agent: NTRIP theSoftware\/theRevision&lt;cr&gt;&lt;lf&gt;\r\nAuthorization: dXNlcjpwYXNzd29yZA==&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>When a request is accepted by the NTRIP Caster, the Caster replies with at least:<\/p>\n<pre style=\"padding-left: 40px;\">HTTP\/1.1 200 OK&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>A more typical reply includes some additional header details like:<\/p>\n<pre style=\"padding-left: 40px;\">HTTP\/1.1 200 OK&lt;cr&gt;&lt;lf&gt;\r\nDate: Wed, 11 November 2020 20:29:36 UTC&lt;cr&gt;&lt;lf&gt;\r\nServer: SubCarrier Systems Corp SNIP simpleNTRIP_Caster_[2.13.00]RwPRO&lt;cr&gt;&lt;lf&gt;\r\nNtrip-Version: Ntrip\/2.0&lt;cr&gt;&lt;lf&gt;\r\nCache-Control: no-store, no-cache, max-age=0&lt;cr&gt;&lt;lf&gt;\r\nPragma: no-cache&lt;cr&gt;&lt;lf&gt;\r\nConnection: close&lt;cr&gt;&lt;lf&gt;\r\nContent-Type: gnss\/data&lt;cr&gt;&lt;lf&gt;<\/pre>\n<p>And thereafter binary content (typically <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/rtcm-3-message-list\/\" target=\"_blank\" rel=\"noopener noreferrer\">RTCM 3.x<\/a> messages) follows.\u00a0 In case of any type of error, a variety of other error replies are supported (aka HTTP 4xx messages) as well as returning the caster table to the requestor.<\/p>\n<h3>Details<\/h3>\n<p>The Rev2 format builds on the Rev 1 format as well as new meta information defined and found in HTTP 1.1. As before, the HTTP header can often contain additional meta information.\u00a0 This is true for both the request and reply headers.<\/p>\n<p>The two additional (and required) header lines contain the &#8220;<strong>Host:<\/strong>&#8221; and &#8220;<strong>Ntrip-Version:<\/strong>&#8221; meta information.<\/p>\n<p>The meta keyword &#8220;<strong>Host:<\/strong>&#8221; coveys what specific server the host and port the request refers to.\u00a0 In a machine where there is an IP address which is associated with one (and only one) NTRIP host this information is not required, but it is mandated by HTTP. In a shared host environment, or where a firewall or proxy is used, this information is essential to route the request to the correct host device.<\/p>\n<p>The meta keyword &#8220;<strong>Ntrip-Version:<\/strong>&#8221; is invented by the NTRIP Rev2 specification and should follow the exact text above.\u00a0 No other variations of the value text are defined at this time. The presence of this line indicates the use of NTRIP Rev2.<\/p>\n<p>In the reply, note that the &#8220;ICY&#8221; (ICY = I can hear you) is replaced by an HTTP 200 OK\u00a0 line, which also includes the version of HTTP used.<\/p>\n<p>Several other meta keywords may optionally be present in the reply including a date stamp and details about the NTRIP Caster software.\u00a0 Here &#8220;<strong>Server:<\/strong>&#8221; is used in a traditional web sense for the Caster, not the NTRIP meaning for an NTRIP Server (a Base Station).\u00a0 The above example uses the reply from a <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> Caster, other brands are similar.<\/p>\n<p>Many devices do not support Rev2 connections. This is especially true on low cost devices. The popular open source library called <strong>RTKLIB<\/strong> (see: <a href=\"http:\/\/www.rtklib.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a> <a href=\"https:\/\/github.com\/tomojitakasu\/RTKLIB\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a> or <a href=\"https:\/\/rtklibexplorer.wordpress.com\/category\/rtklib\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>) can <strong>only<\/strong> connect with the Rev1 connection style.\u00a0 A number of branched improvements and some commercial software based on it, including <a href=\"https:\/\/emlid.com\/reach\/\" target=\"_blank\" rel=\"noopener noreferrer\">Emlid Reach<\/a>, also do not implement Rev2 connections. Higher grade devices (<a href=\"https:\/\/www.trimble.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Trimble<\/a>, <a href=\"https:\/\/leica-geosystems.com\/en-us\/products\/gnss-systems\" target=\"_blank\" rel=\"noopener noreferrer\">Leica<\/a>, <a href=\"https:\/\/www.hemispheregnss.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Hemisphere<\/a>, <a href=\"https:\/\/www.topconpositioning.com\/gnss-network-solutions\" target=\"_blank\" rel=\"noopener noreferrer\">TopCon<\/a>, etc.) support both Rev2 and Rev1 and typically these devices default to using Rev2. Consult the specific owner\u2019s manual for details.<\/p>\n<p>In Rev2, NTRIP Client connections are intended to allow backwards \u201cdownward\u201d compatibly with Rev1 connections. Therefore any NTRIP Client sending in a Rev2 request should also be designed to accept and cope with a Rev1 reply. This is not true for NTRIP Server connections.<\/p>\n<p>The Rev2, the protocol requires the use of HTTP 1.1 and therefore requires the use of the host meta line (see <a href=\"https:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html\" target=\"_blank\" rel=\"noopener noreferrer\">rfc2616<\/a> for details).\u00a0 An IP or URL name may be used here, and the port should be used as well (although the current RTCM standard is less clear about this detail, RFC2616 is not).<\/p>\n<h2>Final Remarks<\/h2>\n<p>Please do not use live Casters to test new NTRIP Client software. It is highly likely the Caster operator will block your IP for such use\/abuse. The console log of the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> Caster provides a great deal of detail about various causes for incorrect NTRIP Client connections. Some developers simply download a <span style=\"color: #993300;\"><em><strong>Lite<\/strong><\/em><\/span> (free) copy of <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> onto their own local machine for such testing.<\/p>\n<p style=\"text-align: left;\">Those developing products are strongly advised seek for the specific details of the either version from <a href=\"https:\/\/rtcm.myshopify.com\/collections\/differential-global-navigation-satellite-dgnss-standards\" target=\"_blank\" rel=\"noopener noreferrer\">RTCM.<\/a><\/p>\n<p><span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> fully supports both Rev1 and Rev2 NTRIP connection styles for <em>Clients<\/em>, <em>Casters<\/em>, and <em>Servers<\/em>. The <span style=\"color: #993300;\"><em><strong>Lite<\/strong><\/em><\/span> (free) copy of <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> is limited to the Rev 1 format only for some connections.\u00a0 You can examine all the protocol exchange details in the console view by enabling various display options for each connection type.<\/p>\n<p>&nbsp;<\/p>\n<h3>See Also<\/h3>\n<p><a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/ntrip-rev2-uses-in-snip\/\" target=\"_blank\" rel=\"noopener noreferrer\">The article<\/a> on NTRIP Rev2 uses in <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> which has further NTRIP <strong>Server<\/strong> connection details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article briefly explains the difference between the NTRIP Client connection format style used in NTRIP Rev1 (version 1.0) and Rev2 (version 2.0) and provides examples. Background The creation of NTRIP Rev2 was largely motivated by the need to correct a few minor oversights in the original Rev1 standard. This [&hellip;]<\/p>\n","protected":false},"author":13,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"ht-kb-category":[114],"ht-kb-tag":[481,237,118,480,397],"class_list":["post-7261","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-faqs","ht_kb_tag-formats","ht_kb_tag-ntrip","ht_kb_tag-ntrip-client","ht_kb_tag-rev1","ht_kb_tag-rev2"],"_links":{"self":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/7261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/comments?post=7261"}],"version-history":[{"count":23,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/7261\/revisions"}],"predecessor-version":[{"id":7586,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/7261\/revisions\/7586"}],"wp:attachment":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/media?parent=7261"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=7261"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=7261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}