.associate Method

Function:

Causes the Wi-Fi interface to attempt association with the specified wireless network. This method is a task.

Syntax:

wln.associate(byref bssid as string, byref ssid as string, channel as byte, bssmode as pl_wln_bss_modes) as accepted_rejected

Returns:

One of accepted_rejected constants:

  • 0 — ACCEPTED
  • 1 — REJECTED

See Also:

Associating With a Network, wln.disassociate, wln.associationstate


Part

Description

bssid

  • GA1000: This argument must contain the actual BSSID ("MAC address") of the target network.
  • WA2000: Provide the BSSID of the target network or set this argument to "" or "0.0.0.0.0.0" to allow the wln. object associate with any network with matching SSID.

ssid

The name of the target network with which to associate.

channel

  • GA1000: This argument must contain the correct channel on which the target network operates.
  • WA2000: Provide the correct channel or set this argument to 0 to allow the wln. object to associate with the target network on any channel.

bssmode

Network mode of the target network:

  • 0 — PL_WLN_BSS_MODE_INFRASTRUCTURE
  • 1 — PL_WLN_BSS_MODE_ADHOC

  • GA1000 can associate with infrastructure and ad hoc networks.
  • WA2000 can only associate with infrastructure networks. For it, this argument should always be set to 0 —PL_WLN_BSS_MODE_INFRASTRUCTURE.