|
Creating Own Ad-hoc Network |
Top Previous Next |
Rather than associating with somebody else's network, the Wi-Fi interface can create an ad-hoc network of its own and have other devices associate with it. This is done by using wln.networkstart. Note that wln.networkstart is a wln task and there is a certain correct way of handling tasks.
Wln.networkstart will be rejected (return 1- REJECTED) if:
| • | Another task is currently in progress. |
| • | GA1000 add-on module is not online (wln.enabled= 0- NO). |
| • | The Wi-Fi interface is already in the non-idle state (wln.associationstate<>0- PL_WLN_NOT_ASSOCIATED). That is, you can't start a network when you are already associated or running a network. |
The method will return 0- ACCEPTED if the task is accepted for processing.
To start a network, you only need to make up your mind regarding its name and operating channel:
'take control and run your own network wln.networkstart("VOICEOFREBELS",6) While wln.task<>PL_WLN_TASK_IDLE Wend
|