[{"data":1,"prerenderedAt":487},["ShallowReactive",2],{"docs-en-\u002Fdocs\u002Fstream\u002Fnmea":3},{"id":4,"title":5,"body":6,"description":479,"extension":480,"meta":481,"navigation":482,"path":483,"seo":484,"stem":485,"__hash__":486},"docs_en\u002Fdocs\u002Fstream\u002Fnmea.md","Raw NMEA feed",{"type":7,"value":8,"toc":469},"minimark",[9,13,22,27,36,40,80,84,99,103,119,122,131,134,143,147,158,162,215,218,320,324,327,331,337,344,360,365,380,390,443,456,465],[10,11,5],"h1",{"id":12},"raw-nmea-feed",[14,15,16,17,21],"p",{},"The raw NMEA feed delivers the original ",[18,19,20],"code",{},"!AIVDM"," sentences received by Pelyr community stations.\nIt is live and worldwide.\nThere is no backfill: a connection starts with the sentences received from that moment on.\nThe feed is included with the Enterprise plan and with Community access.\nThe sentences are licensed under the Pelyr Data Licence 2.0.\nYou may not pass the sentences on to others.",[23,24,26],"h2",{"id":25},"key","Key",[14,28,29,30,35],{},"Create an \"NMEA feed\" key on the ",[31,32,34],"a",{"href":33},"\u002Fstream","API page"," of the dashboard.\nAn NMEA feed key opens only this feed.\nOn the plain port the key travels unencrypted, so prefer the TLS port.",[23,37,39],{"id":38},"endpoint","Endpoint",[41,42,43,59],"table",{},[44,45,46],"thead",{},[47,48,49,53,56],"tr",{},[50,51,52],"th",{},"Host",[50,54,55],{},"Plain TCP",[50,57,58],{},"TLS",[60,61,62],"tbody",{},[47,63,64,70,75],{},[65,66,67],"td",{},[18,68,69],{},"nmea.pelyr.com",[65,71,72],{},[18,73,74],{},"5631",[65,76,77],{},[18,78,79],{},"5632",[23,81,83],{"id":82},"connecting","Connecting",[14,85,86,87,90,91,94,95,98],{},"Send the first line within 5 seconds.\nThe first line is at most 128 bytes and ends in a line feed.\nIt holds the key, either bare or as ",[18,88,89],{},"A|T|\u003Ckey>",".\nAnything else the client sends is ignored.\nThe server then sends the greeting line ",[18,92,93],{},"# Pelyr raw NMEA feed. AIS data from Pelyr (pelyr.com), Pelyr Data Licence 2.0",", followed by one sentence per line, each ending in ",[18,96,97],{},"\\r\\n",".",[23,100,102],{"id":101},"quick-test","Quick test",[104,105,110],"pre",{"className":106,"code":107,"language":108,"meta":109,"style":109},"language-sh shiki shiki-themes github-light github-dark","export PELYR_KEY=pk_…\n","sh","",[18,111,112],{"__ignoreMap":109},[113,114,117],"span",{"class":115,"line":116},"line",1,[113,118,107],{},[14,120,121],{},"Plain TCP:",[104,123,125],{"className":106,"code":124,"language":108,"meta":109,"style":109},"{ printf '%s\\n' \"$PELYR_KEY\"; cat; } | nc nmea.pelyr.com 5631\n",[18,126,127],{"__ignoreMap":109},[113,128,129],{"class":115,"line":116},[113,130,124],{},[14,132,133],{},"TLS:",[104,135,137],{"className":106,"code":136,"language":108,"meta":109,"style":109},"{ printf '%s\\n' \"$PELYR_KEY\"; cat; } | openssl s_client -quiet -verify_return_error -verify_hostname nmea.pelyr.com -connect nmea.pelyr.com:5632\n",[18,138,139],{"__ignoreMap":109},[113,140,141],{"class":115,"line":116},[113,142,136],{},[23,144,146],{"id":145},"what-arrives","What arrives",[14,148,149,150,153,154,157],{},"Sentences arrive unchanged, talker included.\nAll parts of a multipart message arrive back to back.\nThere are no tag blocks, no timestamps and no station data.\n",[18,151,152],{},"VDO"," sentences and message types 6, 7, 12 and 13 are not delivered.\nThe same transmission heard by two stations arrives twice.\nLines starting with ",[18,155,156],{},"#"," are comments; NMEA parsers skip them.",[23,159,161],{"id":160},"comment-lines","Comment lines",[41,163,164,174],{},[44,165,166],{},[47,167,168,171],{},[50,169,170],{},"Line",[50,172,173],{},"Meaning",[60,175,176,185,195,205],{},[47,177,178,182],{},[65,179,180],{},[18,181,93],{},[65,183,184],{},"Greeting after a valid key",[47,186,187,192],{},[65,188,189],{},[18,190,191],{},"# keepalive",[65,193,194],{},"No data for 60 seconds",[47,196,197,202],{},[65,198,199],{},[18,200,201],{},"# warning: dropped \u003Cn> messages (client too slow)",[65,203,204],{},"Your client reads too slowly; the oldest messages were dropped. Sent at most every 10 seconds",[47,206,207,212],{},[65,208,209],{},[18,210,211],{},"# error: \u003Ccode>",[65,213,214],{},"The connection closes after this line",[14,216,217],{},"Error codes:",[41,219,220,231],{},[44,221,222],{},[47,223,224,226,228],{},[50,225,170],{},[50,227,173],{},[50,229,230],{},"Reconnect",[60,232,233,246,258,270,283,295,308],{},[47,234,235,240,243],{},[65,236,237],{},[18,238,239],{},"# error: unauthorized",[65,241,242],{},"Unknown or malformed key, or no key line within 5 seconds",[65,244,245],{},"No",[47,247,248,253,256],{},[65,249,250],{},[18,251,252],{},"# error: key_revoked",[65,254,255],{},"Revoked key, or suspended or deleted account",[65,257,245],{},[47,259,260,265,268],{},[65,261,262],{},[18,263,264],{},"# error: nmea_not_in_plan",[65,266,267],{},"No raw NMEA feed access, or a key that is not an NMEA feed key",[65,269,245],{},[47,271,272,277,280],{},[65,273,274],{},[18,275,276],{},"# error: try_again",[65,278,279],{},"We cannot check the key right now",[65,281,282],{},"After 5–30 seconds",[47,284,285,290,293],{},[65,286,287],{},[18,288,289],{},"# error: server_restart",[65,291,292],{},"The server is restarting",[65,294,282],{},[47,296,297,302,305],{},[65,298,299],{},[18,300,301],{},"# error: too_many_connections",[65,303,304],{},"The connection limit is reached",[65,306,307],{},"After a back-off",[47,309,310,315,318],{},[65,311,312],{},[18,313,314],{},"# error: rate_limited",[65,316,317],{},"Too many failed key attempts from your IP address",[65,319,307],{},[23,321,323],{"id":322},"limits","Limits",[14,325,326],{},"Feed connections count against your plan's connection limit together with WebSocket connections.\nAccess ends within a minute of a plan change, a key revocation or an account block, while our database is reachable.",[23,328,330],{"id":329},"opencpn","OpenCPN",[14,332,333,334,98],{},"OpenCPN cannot send a key or speak TLS.\nA local relay sends the key, and OpenCPN reads from ",[18,335,336],{},"127.0.0.1",[14,338,339,340,343],{},"Plain, with ",[18,341,342],{},"socat",":",[104,345,347],{"className":106,"code":346,"language":108,"meta":109,"style":109},"socat TCP-LISTEN:10110,bind=127.0.0.1,reuseaddr,fork \\\n  SYSTEM:'{ printf \"%s\\n\" \"$PELYR_KEY\"; cat; } | socat - TCP:nmea.pelyr.com:5631'\n",[18,348,349,354],{"__ignoreMap":109},[113,350,351],{"class":115,"line":116},[113,352,353],{},"socat TCP-LISTEN:10110,bind=127.0.0.1,reuseaddr,fork \\\n",[113,355,357],{"class":115,"line":356},2,[113,358,359],{},"  SYSTEM:'{ printf \"%s\\n\" \"$PELYR_KEY\"; cat; } | socat - TCP:nmea.pelyr.com:5631'\n",[14,361,339,362,343],{},[18,363,364],{},"ncat",[104,366,368],{"className":106,"code":367,"language":108,"meta":109,"style":109},"ncat --listen --keep-open 127.0.0.1 10110 \\\n  --sh-exec '{ printf \"%s\\n\" \"$PELYR_KEY\"; cat; } | ncat nmea.pelyr.com 5631'\n",[18,369,370,375],{"__ignoreMap":109},[113,371,372],{"class":115,"line":116},[113,373,374],{},"ncat --listen --keep-open 127.0.0.1 10110 \\\n",[113,376,377],{"class":115,"line":356},[113,378,379],{},"  --sh-exec '{ printf \"%s\\n\" \"$PELYR_KEY\"; cat; } | ncat nmea.pelyr.com 5631'\n",[14,381,382,383,386,387,343],{},"TLS, with ",[18,384,385],{},"stunnel"," and this ",[18,388,389],{},"pelyr-nmea.conf",[104,391,395],{"className":392,"code":393,"language":394,"meta":109,"style":109},"language-ini shiki shiki-themes github-light github-dark","foreground = yes\n[pelyr-nmea]\nclient = yes\naccept = 127.0.0.1:10111\nconnect = nmea.pelyr.com:5632\nverifyChain = yes\nCAfile = \u002Fetc\u002Fssl\u002Fcerts\u002Fca-certificates.crt\ncheckHost = nmea.pelyr.com\n","ini",[18,396,397,402,407,413,419,425,431,437],{"__ignoreMap":109},[113,398,399],{"class":115,"line":116},[113,400,401],{},"foreground = yes\n",[113,403,404],{"class":115,"line":356},[113,405,406],{},"[pelyr-nmea]\n",[113,408,410],{"class":115,"line":409},3,[113,411,412],{},"client = yes\n",[113,414,416],{"class":115,"line":415},4,[113,417,418],{},"accept = 127.0.0.1:10111\n",[113,420,422],{"class":115,"line":421},5,[113,423,424],{},"connect = nmea.pelyr.com:5632\n",[113,426,428],{"class":115,"line":427},6,[113,429,430],{},"verifyChain = yes\n",[113,432,434],{"class":115,"line":433},7,[113,435,436],{},"CAfile = \u002Fetc\u002Fssl\u002Fcerts\u002Fca-certificates.crt\n",[113,438,440],{"class":115,"line":439},8,[113,441,442],{},"checkHost = nmea.pelyr.com\n",[14,444,445,446,448,449,452,453,98],{},"Then run the ",[18,447,342],{}," line above with ",[18,450,451],{},"TCP:127.0.0.1:10111"," in place of ",[18,454,455],{},"TCP:nmea.pelyr.com:5631",[14,457,458,459,461,462,98],{},"In OpenCPN, open Options → Connections → Add Connection → Network, and set protocol TCP, address ",[18,460,336],{},", port ",[18,463,464],{},"10110",[466,467,468],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":109,"searchDepth":356,"depth":356,"links":470},[471,472,473,474,475,476,477,478],{"id":25,"depth":356,"text":26},{"id":38,"depth":356,"text":39},{"id":82,"depth":356,"text":83},{"id":101,"depth":356,"text":102},{"id":145,"depth":356,"text":146},{"id":160,"depth":356,"text":161},{"id":322,"depth":356,"text":323},{"id":329,"depth":356,"text":330},"Original AIS sentences over TCP, for your own decoder, pipeline or OpenCPN.","md",{},true,"\u002Fdocs\u002Fstream\u002Fnmea",{"title":5,"description":479},"docs\u002Fstream\u002Fnmea","d9ORK2vrUihRyWwJdFBcUrE7UPoO1HKJEuPvcx4dmfM",1795259693756]