forked from Microchip-MPLAB-Harmony/net_apps_pic32ck_sg_gc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C.html
411 lines (336 loc) · 37.6 KB
/
GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" data-whc_version="24.1">
<head><link rel="shortcut icon" href="oxygen-webhelp\template\resources/images/favicon.ico"/><link rel="icon" href="oxygen-webhelp\template\resources/images/favicon.ico"/><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="description" content="This application demonstrates usage of MPLAB Harmony TCP API to implement a TCP echo server on port 9760. Description The TCP/IP TCP Server application is based on MPLAB® Harmony 3 TCP/IP Stack. The ..."/><meta name="copyright" content="(C) Copyright 2023"/><meta name="generator" content="DITA-OT"/><title>1.2 TCP/IP TCP Server</title><!-- Generated with Oxygen version 24.1, build number 2022062014. --><meta name="wh-path2root" content=""/><meta name="wh-toc-id" content="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C-d275e27"/><meta name="wh-source-relpath" content="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C.xml"/><meta name="wh-out-relpath" content="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C.html"/>
<!-- Latest compiled and minified Bootstrap CSS -->
<link rel="stylesheet" type="text/css" href="./oxygen-webhelp/lib/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="./oxygen-webhelp/lib/jquery-ui/jquery-ui.min.css"/>
<!-- Template default styles -->
<link rel="stylesheet" type="text/css" href="./oxygen-webhelp/app/topic-page.css?buildId=2022062014"/>
<script src="./oxygen-webhelp/lib/jquery/jquery-3.5.1.min.js"></script>
<script data-main="./oxygen-webhelp/app/topic-page.js" src="./oxygen-webhelp/lib/requirejs/require.js"></script>
<link rel="stylesheet" type="text/css" href="oxygen-webhelp/template/microchip.css?buildId=2022062014"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/template/notes.css?buildId=2022062014"/>
<script src="mchp-context-help.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML" async="" type="text/javascript"></script>
</head>
<body id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C" class="wh_topic_page frmBody">
<a href="#wh_topic_body" class="sr-only sr-only-focusable">
Jump to main content
</a>
<header class="navbar navbar-default wh_header">
<div class="container-fluid">
<div class="wh_header_flex_container navbar-nav navbar-expand-md navbar-dark">
<div class="wh_logo_and_publication_title_container">
<div class="wh_logo_and_publication_title">
<a href="index.html" class=" wh_logo d-none d-sm-block "><img src="oxygen-webhelp\template\resources/images/microchip.png" alt="MPLAB® Harmony 3 TCP/IP Application for PIC32CK GC01 Family "/></a>
<div class=" wh_publication_title "><a href="index.html">MPLAB® Harmony 3 TCP/IP Application for PIC32CK GC01 Family </a></div>
</div>
</div>
<div class="wh_top_menu_and_indexterms_link collapse navbar-collapse" id="wh_top_menu_and_indexterms_link">
</div>
</div>
</div>
</header>
<div class=" wh_search_input navbar-form wh_topic_page_search search " role="form">
<form id="searchForm" method="get" role="search" action="search.html"><div class="d-flex justify-contents-around"><div class="flex-grow-1"></div><div class="position-relative flex-grow-1"><input type="search" placeholder="Search " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="Search query" required="required"/><button type="submit" class="wh_search_button" aria-label="Search"><span class="search_input_text">Search</span></button></div><div class="align-self-center flex-grow-1 ml-2"></div></div></form>
<div class="mchp-color-stripe-grid-container">
<div class="mchp-main-bar mchp-orange-bar"></div>
<div class="mchp-main-bar mchp-blue-bar"></div>
<div class="mchp-main-bar mchp-green-bar"></div>
</div>
</div>
<div class="container-fluid" id="wh_topic_container">
<div class="row">
<nav class="wh_tools d-print-none navbar-expand-md" aria-label="Tools">
<div data-tooltip-position="bottom" class=" wh_breadcrumb "><ol class="d-print-none"><li><span class="home"><a href="index.html"><span>Home</span></a></span></li><li><div class="topicref" data-id="GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB"><div class="title"><a href="GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB.html"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1</ph>
Harmony 3 TCP/IP Application for PIC32CK GC01 Family</a></div></div></li><li class="active"><div class="topicref" data-id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C"><div class="title"><a href="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C.html"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1.2</ph>
TCP/IP TCP Server</a></div></div></li></ol></div>
<div class="wh_right_tools">
<button class="wh_hide_highlight" aria-label="Toggle search highlights" title="Toggle search highlights"></button>
<button class="webhelp_expand_collapse_sections" data-next-state="collapsed" aria-label="Collapse sections" title="Collapse sections"></button>
<div class=" wh_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="Print this page" aria-label="Print this page"></button></div>
<button type="button" id="wh_toc_button" class="custom-toggler navbar-toggler collapsed wh_toggle_button navbar-light" aria-expanded="false" aria-label="Toggle publishing table of content" aria-controls="wh_publication_toc">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
</div>
<div class="wh_content_area">
<div class="row">
<nav id="wh_publication_toc" class="col-lg-3 col-md-3 col-sm-12 d-md-block d-none d-print-none" aria-label="Table of Contents Container">
<div id="wh_publication_toc_content">
<div class=" wh_publication_toc " data-tooltip-position="right"><span class="expand-button-action-labels"><span id="button-expand-action" role="button" aria-label="Expand"></span><span id="button-collapse-action" role="button" aria-label="Collapse"></span><span id="button-pending-action" role="button" aria-label="Pending"></span></span><ul role="tree" aria-label="Table of Contents"><li role="treeitem" aria-expanded="true"><div data-tocid="GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB-d275e11" class="topicref" data-id="GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB" data-state="expanded"><span role="button" tabindex="0" aria-labelledby="button-collapse-action GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB-d275e11-link" class="wh-expand-btn"></span><div class="title"><a href="GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB.html" id="GUID-BAB8E1C3-15DE-466E-8024-6FA20C9A3AEB-d275e11-link"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1</ph>
Harmony 3 TCP/IP Application for PIC32CK GC01 Family</a></div></div><ul role="group" class="navbar-nav nav-list"><li role="treeitem"><div data-tocid="GUID-5E40D04E-DBA0-4956-9A02-1BC5D9B6ED48-d275e19" class="topicref" data-id="GUID-5E40D04E-DBA0-4956-9A02-1BC5D9B6ED48" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="GUID-5E40D04E-DBA0-4956-9A02-1BC5D9B6ED48.html" id="GUID-5E40D04E-DBA0-4956-9A02-1BC5D9B6ED48-d275e19-link"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1.1</ph>
TCP/IP TCP Client</a></div></div></li><li role="treeitem" class="active"><div data-tocid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C-d275e27" class="topicref" data-id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C.html" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C-d275e27-link"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1.2</ph>
TCP/IP TCP Server</a></div></div></li><li role="treeitem"><div data-tocid="GUID-D2F03FE2-FB49-46AA-9EB9-D402A7ECE4C9-d275e35" class="topicref" data-id="GUID-D2F03FE2-FB49-46AA-9EB9-D402A7ECE4C9" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="GUID-D2F03FE2-FB49-46AA-9EB9-D402A7ECE4C9.html" id="GUID-D2F03FE2-FB49-46AA-9EB9-D402A7ECE4C9-d275e35-link"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1.3</ph>
TCP/IP WEB NET Server SD Card FATFS</a></div></div></li><li role="treeitem"><div data-tocid="GUID-C5B4F3A0-F36F-4796-8A86-3603A5F822DA-d275e43" class="topicref" data-id="GUID-C5B4F3A0-F36F-4796-8A86-3603A5F822DA" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="GUID-C5B4F3A0-F36F-4796-8A86-3603A5F822DA.html" id="GUID-C5B4F3A0-F36F-4796-8A86-3603A5F822DA-d275e43-link"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">1.4</ph>
TCP/IP WEB NET Super Set SD Card FATFS</a></div></div></li></ul></li><li role="treeitem" aria-expanded="false"><div data-tocid="GUID-F1A8FC97-AF0E-4957-9E2E-FBB5502EFFCD-d275e51" class="topicref" data-id="GUID-F1A8FC97-AF0E-4957-9E2E-FBB5502EFFCD" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action GUID-F1A8FC97-AF0E-4957-9E2E-FBB5502EFFCD-d275e51-link" class="wh-expand-btn"></span><div class="title"><a href="GUID-F1A8FC97-AF0E-4957-9E2E-FBB5502EFFCD.html" id="GUID-F1A8FC97-AF0E-4957-9E2E-FBB5502EFFCD-d275e51-link"><ph xmlns="http://www.oxygenxml.com/ns/webhelp/toc">2</ph>
Appendix</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="GUID-0FB3F908-88EE-45CE-94F5-E97AF9049C9B-d275e75" class="topicref backmatter backmatter_parent" data-id="GUID-0FB3F908-88EE-45CE-94F5-E97AF9049C9B" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action GUID-0FB3F908-88EE-45CE-94F5-E97AF9049C9B-d275e75-link" class="wh-expand-btn"></span><div class="title"><a href="GUID-0FB3F908-88EE-45CE-94F5-E97AF9049C9B.html" id="GUID-0FB3F908-88EE-45CE-94F5-E97AF9049C9B-d275e75-link">Microchip Information</a></div></div></li></ul></div>
</div>
</nav>
<div class="col-lg-7 col-md-9 col-sm-12" id="wh_topic_body">
<button id="wh_close_publication_toc_button" class="close-toc-button d-none" aria-label="Toggle publishing table of content" aria-controls="wh_publication_toc" aria-expanded="true">
<span class="close-toc-icon-container">
<span class="close-toc-icon"></span>
</span>
</button>
<button id="wh_close_topic_toc_button" class="close-toc-button d-none" aria-label="Toggle topic table of content" aria-controls="wh_topic_toc" aria-expanded="true">
<span class="close-toc-icon-container">
<span class="close-toc-icon"></span>
</span>
</button>
<div class=" wh_topic_content body "><main role="main"><article role="article" aria-labelledby="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-1F49AF00-8953-4C7C-852B-2ABFB276AF0F">
<h1 class="- topic/title title topictitle1" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-1F49AF00-8953-4C7C-852B-2ABFB276AF0F" style="">1.2 TCP/IP TCP Server</h1>
<div class="- topic/body body">
<p class="- topic/p p">This application demonstrates usage of MPLAB Harmony TCP API to implement a TCP echo server
on port 9760.</p>
<section class="- topic/section section" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KL1_1Y5_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KL1_1Y5_HWB"><h2 class="- topic/title title sectiontitle">Description</h2>
<p class="- topic/p p">The TCP/IP TCP Server application is based on MPLAB® Harmony 3 TCP/IP Stack. </p>
<p class="- topic/p p">The <a class="- topic/xref xref" href="https://microchip-mplab-harmony.github.io/net/index.html" target="_blank" rel="external noopener">Harmony TCP/IP stack</a> is a collection of different network
protocols. </p>
<p class="- topic/p p">The source files of Harmony 3 TCP/IP stack is available <a class="- topic/xref xref" href="https://github.com/Microchip-MPLAB-Harmony/net" target="_blank" rel="external noopener">here</a>.</p>
<p class="- topic/p p">The demo is created with <a class="- topic/xref xref" href="GUID-B7E0C911-C58F-49A8-9B8C-D5A621EF5EEA.html">MPLAB X IDE</a> and <a class="- topic/xref xref" href="GUID-71E6F246-9C3D-4750-9819-1A6928A386C5.html">MCC</a> plugin.</p>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">MCC Project Graph - TCP/IP TCP Server</strong></p>
<p class="- topic/p p">The following Project Graph shows the Harmony components included in the TCP/IP TCP Server
demo application.</p>
<figure class="- topic/fig fig fignone" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__FIG_KQG_YZ5_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__FIG_KQG_YZ5_HWB"><figcaption class="- topic/title title figcap"><span class="figtitleprefix fig--title-label">Figure 1-4. <span id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-AD4B98F8-CF07-42BE-88E5-0BA246BED24E" class="fig--title">Project Graph</span></span></figcaption>
<div class=""><img class="- topic/image image break break" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__IMAGE_RBZ_CQL_1YB" src="GUID-6C8C5483-4FCE-4355-A350-4B477F6B3D12-low.png" width="600"/></div>
</figure>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">FreeRTOS</strong> component is required for RTOS application. For bare-metal (non-RTOS)
<strong class="+ topic/ph hi-d/b ph b">FreeRTOS</strong> component should not be selected.</p>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">NOTE</strong> - The above diagram contains <strong class="+ topic/ph hi-d/b ph b">FreeRTOS</strong> component and that is required for
RTOS application. For bare-metal(non-RTOS) <strong class="+ topic/ph hi-d/b ph b">FreeRTOS</strong> component shouldn't be
selected.</p>
<p class="- topic/p p"> </p>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">TCP/IP Configuration - TCP/IP TCP Server</strong></p>
<p class="- topic/p p">The TCP/IP modules enabled for the demo is shown in the <strong class="+ topic/ph hi-d/b ph b">TCP/IP Configuration</strong>
Overview </p>
<p class="- topic/p p">More details of TCP/IP Configuration plugin is available <a class="- topic/xref xref" href="https://microchip-mplab-harmony.github.io/net/GUID-C2EA1D23-D9AF-49CB-85C6-1A4206586850.html" target="_blank" rel="external noopener">here</a></p>
<figure class="- topic/fig fig fignone" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__FIG_LNT_XCV_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__FIG_LNT_XCV_HWB"><figcaption class="- topic/title title figcap"><span class="figtitleprefix fig--title-label">Figure 1-5. <span id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-13343AE2-DC34-4987-9C06-E110D17B6242" class="fig--title">TCP/IP Configuration </span></span></figcaption>
<div class=""><img class="- topic/image image break break" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__IMAGE_Q5H_1TL_1YB" src="GUID-2EA11443-0860-4FE5-A3D7-9FB6FCF8CDFE-low.png" width="600"/></div>
</figure>
<p class="- topic/p p">The Application Layer modules enabled in the demo are as follows:</p>
<ul class="- topic/ul ul" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__OL_KYP_4GV_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__OL_KYP_4GV_HWB">
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-3DAB51AB-6BAF-436C-B66C-51EEBDB33120" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-3DAB51AB-6BAF-436C-B66C-51EEBDB33120"><strong class="+ topic/ph hi-d/b ph b">Application Layer Modules</strong><ul class="- topic/ul ul" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__UL_NF2_55C_3WB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__UL_NF2_55C_3WB">
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-E3C33BE3-E02E-4E6A-AA8A-1210827BDC77" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-E3C33BE3-E02E-4E6A-AA8A-1210827BDC77"><strong class="+ topic/ph hi-d/b ph b"><em class="+ topic/ph hi-d/i ph i">DHCP Client</em></strong> to discover
the IPv4 address from the nearest DHCP Server.</li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-6DB140CF-830F-4915-9244-F2F39CA5B3FA" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-6DB140CF-830F-4915-9244-F2F39CA5B3FA"><em class="+ topic/ph hi-d/i ph i"><strong class="+ topic/ph hi-d/b ph b">DNS Client </strong></em>provides DNS
resolution capabilities to the stack. </li>
</ul></li>
</ul>
</section>
<section class="- topic/section section" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KVV_V3V_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KVV_V3V_HWB"><h2 class="- topic/title title sectiontitle">Downloading and Building the
application</h2>
<p class="- topic/p p">To clone or download this application from Github, go to the <a class="- topic/xref xref" href="https://github.com/Microchip-MPLAB-Harmony/net_apps_pic32ck_sg_gc" target="_blank" rel="external noopener">main page of this repository</a> and then click Clone button to clone
this repository or download as zip file. </p>
<p class="- topic/p p">This content can also be downloaded using content manager by following these <a class="- topic/xref xref" href="https://github.com/Microchip-MPLAB-Harmony/contentmanager/wiki" target="_blank" rel="external noopener">instructions</a>.</p>
<p class="- topic/p p">Path of the application within the repository is <strong class="+ topic/ph hi-d/b ph b">apps\tcpip_tcp_server\firmware</strong>
</p>
<p class="- topic/p p">To build the application, refer to the following list of demo configurations and open the
project using MPLAB X IDE.</p>
<div class="table-container"><table class="- topic/table table frame-all" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB" data-cols="4"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label"><span class="table--title-label">Table 1-3. </span></span><span class="table--title" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-C881DC36-49B7-493A-9FFF-2260658092EF">Demo Configurations</span></caption><colgroup><col style="width:25.047438330170777%"/><col style="width:18.975332068311193%"/><col style="width:24.288425047438327%"/><col style="width:31.68880455407969%"/></colgroup><thead class="- topic/thead thead">
<tr class="- topic/row">
<th class="- topic/entry entry colsep-1 rowsep-1" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__1">Project Name</th>
<th class="- topic/entry entry align-center colsep-1 rowsep-1" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__2">Target Device</th>
<th class="- topic/entry entry align-center colsep-1 rowsep-1" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__3">Development Board</th>
<th class="- topic/entry entry align-center colsep-0 rowsep-1" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__4">Description</th>
</tr>
</thead><tbody class="- topic/tbody tbody">
<tr class="- topic/row">
<td class="- topic/entry entry align-center colsep-1 rowsep-1" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__1">pic32ck_gc01_cult.X</td>
<td class="- topic/entry entry align-center colsep-1 rowsep-1" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__2">PIC32CK2051GC01144</td>
<td class="- topic/entry entry align-center colsep-1 rowsep-1" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__3">PIC32CK GC01 Curiosity Ultra</td>
<td class="- topic/entry entry align-center colsep-0 rowsep-1" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__4">TCP/IP TCP Server with KSZ8091 Ethernet PHY - Bare Metal</td>
</tr>
<tr class="- topic/row">
<td class="- topic/entry entry align-center colsep-1 rowsep-0" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__1">pic32ck_gc01_cult_freertos.X</td>
<td class="- topic/entry entry align-center colsep-1 rowsep-0" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__2">PIC32CK2051GC01144</td>
<td class="- topic/entry entry align-center colsep-1 rowsep-0" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__3">PIC32CK GC01 Curiosity Ultra</td>
<td class="- topic/entry entry align-center colsep-0 rowsep-0" headers="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__TABLE_YZW_QJV_HWB__entry__4">TCP/IP TCP Server with KSZ8091 Ethernet PHY - FreeRTOS</td>
</tr>
</tbody></table></div>
</section>
<section class="- topic/section section" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KDY_QVM_1YB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KDY_QVM_1YB"><h2 class="- topic/title title sectiontitle">Hardware Setup</h2>
<p class="- topic/p p">The target board for running the application is <a class="- topic/xref xref" href="https://www.microchip.com/en-us/development-tool/EA23J82A" target="_blank" rel="external noopener">PIC32CK GC01 Curiosity Ultra</a>. </p>
<p class="- topic/p p">This section provides essential hardware configuration of this target board to run TCP/IP
applications.</p>
<figure class="- topic/fig fig fignone" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e30" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e30"><figcaption class="- topic/title title figcap"><span class="figtitleprefix fig--title-label">Figure 1-6. <span id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e32" class="fig--title"><strong class="+ topic/ph hi-d/b ph b">PIC32CK GC01 Curiosity Ultra
Development Board</strong><div class=""><img class="- topic/image image break break" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e35" src="GUID-FAC51868-85A7-42AC-A93A-B2BBFABE494D-low.png"/></div></span></span></figcaption>
</figure>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">Board Setup</strong></p>
<p class="- topic/p p">To set up the hardware, refer to the section <em class="+ topic/ph hi-d/i ph i">Board Setup</em> in <a class="- topic/xref xref" href="https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/UserGuides/PIC32CK-SG01-GC01-Curiosity-Ultra-User-Guide-DS70005529.pdf" target="_blank" rel="external noopener">PIC32CK GC01 Curiosity Ultra User Guide</a>.</p>
<ul class="- topic/ul ul" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e52" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e52">
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e54" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e54">Connect the micro USB cable from the
computer to the DEBUG USB connector on the PIC32CK GC01 Curiosity Ultra Development
Board.</li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e57" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__d40e57">Establish a connection between the
router/switch with the PIC32CK GC01 Curiosity Ultra Development Board through the RJ45
connector.</li>
</ul>
</section>
<section class="- topic/section section" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_CG1_RPV_HWB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_CG1_RPV_HWB"><h2 class="- topic/title title sectiontitle">Running the Application</h2>
<ol class="- topic/ol ol" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__OL_BMJ_RRG_3WB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__OL_BMJ_RRG_3WB">
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-69E61730-4007-4CA9-802B-B1974C5512A5" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-69E61730-4007-4CA9-802B-B1974C5512A5">Open a terminal application on the host
computer (like Hyper-terminal or Tera Term). </li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-64610B04-0779-4BC5-B09E-25435256405D" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-64610B04-0779-4BC5-B09E-25435256405D">Configure the terminal application for
serial port connected to USB debug port of the board.</li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-8A5A7EBE-112F-4F05-8412-00D1B236A158" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-8A5A7EBE-112F-4F05-8412-00D1B236A158">Set baud rate as 115200 in the terminal
application.</li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-5F3B7DB1-E4F5-487E-85DA-9028498608E0" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-5F3B7DB1-E4F5-487E-85DA-9028498608E0">Build and download the application
project on the target board.</li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-E01BBAA4-174C-442F-B6EF-1871FAAEF515" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-E01BBAA4-174C-442F-B6EF-1871FAAEF515">Verify the TCP/IP Stack initialization
console messages.</li>
</ol>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">Console Start up</strong></p>
<div class=""><img class="- topic/image image break break" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__IMAGE_AN5_XRG_3WB" src="GUID-0A2CBC55-AB01-4129-A68D-FA7479E1319B-low.png"/></div>
<p class="- topic/p p"><em class="+ topic/ph hi-d/i ph i">If DHCP client is enabled in the demonstration, wait for the DHCP server to assign an IP
address for the development board. </em></p>
<p class="- topic/p p"><em class="+ topic/ph hi-d/i ph i">This will be printed on the console. Otherwise, the default static IP address will be
assigned to the board.</em></p>
<p class="- topic/p p">By entering the command <em class="+ topic/ph hi-d/i ph i">netinfo</em>, the response is obtained as shown above.</p>
<p class="- topic/p p"><strong class="+ topic/ph hi-d/b ph b">TCP Server Test</strong></p>
<p class="- topic/p p">For TCP Server test, a TCP Client application is required to run on the host computer
(<em class="+ topic/ph hi-d/i ph i">SocketTest</em>, <em class="+ topic/ph hi-d/i ph i">PacketSender</em> etc). </p>
<p class="- topic/p p">In this demonstration, we use <em class="+ topic/ph hi-d/i ph i">SocketTest</em> utility.</p>
<ul class="- topic/ul ul" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__UL_ENB_GXV_3WB" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__UL_ENB_GXV_3WB">
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-72A514F6-6C1D-488B-8C56-F62D2D53EE12" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-72A514F6-6C1D-488B-8C56-F62D2D53EE12">Send a TCP packet to the IP address of
the hardware board, port 9760, from TCP Client application (<em class="+ topic/ph hi-d/i ph i">SocketTest</em>) running on
the computer. See the following screenshot of test .<div class=""><img class="- topic/image image break break" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__IMAGE_AZZ_HJ5_JWB" src="GUID-BCC5BDC8-4AE3-4501-847E-BC5BFFFF378E-low.png" height="352" width="453"/></div></li>
<li class="- topic/li li" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-FA65F23C-5EEF-4103-947E-4C30E91678EC" data-ofbid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__GUID-FA65F23C-5EEF-4103-947E-4C30E91678EC">The TCP Server running on the hardware
board will echo back the message it receives. See the console screenshot of test
below.<div class=""><img class="- topic/image image break break" id="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__IMAGE_CQ4_YM2_JWB" src="GUID-AE9A9802-8518-4948-9817-A46A7D634D73-low.png" height="244" width="590"/></div></li>
</ul>
</section>
</div>
</article></main></div>
</div>
<nav role="navigation" id="wh_topic_toc" aria-label="On this page" class="col-lg-2 d-none d-lg-block navbar d-print-none">
<div id="wh_topic_toc_content">
<div class=" wh_topic_toc "><div class="wh_topic_label">On this page</div><ul><li class="section-item"><div class="section-title"><a href="#GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KL1_1Y5_HWB" data-tocid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KL1_1Y5_HWB">Description</a></div></li><li class="section-item"><div class="section-title"><a href="#GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KVV_V3V_HWB" data-tocid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KVV_V3V_HWB">Downloading and Building the
application</a></div></li><li class="section-item"><div class="section-title"><a href="#GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KDY_QVM_1YB" data-tocid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_KDY_QVM_1YB">Hardware Setup</a></div></li><li class="section-item"><div class="section-title"><a href="#GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_CG1_RPV_HWB" data-tocid="GUID-40D6A3FC-93DB-4291-8C99-8F27EB930E6C__SECTION_CG1_RPV_HWB">Running the Application</a></div></li></ul></div>
</div>
</nav>
</div>
</div>
</div>
<div class="mchp_disclaimer"><p class="mchp_disclaimer_text">The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.</p></div><footer class="navbar navbar-default wh_footer">
<div class=" footer-container mx-auto ">
<div class="footer">
<div class="mchp-wh-footer">
<div class="mchp-footer">
<div class="mchp-footer-tier1">
<div class="spacer"></div>
<div class="mchp-footer-container">
<div class="mchp-footer-links mchp-social-media-links">
<div class="mchp-component-items">
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://www.facebook.com/pages/Microchip-Technology-Inc/20320981741" target="_blank">
<img class="cmp-image__image" alt="Microchip Facebook" src="oxygen-webhelp/template/resources/images/201016-corp-facebook.png"/>
</a>
</div>
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://www.linkedin.com/company/microchip-technology" target="_blank">
<img class="cmp-image__image" alt="Microchip LinkedIn" src="oxygen-webhelp/template/resources/images/201016-corp-linkedin.png"/>
</a>
</div>
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://twitter.com/MicrochipTech" target="_blank">
<img class="cmp-image__image" alt="Microchip Twitter" src="oxygen-webhelp/template/resources/images/201016-corp-twitter.png"/>
</a>
</div>
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://www.youtube.com/user/MicrochipTechnology" target="_blank">
<img class="cmp-image__image" alt="Microchip YouTube" src="oxygen-webhelp/template/resources/images/201016-corp-youtube.png"/>
</a>
</div>
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://www.instagram.com/microchiptechnologyinc/" target="_blank">
<img class="cmp-image__image" alt="Microchip Instagram" src="oxygen-webhelp/template/resources/images/201016-corp-instagram.png"/>
</a>
</div>
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://www.weibo.com/microchiptech" target="_blank">
<img class="cmp-image__image" alt="Microchip Weibo" src="oxygen-webhelp/template/resources/images/201016-corp-weibo.png"/>
</a>
</div>
<div class="mchp-component-item">
<a class="cmp-image__link" href="https://www.microchip.com/en-us/about/blog" target="_blank">
<img class="cmp-image__image" alt="Microchip Blog" src="oxygen-webhelp/template/resources/images/201016-corp-blog.png"/>
</a>
</div>
</div>
</div>
<div class="mchp-footer-links">
<div class="mchp-component-items">
<div class="mchp-component-item">
<div class="link">
<a href="https://www.microchip.com/about-us/contact-us" class="mchp-link__link">Contact</a>
<span class="mchp-link__separator">|</span>
</div>
</div>
<div class="mchp-component-item ">
<div class="link">
<a href="https://www.microchip.com/en-us/about/legal-information" class="mchp-link__link">Legal</a>
<span class="mchp-link__separator">|</span>
</div>
</div>
<div class="mchp-component-item ">
<div class="link">
<a href="https://www.microchip.com/en-us/about/legal-information/privacy-policy" class="mchp-link__link">Privacy Policy</a>
<span class="mchp-link__separator">|</span>
</div>
</div>
<div class="mchp-component-item ">
<div class="link">
<a href="https://www.microchip.com/en-us/about/legal-information/microchip-cookie-statement" class="mchp-link__link">Cookies</a>
<span class="mchp-link__separator">|</span>
</div>
</div>
<div class="mchp-component-item">
<div class="link">
<a href="https://careers.microchip.com/" class="mchp-link__link">Careers</a>
<span class="mchp-link__separator"></span>
</div>
</div>
</div>
</div>
<div class="mchp-footer-newsletter">
<div class="cmp-text">
<p>Stay on the leading edge with our blog</p>
</div>
<div class="mchp-button-wrapper">
<a role="button" href="https://www.microchip.com/en-us/about/blog" class="mchp-button mchp-button-regular solid">
<span class="mchp-button__span">MicroSolutions</span>
</a>
</div>
</div>
</div>
<div class="graphic">
<img src="oxygen-webhelp/template/resources/images/footer-graphic.png"/>
</div>
</div>
<div class="mchp-footer-tier2">
<p class="mchp-copyright">© Copyright 1998-2022 Microchip Technology Inc. All rights reserved.</p>
</div>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="true" src="https://www.googletagmanager.com/gtag/js?id=UA-2724382-19"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-2724382-19');
</script>
</div>
</div>
</footer>
<div id="go2top" class="d-print-none">
<span class="oxy-icon oxy-icon-up"></span>
</div>
<div id="modal_img_large" class="modal">
<span class="close oxy-icon oxy-icon-remove"></span>
<div id="modal_img_container"></div>
<div id="caption"></div>
</div>
</body>
</html>