...
Anchor
NetIF_WiFi_CreateAdhoc()
API function with the necessary parameters. See section C-10-3 “NetIFNetIF_WiFi_
CreateAdhoc()” on page 535 for CreateAP
for more information.NetIF_WiFi_CreateAdhoc()
is shown below:anchorCode Block |
---|
...
|
...
HTML Table | |
---|---|
summary | |
class | Code_Listing |
Table Row (tr) | |
Table Cell (td) | |
Anchor | 1019089 | 1019089 | NET_ERR err;
Anchor | 1019090 | 1019090 |
Anchor | 1019091 | 1019091 | ap_ctn =
|
...
| |||||||||||||||||||||
NET_ERR err; ap_ctn = NetIF_WiFi_CreateAdhoc(if_nbr,(1) Anchor | | 1019092 | 1019092 | ||||||||||||||||||
Anchor | 1019093 | 1019093 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Anchor | 1019094 | 1019094 | |||||||||||||||||||
Anchor | 1019095 | 1019095 | |||||||||||||||||||
Anchor | 1019096 | 1019096 | “adhoc_ssid”, (6)|||||||||||||||||||
Anchor | 1019097 | 1019097 | “adhoc_password”, (7)|||||||||||||||||||
Anchor | 1019098 | 1019098 | &err); (8)
...
(5)
"adhoc_ssid", (6)
"adhoc_password", (7)
&err); (8) |
Panel | ||
---|---|---|
| ||
|
...
|
...
|
...
|
...
...
|
...
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
If an error occurs, you should always inspect the return error code and take the appropriate action. There are very few things that could cause a failure to create an ad hoc network properly. Once the error is resolved, the application may again attempt to call NetIF_WiFi_CreateAdhoc()
.