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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>WiFi Management</title>
<title>CMSIS-Driver: WiFi Management</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-Driver
 <span id="projectnumber">Version 2.7.1</span>
</div>
<div id="projectbrief">Peripheral Interface for Middleware and Application Code</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Usage and Description</span></a></li>
<li><a href="modules.html"><span>Reference</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__wifi__management__gr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#groups">Content</a> |
<a href="#nested-classes">Data Structures</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">WiFi Management<div class="ingroups"><a class="el" href="group__wifi__interface__gr.html">WiFi Interface</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Configure and manage the connection to a WiFi access point (AP) or configure and manage the access point (AP).
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Content</h2></td></tr>
<tr class="memitem:group__WiFi__option"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__WiFi__option.html">WiFi Option Codes</a></td></tr>
<tr class="memdesc:group__WiFi__option"><td class="mdescLeft"> </td><td class="mdescRight">WiFi Option Codes for <a class="el" href="group__wifi__management__gr.html#gaf38a7aeb470eec596febc850c8b69ccf">ARM_WIFI_SetOption</a> or <a class="el" href="group__wifi__management__gr.html#ga56910984e5068f6502e12f72e1f80edf">ARM_WIFI_GetOption</a> function. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__wifi__sec__type"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__sec__type.html">WiFi Security Type</a></td></tr>
<tr class="memdesc:group__wifi__sec__type"><td class="mdescLeft"> </td><td class="mdescRight">Specifies WiFi security type for <a class="el" href="group__wifi__management__gr.html#ga7d545744a848702d75043de30ea5260a">ARM_WIFI_Activate</a>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__wifi__wps__method"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__wps__method.html">WiFi Protected Setup (WPS) Method</a></td></tr>
<tr class="memdesc:group__wifi__wps__method"><td class="mdescLeft"> </td><td class="mdescRight">Specifies WiFi WPS method for <a class="el" href="group__wifi__management__gr.html#ga7d545744a848702d75043de30ea5260a">ARM_WIFI_Activate</a>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__wifi__dhcp__v6__mode"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__dhcp__v6__mode.html">WiFi DHCPv6 Mode</a></td></tr>
<tr class="memdesc:group__wifi__dhcp__v6__mode"><td class="mdescLeft"> </td><td class="mdescRight">Specifies IPv6 Dynamic Host Configuration Protocol (DHCP) Mode. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structARM__WIFI__CONFIG__t"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">ARM_WIFI_CONFIG_t</a></td></tr>
<tr class="memdesc:structARM__WIFI__CONFIG__t"><td class="mdescLeft"> </td><td class="mdescRight">WiFi Configuration. <a href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">More...</a><br/></td></tr>
<tr class="separator:structARM__WIFI__CONFIG__t"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:structARM__WIFI__SCAN__INFO__t"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t">ARM_WIFI_SCAN_INFO_t</a></td></tr>
<tr class="memdesc:structARM__WIFI__SCAN__INFO__t"><td class="mdescLeft"> </td><td class="mdescRight">WiFi Scan Information. <a href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t">More...</a><br/></td></tr>
<tr class="separator:structARM__WIFI__SCAN__INFO__t"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:structARM__WIFI__NET__INFO__t"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#structARM__WIFI__NET__INFO__t">ARM_WIFI_NET_INFO_t</a></td></tr>
<tr class="memdesc:structARM__WIFI__NET__INFO__t"><td class="mdescLeft"> </td><td class="mdescRight">WiFi Network Information. <a href="group__wifi__management__gr.html#structARM__WIFI__NET__INFO__t">More...</a><br/></td></tr>
<tr class="separator:structARM__WIFI__NET__INFO__t"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf38a7aeb470eec596febc850c8b69ccf"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#gaf38a7aeb470eec596febc850c8b69ccf">ARM_WIFI_SetOption</a> (uint32_t interface, uint32_t option, const void *data, uint32_t len)</td></tr>
<tr class="memdesc:gaf38a7aeb470eec596febc850c8b69ccf"><td class="mdescLeft"> </td><td class="mdescRight">Set WiFi Module Options. <a href="#gaf38a7aeb470eec596febc850c8b69ccf">More...</a><br/></td></tr>
<tr class="separator:gaf38a7aeb470eec596febc850c8b69ccf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga56910984e5068f6502e12f72e1f80edf"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#ga56910984e5068f6502e12f72e1f80edf">ARM_WIFI_GetOption</a> (uint32_t interface, uint32_t option, void *data, uint32_t *len)</td></tr>
<tr class="memdesc:ga56910984e5068f6502e12f72e1f80edf"><td class="mdescLeft"> </td><td class="mdescRight">Get WiFi Module Options. <a href="#ga56910984e5068f6502e12f72e1f80edf">More...</a><br/></td></tr>
<tr class="separator:ga56910984e5068f6502e12f72e1f80edf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga856972af36e51cf0c4112029332d529f"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#ga856972af36e51cf0c4112029332d529f">ARM_WIFI_Scan</a> (<a class="el" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t">ARM_WIFI_SCAN_INFO_t</a> scan_info[], uint32_t max_num)</td></tr>
<tr class="memdesc:ga856972af36e51cf0c4112029332d529f"><td class="mdescLeft"> </td><td class="mdescRight">Scan for available networks in range. <a href="#ga856972af36e51cf0c4112029332d529f">More...</a><br/></td></tr>
<tr class="separator:ga856972af36e51cf0c4112029332d529f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7d545744a848702d75043de30ea5260a"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#ga7d545744a848702d75043de30ea5260a">ARM_WIFI_Activate</a> (uint32_t interface, <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">ARM_WIFI_CONFIG_t</a> *config)</td></tr>
<tr class="memdesc:ga7d545744a848702d75043de30ea5260a"><td class="mdescLeft"> </td><td class="mdescRight">Activate interface (Connect to a wireless network or activate an access point). <a href="#ga7d545744a848702d75043de30ea5260a">More...</a><br/></td></tr>
<tr class="separator:ga7d545744a848702d75043de30ea5260a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1842127df60067481ac2f40d19153e3e"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#ga1842127df60067481ac2f40d19153e3e">ARM_WIFI_Deactivate</a> (uint32_t interface)</td></tr>
<tr class="memdesc:ga1842127df60067481ac2f40d19153e3e"><td class="mdescLeft"> </td><td class="mdescRight">Deactivate interface (Disconnect from a wireless network or deactivate an access point). <a href="#ga1842127df60067481ac2f40d19153e3e">More...</a><br/></td></tr>
<tr class="separator:ga1842127df60067481ac2f40d19153e3e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3d641222defb5f52f6dae4ce1d540d0f"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#ga3d641222defb5f52f6dae4ce1d540d0f">ARM_WIFI_IsConnected</a> (void)</td></tr>
<tr class="memdesc:ga3d641222defb5f52f6dae4ce1d540d0f"><td class="mdescLeft"> </td><td class="mdescRight">Get station connection status. <a href="#ga3d641222defb5f52f6dae4ce1d540d0f">More...</a><br/></td></tr>
<tr class="separator:ga3d641222defb5f52f6dae4ce1d540d0f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga29a5b0072470a8c56f0939f3c97ed08e"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wifi__management__gr.html#ga29a5b0072470a8c56f0939f3c97ed08e">ARM_WIFI_GetNetInfo</a> (<a class="el" href="group__wifi__management__gr.html#structARM__WIFI__NET__INFO__t">ARM_WIFI_NET_INFO_t</a> *net_info)</td></tr>
<tr class="memdesc:ga29a5b0072470a8c56f0939f3c97ed08e"><td class="mdescLeft"> </td><td class="mdescRight">Get station Network Information. <a href="#ga29a5b0072470a8c56f0939f3c97ed08e">More...</a><br/></td></tr>
<tr class="separator:ga29a5b0072470a8c56f0939f3c97ed08e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Configure and manage the connection to a WiFi access point (AP) or configure and manage the access point (AP). </p>
<p>The <a class="el" href="group__wifi__management__gr.html">WiFi Management</a> functions are used to configure and manage the connection to a WiFi access point (AP) also called hotspot when in station mode. They are also used to configure and manage the access point (AP) itself when in access point mode. </p>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structARM__WIFI__CONFIG__t" id="structARM__WIFI__CONFIG__t"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ARM_WIFI_CONFIG_t</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>WiFi Configuration. </p>
<p>Provides information needed to connect to the WiFi network for station or how to configure the access point (AP).</p>
<p><b>Used in:</b></p>
<ul>
<li><a class="el" href="group__wifi__management__gr.html#ga7d545744a848702d75043de30ea5260a">ARM_WIFI_Activate</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a587ba0cb07f02913598610049a3bbb79"></a>const char *</td>
<td class="fieldname">
ssid</td>
<td class="fielddoc">
Pointer to Service Set Identifier (SSID) null-terminated string. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a3bef28806edf8f4c8cb82584b7e8c3cb"></a>const char *</td>
<td class="fieldname">
pass</td>
<td class="fielddoc">
Pointer to Password null-terminated string. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a5cd97d88131cf38bcc75189f9569f9b7"></a>uint8_t</td>
<td class="fieldname">
security</td>
<td class="fielddoc">
Security type (ARM_WIFI_SECURITY_xxx) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="acbcf5f8de7895ca456bb39fbcccde1d1"></a>uint8_t</td>
<td class="fieldname">
ch</td>
<td class="fielddoc">
WiFi Channel (0 = auto, otherwise = exact channel) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="acb7bc06bed6f6408d719334fc41698c7"></a>uint8_t</td>
<td class="fieldname">
reserved</td>
<td class="fielddoc">
Reserved. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a5e263198499fb98f97d40a9b82579175"></a>uint8_t</td>
<td class="fieldname">
wps_method</td>
<td class="fielddoc">
WiFi Protected Setup (WPS) method (ARM_WIFI_WPS_METHOD_xxx) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2047d60666390ea4755ce22603969c4c"></a>const char *</td>
<td class="fieldname">
wps_pin</td>
<td class="fielddoc">
Pointer to WiFi Protected Setup (WPS) PIN null-terminated string. </td></tr>
</table>
</div>
</div>
<a name="structARM__WIFI__SCAN__INFO__t" id="structARM__WIFI__SCAN__INFO__t"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ARM_WIFI_SCAN_INFO_t</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>WiFi Scan Information. </p>
<p>Provides information about the wireless networks that were detected when searching for available WiFi networks. The structure contains the information needed to connect to the WiFi network. Of course, the access password is not included and must be provided separately.</p>
<p><b>Used in:</b></p>
<ul>
<li><a class="el" href="group__wifi__management__gr.html#ga856972af36e51cf0c4112029332d529f">ARM_WIFI_Scan</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae7eccb3e4df8625b86b5572fc16c37c3"></a>char</td>
<td class="fieldname">
ssid[32+1]</td>
<td class="fielddoc">
Service Set Identifier (SSID) null-terminated string. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a19c52baafe5797c359c5e0f5776499d7"></a>uint8_t</td>
<td class="fieldname">
bssid[6]</td>
<td class="fielddoc">
Basic Service Set Identifier (BSSID) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a5cd97d88131cf38bcc75189f9569f9b7"></a>uint8_t</td>
<td class="fieldname">
security</td>
<td class="fielddoc">
Security type (ARM_WIFI_SECURITY_xxx) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="acbcf5f8de7895ca456bb39fbcccde1d1"></a>uint8_t</td>
<td class="fieldname">
ch</td>
<td class="fielddoc">
WiFi Channel. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="afb67d818cd76cce8057affabcb1979a6"></a>uint8_t</td>
<td class="fieldname">
rssi</td>
<td class="fielddoc">
Received Signal Strength Indicator. </td></tr>
</table>
</div>
</div>
<a name="structARM__WIFI__NET__INFO__t" id="structARM__WIFI__NET__INFO__t"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ARM_WIFI_NET_INFO_t</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>WiFi Network Information. </p>
<p>Provides information about the network that the station is connected to.</p>
<p><b>Used in:</b></p>
<ul>
<li><a class="el" href="group__wifi__management__gr.html#ga29a5b0072470a8c56f0939f3c97ed08e">ARM_WIFI_GetNetInfo</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae7eccb3e4df8625b86b5572fc16c37c3"></a>char</td>
<td class="fieldname">
ssid[32+1]</td>
<td class="fielddoc">
Service Set Identifier (SSID) null-terminated string. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a97ae3ac37e362cf8e7e3a9e18b7c806f"></a>char</td>
<td class="fieldname">
pass[64+1]</td>
<td class="fielddoc">
Password null-terminated string. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a5cd97d88131cf38bcc75189f9569f9b7"></a>uint8_t</td>
<td class="fieldname">
security</td>
<td class="fielddoc">
Security type (ARM_WIFI_SECURITY_xxx) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="acbcf5f8de7895ca456bb39fbcccde1d1"></a>uint8_t</td>
<td class="fieldname">
ch</td>
<td class="fielddoc">
WiFi Channel. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="afb67d818cd76cce8057affabcb1979a6"></a>uint8_t</td>
<td class="fieldname">
rssi</td>
<td class="fielddoc">
Received Signal Strength Indicator. </td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf38a7aeb470eec596febc850c8b69ccf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t ARM_WIFI_SetOption </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>interface</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>option</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set WiFi Module Options. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">interface</td><td>Interface (0 = Station, 1 = Access Point) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">option</td><td>Option to set </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Pointer to data relevant to selected option </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of data (in bytes) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li><a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> : Operation successful</li>
<li><a class="el" href="group__execution__status.html#ga2f627075447749bb368d3b768be107cb">ARM_DRIVER_ERROR</a> : Operation failed</li>
<li><a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> : Operation not supported</li>
<li><a class="el" href="group__execution__status.html#gac781d4b70ce17c4c2efe2db045be751c">ARM_DRIVER_ERROR_PARAMETER</a> : Parameter error (invalid interface, NULL data pointer or len less than option specifies)</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_SetOption</b> sets the value of the specified option of the WiFi module.</p>
<p>The argument <em>interface</em> specifies the interface (0 = Station, 1 = Access Point).</p>
<p>The argument <em>option</em> specifies the option that is to be set (see below).</p>
<p>The argument <em>data</em> points to a buffer containing the value of the option to be set and must be aligned to the data type of the corresponding option.</p>
<p>The argument <em>len</em> specifies the length of the buffer <em>data</em> and must be equal (or higher) to the length of the corresponding option.</p>
<table class="doxtable">
<tr>
<th align="left">Option </th><th align="left">Description </th><th align="left">Data </th><th align="left">Type/Length </th></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gae84cbf48cd5168371621fc5f78aac0a4">ARM_WIFI_BSSID</a> </td><td align="left">BSSID of AP to connect or AP </td><td align="left">bssid </td><td align="left">uint8_t[6] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga1fbda584fe5750db6a04b1ed27730d95">ARM_WIFI_TX_POWER</a> </td><td align="left">Transmit power </td><td align="left">power[dbm] </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga77e38a3d5d2fe8c04aebaf8d24e1b8d4">ARM_WIFI_LP_TIMER</a> </td><td align="left">Low-power deep-sleep time </td><td align="left">time[seconds] </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga947c297f1364993524bf515beba296f1">ARM_WIFI_DTIM</a> </td><td align="left">DTIM interval </td><td align="left">dtim[beacons] </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga6171d24c661b54465ced2dae7980897c">ARM_WIFI_BEACON</a> </td><td align="left">Beacon interval </td><td align="left">interval[ms] </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gafefb0fe1e5cdfb71f7f8cc7606840865">ARM_WIFI_MAC</a> </td><td align="left">MAC address </td><td align="left">mac </td><td align="left">uint8_t[6] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga50ee1ca627ebe536cae0ab7155ed1d17">ARM_WIFI_IP</a> </td><td align="left">IPv4 address </td><td align="left">ip </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gac2603479ebad0ed05413e1e01b8a649f">ARM_WIFI_IP_SUBNET_MASK</a> </td><td align="left">IPv4 subnet mask </td><td align="left">mask </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gad0c719fedd39d738ee7f6fd3c7317169">ARM_WIFI_IP_GATEWAY</a> </td><td align="left">IPv4 gateway address </td><td align="left">ip </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga657f5c6c504defe04422dbe468c6c134">ARM_WIFI_IP_DNS1</a> </td><td align="left">IPv4 primary DNS server address </td><td align="left">ip </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga5a5fa4c298b16d0acd0a71f873802d31">ARM_WIFI_IP_DNS2</a> </td><td align="left">IPv4 secondary DNS server address </td><td align="left">ip </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gad37e95b697872782973057ae94c085a9">ARM_WIFI_IP_DHCP</a> </td><td align="left">IPv4 DHCP client/server enable/disable </td><td align="left">dhcp (0, 1) </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga10065d0d9cb7530e0747be83ba9e4c35">ARM_WIFI_IP_DHCP_POOL_BEGIN</a> </td><td align="left">IPv4 DHCP server begin address </td><td align="left">ip </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga4054f0e4045a25928531be73fb9d6b45">ARM_WIFI_IP_DHCP_POOL_END</a> </td><td align="left">IPv4 DHCP server end address </td><td align="left">ip </td><td align="left">uint8_t[4] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga78ec2d08d4f1d3ce486b40a329bd8713">ARM_WIFI_IP_DHCP_LEASE_TIME</a> </td><td align="left">IPv4 DHCP server lease time </td><td align="left">time[seconds] </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gaeac3fc297297b9bf5f2b5cf84788d77f">ARM_WIFI_IP6_GLOBAL</a> </td><td align="left">IPv6 global address </td><td align="left">ip6 </td><td align="left">uint8_t[16] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga11fdcc3403a43187158434a87fdfb83c">ARM_WIFI_IP6_LINK_LOCAL</a> </td><td align="left">IPv6 link-local address </td><td align="left">ip6 </td><td align="left">uint8_t[16] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga545cb7e1da8715966bee7c7ff9d427d8">ARM_WIFI_IP6_SUBNET_PREFIX_LEN</a> </td><td align="left">IPv6 subnet prefix length </td><td align="left">len (1..127) </td><td align="left">uint32_t </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga218d49572adcac8d678f7a8ae2f0c67e">ARM_WIFI_IP6_GATEWAY</a> </td><td align="left">IPv6 gateway address </td><td align="left">ip6 </td><td align="left">uint8_t[16] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#gaeb86e25e3b7c6360c977b05b40ff7676">ARM_WIFI_IP6_DNS1</a> </td><td align="left">IPv6 primary DNS server address </td><td align="left">ip6 </td><td align="left">uint8_t[16] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga24dee294436d575b47c7a314cba1654d">ARM_WIFI_IP6_DNS2</a> </td><td align="left">IPv6 secondary DNS server address </td><td align="left">ip6 </td><td align="left">uint8_t[16] </td></tr>
<tr>
<td align="left"><a class="el" href="group__WiFi__option.html#ga6b864e923870ec473ee0c876d1a3b032">ARM_WIFI_IP6_DHCP_MODE</a> </td><td align="left">IPv6 DHCP client mode </td><td align="left">mode </td><td align="left">uint32_t </td></tr>
</table>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">uint8_t ip[4];</div>
<div class="line"> </div>
<div class="line">ip[0] = 192U;</div>
<div class="line">ip[1] = 168U;</div>
<div class="line">ip[2] = 0U;</div>
<div class="line">ip[3] = 1U;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set IP static address of the Station</span></div>
<div class="line">wifi-><a class="code" href="group__wifi__interface__gr.html#a6b5e1c7fcea96ff13f6fd16d57c8b68f">SetOption</a> (0U, <a class="code" href="group__WiFi__option.html#ga50ee1ca627ebe536cae0ab7155ed1d17">ARM_WIFI_IP</a>, &ip, <span class="keyword">sizeof</span>(ip));</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ga56910984e5068f6502e12f72e1f80edf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t ARM_WIFI_GetOption </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>interface</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>option</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t * </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get WiFi Module Options. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">interface</td><td>Interface (0 = Station, 1 = Access Point) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">option</td><td>Option to get </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Pointer to memory where data for selected option will be returned </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">len</td><td>Pointer to length of data (input/output)<ul>
<li>input: maximum length of data that can be returned (in bytes)</li>
<li>output: length of returned data (in bytes) </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li><a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> : Operation successful</li>
<li><a class="el" href="group__execution__status.html#ga2f627075447749bb368d3b768be107cb">ARM_DRIVER_ERROR</a> : Operation failed</li>
<li><a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> : Operation not supported</li>
<li><a class="el" href="group__execution__status.html#gac781d4b70ce17c4c2efe2db045be751c">ARM_DRIVER_ERROR_PARAMETER</a> : Parameter error (invalid interface, NULL data or len pointer, or *len less than option specifies)</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_GetOption</b> retrieves the current value of the specified option of the WiFi module.</p>
<p>The argument <em>interface</em> specifies the interface (0 = Station, 1 = Access Point).</p>
<p>The argument <em>option</em> specifies the option that is to be retrieved (see <a class="el" href="group__wifi__management__gr.html#gaf38a7aeb470eec596febc850c8b69ccf">ARM_WIFI_SetOption</a>).</p>
<p>The argument <em>data</em> points to a buffer that will be used to store the value of the <em>option</em> and must be aligned to the data type of the corresponding option.</p>
<p>The argument <em>len</em> is a pointer to the length of the buffer at input and returns the length of the option information on the output.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">uint8_t ip[4]; <span class="comment">// IP address</span></div>
<div class="line">uint8_t mask[4]; <span class="comment">// Subnet mask</span></div>
<div class="line">uint8_t gateway[4]; <span class="comment">// Gateway address</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Get IP address, Subnet mask and Gateway address of the Station</span></div>
<div class="line">wifi-><a class="code" href="group__wifi__interface__gr.html#af264a580d36c33a649b64be845458b03">GetOption</a> (0U, <a class="code" href="group__WiFi__option.html#ga50ee1ca627ebe536cae0ab7155ed1d17">ARM_WIFI_IP</a>, &ip, <span class="keyword">sizeof</span>(ip));</div>
<div class="line">wifi-><a class="code" href="group__wifi__interface__gr.html#af264a580d36c33a649b64be845458b03">GetOption</a> (0U, <a class="code" href="group__WiFi__option.html#gac2603479ebad0ed05413e1e01b8a649f">ARM_WIFI_IP_SUBNET_MASK</a>, &mask, <span class="keyword">sizeof</span>(mask));</div>
<div class="line">wifi-><a class="code" href="group__wifi__interface__gr.html#af264a580d36c33a649b64be845458b03">GetOption</a> (0U, <a class="code" href="group__WiFi__option.html#gad0c719fedd39d738ee7f6fd3c7317169">ARM_WIFI_IP_GATEWAY</a>, &gateway, <span class="keyword">sizeof</span>(gateway));</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ga856972af36e51cf0c4112029332d529f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t ARM_WIFI_Scan </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t">ARM_WIFI_SCAN_INFO_t</a> </td>
<td class="paramname"><em>scan_info</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>max_num</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Scan for available networks in range. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">scan_info</td><td>Pointer to array of <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t" title="WiFi Scan Information. ">ARM_WIFI_SCAN_INFO_t</a> structures where available Scan Information will be returned </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">max_num</td><td>Maximum number of Network Information structures to return </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t" title="WiFi Scan Information. ">ARM_WIFI_SCAN_INFO_t</a> structures returned or error code<ul>
<li>value >= 0 : Number of <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t" title="WiFi Scan Information. ">ARM_WIFI_SCAN_INFO_t</a> structures returned</li>
<li><a class="el" href="group__execution__status.html#ga2f627075447749bb368d3b768be107cb">ARM_DRIVER_ERROR</a> : Operation failed</li>
<li><a class="el" href="group__execution__status.html#gac781d4b70ce17c4c2efe2db045be751c">ARM_DRIVER_ERROR_PARAMETER</a> : Parameter error (NULL scan_info pointer or max_num equal to 0)</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_Scan</b> searches for available WiFi networks. Using this function, you can determine which wireless networks are available for the connection. If the network is secured, you must also know the password to connect.</p>
<p>The argument <em>scan_info</em> is a pointer to an array of network information structures, where the available network information will be returned.</p>
<p>The argument <em>max_num</em> specifies maximum number of network information structures, that can be stored to the <em>scan_info</em>.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line"><a class="code" href="group__wifi__management__gr.html#structARM__WIFI__SCAN__INFO__t">ARM_WIFI_SCAN_INFO_t</a> scan_info[8];</div>
<div class="line"> </div>
<div class="line">num = wifi-><a class="code" href="group__wifi__interface__gr.html#a51d027ef7046c413372103aa952772fb">Scan</a> (scan_info, 8U);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Print SSIDs of available WiFi networks</span></div>
<div class="line"><span class="keywordflow">for</span> (i = 0; i < num; i++) {</div>
<div class="line"> printf (<span class="stringliteral">"%d. ssid=%s\n"</span>, i, scan_info[i].ssid);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ga7d545744a848702d75043de30ea5260a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t ARM_WIFI_Activate </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>interface</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">ARM_WIFI_CONFIG_t</a> * </td>
<td class="paramname"><em>config</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Activate interface (Connect to a wireless network or activate an access point). </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">interface</td><td>Interface (0 = Station, 1 = Access Point) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">config</td><td>Pointer to <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t" title="WiFi Configuration. ">ARM_WIFI_CONFIG_t</a> structure where Configuration parameters are located </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li><a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> : Operation successful</li>
<li><a class="el" href="group__execution__status.html#ga2f627075447749bb368d3b768be107cb">ARM_DRIVER_ERROR</a> : Operation failed</li>
<li><a class="el" href="group__execution__status.html#ga0bac892205bb2d586b822e8b178ab310">ARM_DRIVER_ERROR_TIMEOUT</a> : Timeout occurred</li>
<li><a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> : Operation not supported (security type, channel autodetect or WPS not supported)</li>
<li><a class="el" href="group__execution__status.html#gac781d4b70ce17c4c2efe2db045be751c">ARM_DRIVER_ERROR_PARAMETER</a> : Parameter error (invalid interface, NULL config pointer or invalid configuration)</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_Activate</b> activates the specified interface.</p>
<p>The argument <em>interface</em> specifies the interface (0 = Station, 1 = Access Point).</p>
<p>When station interface is specified, the WiFi module connects to a wireless network.</p>
<p>The wireless network trying to connect to must be available, otherwise the operation will fail after a timeout.</p>
<p>Available wireless networks can be scanned by using the function <a class="el" href="group__wifi__management__gr.html#ga856972af36e51cf0c4112029332d529f">ARM_WIFI_Scan</a>.</p>
<p>When access point interface is specified, the WiFi module creates a wireless network by activating the access point.</p>
<p>The argument <em>config</em> is a pointer to the configuration <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">ARM_WIFI_CONFIG_t</a> which provides information needed to connect to a WiFi network for station interface or information used to configure the access point (AP) for access point interface.</p>
<p><em>ssid</em> specifies the name of the network to connect to or the network to create.</p>
<p><em>pass</em> specifies the password for accessing the wireless network.</p>
<p><em>security</em> specifies the security type which will be used for the connection.</p>
<p><em>ch</em> specifies the WiFi channel which will be used for the connection. Valid channels for 2.4 GHz frequency are from <span class="XML-Token">1</span> to <span class="XML-Token">13</span>. If the value for <em>ch</em> = <span class="XML-Token">0</span>, the system automatically selects the channel. For station interface the channel of the AP being connected to is used. For access point interface the module automatically selects the best channel for the WiFi connection.</p>
<dl class="section note"><dt>Note</dt><dd>Optionally BSSID parameter can be also set using <a class="el" href="group__wifi__management__gr.html#gaf38a7aeb470eec596febc850c8b69ccf">ARM_WIFI_SetOption</a>. It allows connection to specific BSSID when connecting to an access point or specifies the BSSID of the access point.</dd></dl>
<p><em>wps_method</em> specifies if WiFi Protected Setup (WPS) is used and which method.</p>
<p><em>wps_pin</em> specifies the PIN used with WPS (<a class="el" href="group__wifi__wps__method.html#ga12a4e06347498f9765f339cdb5f391de">ARM_WIFI_WPS_METHOD_PIN</a>).</p>
<p>With the <b>push-button</b> method, you typically press the button, either real or virtual, both at the access point and the station. No credentials are needed.</p>
<p>With <b>PIN</b> method, you must provide the PIN code that you read from the label or screen on the wireless device.</p>
<p>WPS configuration for station is used when station connects to an access point. It enables to connect without specifying SSID, Password, Security Type or WiFi Channel. The actual network information can be retrieved once connected with <a class="el" href="group__wifi__management__gr.html#ga29a5b0072470a8c56f0939f3c97ed08e">ARM_WIFI_GetNetInfo</a>.</p>
<p>WPS configuration for access point is used when access point is activated. Subsequent activate calls re-trigger the WPS procedure.</p>
<dl class="section note"><dt>Note</dt><dd>WPS is typically activated by pressing the WPS button at the access point. During the discovery mode (usually 2 minutes or less) any wireless device may connect to the access point (PIN needs to match when PIN method is selected).</dd></dl>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line"><a class="code" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">ARM_WIFI_CONFIG_t</a> wifi_config;</div>
<div class="line"> </div>
<div class="line">wifi_config.<a class="code" href="group__wifi__management__gr.html#a587ba0cb07f02913598610049a3bbb79">ssid</a> = <span class="stringliteral">"GuestAccess"</span>;</div>
<div class="line">wifi_config.<a class="code" href="group__wifi__management__gr.html#a3bef28806edf8f4c8cb82584b7e8c3cb">pass</a> = <span class="stringliteral">"guest"</span>;</div>
<div class="line">wifi_config.<a class="code" href="group__wifi__management__gr.html#a5cd97d88131cf38bcc75189f9569f9b7">security</a> = <a class="code" href="group__wifi__sec__type.html#gab4622ed5c27f910299ed6c3997d14b66">ARM_WIFI_SECURITY_WPA2</a>;</div>
<div class="line">wifi_config.<a class="code" href="group__wifi__management__gr.html#acbcf5f8de7895ca456bb39fbcccde1d1">ch</a> = 0U;</div>
<div class="line">wifi_config.<a class="code" href="group__wifi__management__gr.html#a5e263198499fb98f97d40a9b82579175">wps_method</a> = <a class="code" href="group__wifi__wps__method.html#gaade5c0e07cfee79973643b9f98a73438">ARM_WIFI_WPS_METHOD_NONE</a>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Connect to wireless network</span></div>
<div class="line">status = wifi-><a class="code" href="group__wifi__interface__gr.html#a444ea7bda2c45eab34050d2a895baeec">Activate</a> (0U, &wifi_config);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line"> <span class="comment">// error handling</span></div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ga1842127df60067481ac2f40d19153e3e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t ARM_WIFI_Deactivate </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>interface</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deactivate interface (Disconnect from a wireless network or deactivate an access point). </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">interface</td><td>Interface (0 = Station, 1 = Access Point) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li><a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> : Operation successful</li>
<li><a class="el" href="group__execution__status.html#ga2f627075447749bb368d3b768be107cb">ARM_DRIVER_ERROR</a> : Operation failed</li>
<li><a class="el" href="group__execution__status.html#gac781d4b70ce17c4c2efe2db045be751c">ARM_DRIVER_ERROR_PARAMETER</a> : Parameter error (invalid interface)</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_Deactivate</b> deactivates the specified interface.</p>
<p>The argument <em>interface</em> specifies the interface (0 = Station, 1 = Access Point).</p>
<p>When station interface is specified, the WiFi module disconnects from the wireless network.</p>
<p>When access point interface is specified, the WiFi module deactivates the access point.</p>
<p><b>Example:</b> </p>
<ul>
<li>see <a class="el" href="group__wifi__management__gr.html#ga29a5b0072470a8c56f0939f3c97ed08e">ARM_WIFI_GetNetInfo</a> </li>
</ul>
</div>
</div>
<a class="anchor" id="ga3d641222defb5f52f6dae4ce1d540d0f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t ARM_WIFI_IsConnected </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get station connection status. </p>
<dl class="section return"><dt>Returns</dt><dd>station connection status<ul>
<li>value != 0: Station connected</li>
<li>value = 0: Station not connected</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_IsConnected</b> checks if the station is connected to a wireless network and returns the connection status.</p>
<p>The function returns a <span class="XML-Token">non-zero</span> value, if the station is connected. If the station is not connected, the function returns <span class="XML-Token">0</span>.</p>
<p><b>Example:</b> </p>
<ul>
<li>see <a class="el" href="group__wifi__management__gr.html#ga29a5b0072470a8c56f0939f3c97ed08e">ARM_WIFI_GetNetInfo</a> </li>
</ul>
</div>
</div>
<a class="anchor" id="ga29a5b0072470a8c56f0939f3c97ed08e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t ARM_WIFI_GetNetInfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__wifi__management__gr.html#structARM__WIFI__NET__INFO__t">ARM_WIFI_NET_INFO_t</a> * </td>
<td class="paramname"><em>net_info</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get station Network Information. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">net_info</td><td>Pointer to <a class="el" href="group__wifi__management__gr.html#structARM__WIFI__NET__INFO__t" title="WiFi Network Information. ">ARM_WIFI_NET_INFO_t</a> structure where station Network Information will be returned </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li><a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> : Operation successful</li>
<li><a class="el" href="group__execution__status.html#ga2f627075447749bb368d3b768be107cb">ARM_DRIVER_ERROR</a> : Operation failed (station not connected)</li>
<li><a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> : Operation not supported</li>
<li><a class="el" href="group__execution__status.html#gac781d4b70ce17c4c2efe2db045be751c">ARM_DRIVER_ERROR_PARAMETER</a> : Parameter error (invalid interface or NULL net_info pointer)</li>
</ul>
</dd></dl>
<p>The function <b>ARM_WIFI_GetNetInfo</b> retrieves wireless network information of a connected station.</p>
<p>It can be used to retrieve network connection information for subsequent connections after initially connecting using WPS.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line"><a class="code" href="group__wifi__management__gr.html#structARM__WIFI__CONFIG__t">ARM_WIFI_CONFIG_t</a> wifi_config;</div>
<div class="line"><a class="code" href="group__wifi__management__gr.html#structARM__WIFI__NET__INFO__t">ARM_WIFI_NET_INFO_t</a> net_info;</div>
<div class="line"> </div>
<div class="line">memset(&wifi_config, 0, <span class="keyword">sizeof</span>(wifi_config));</div>
<div class="line"> </div>
<div class="line">wifi_config.<a class="code" href="group__wifi__management__gr.html#a5e263198499fb98f97d40a9b82579175">wps_method</a> = <a class="code" href="group__wifi__wps__method.html#gafe4555319019fa722d2f2a8cc519af41">ARM_WIFI_WPS_METHOD_PBC</a>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Connect to wireless network (WPS)</span></div>
<div class="line">status = wifi-><a class="code" href="group__wifi__interface__gr.html#a444ea7bda2c45eab34050d2a895baeec">Activate</a> (0U, &wifi_config);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line"> <span class="comment">// error handling</span></div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Retrieve network information</span></div>
<div class="line"><span class="keywordflow">if</span> (wifi-><a class="code" href="group__wifi__interface__gr.html#ab9771e89a155d316e0b44d3ee89081d3">IsConnected</a> ()) {</div>
<div class="line"> status = wifi-><a class="code" href="group__wifi__interface__gr.html#ac17eb39c11b7797b88a1f6e0f8cc772d">GetNetInfo</a> (&net_info);</div>
<div class="line"> <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line"> <span class="comment">// error handling</span></div>
<div class="line"> }</div>
<div class="line"> printf(<span class="stringliteral">"SSID=%s, Password=%s"</span>,net_info.<a class="code" href="group__wifi__management__gr.html#ae7eccb3e4df8625b86b5572fc16c37c3">ssid</a>, net_info.<a class="code" href="group__wifi__management__gr.html#a97ae3ac37e362cf8e7e3a9e18b7c806f">pass</a>);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Disconnect from wireless network</span></div>
<div class="line">wifi-><a class="code" href="group__wifi__interface__gr.html#ae9a38e69c7b7face914560e872378ed1">Deactivate</a> (0U);</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Wed Jul 10 2019 15:20:32 for CMSIS-Driver Version 2.7.1 by Arm Ltd. All rights reserved.
<!--
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
-->
</li>
</ul>
</div>
</body>
</html>
|