Platforms to show: All Mac Windows Linux Cross-Platform

Back to CWInterfaceMBS class.

CWInterfaceMBS.scanForNetworksWithName(networkName as string, byref error as NSErrorMBS) as CWNetworkMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Scans for networks.

networkName: The name (SSID) of the network for which to scan.
error: An NSErrorMBS object passed by reference, which will be populated with the error code and the error description if an error occurs during the execution of this method. This parameter is optional and can be passed as nil.

Returns an array of CWNetworkMBS objects.

If ssid parameter is present, a directed scan will be performed by the interface, otherwise a broadcast scan will be performed. This method will block for the duration of the scan.

Available on Mac OS X 10.7 or later.

CWInterfaceMBS.scanForNetworksWithParameters as CWNetworkMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Performs a scan with the given CoreWLAN interface, returning any found networks.

parameters: A dicitonary object containing optional scan parameters which can be used to control the behavior of the scan. This parameter is optional.

error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns an array containing CWNetworkMBS objects representing the networks found in the scan.

See the scan parameters defined in CWGlobalsMBS for controlling scan behavior. If no scan parameters are present, the default behavior is to perform a broadcast scan on active channels, for all supported PHY modes. This method will block for the duration of the scan.

See also:

CWInterfaceMBS.scanForNetworksWithParameters(byref error as NSErrorMBS) as CWNetworkMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Performs a scan with the given CoreWLAN interface, returning any found networks.

parameters: A dicitonary object containing optional scan parameters which can be used to control the behavior of the scan. This parameter is optional.

error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns an array containing CWNetworkMBS objects representing the networks found in the scan.

See the scan parameters defined in CWGlobalsMBS for controlling scan behavior. If no scan parameters are present, the default behavior is to perform a broadcast scan on active channels, for all supported PHY modes. This method will block for the duration of the scan.

See also:

CWInterfaceMBS.scanForNetworksWithParameters(parameters as dictionary) as CWNetworkMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Performs a scan with the given CoreWLAN interface, returning any found networks.

parameters: A dicitonary object containing optional scan parameters which can be used to control the behavior of the scan. This parameter is optional.

error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns an array containing CWNetworkMBS objects representing the networks found in the scan.

See the scan parameters defined in CWGlobalsMBS for controlling scan behavior. If no scan parameters are present, the default behavior is to perform a broadcast scan on active channels, for all supported PHY modes. This method will block for the duration of the scan.

See also:

CWInterfaceMBS.scanForNetworksWithParameters(parameters as dictionary, byref error as NSErrorMBS) as CWNetworkMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Performs a scan with the given CoreWLAN interface, returning any found networks.

parameters: A dicitonary object containing optional scan parameters which can be used to control the behavior of the scan. This parameter is optional.

error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns an array containing CWNetworkMBS objects representing the networks found in the scan.

See the scan parameters defined in CWGlobalsMBS for controlling scan behavior. If no scan parameters are present, the default behavior is to perform a broadcast scan on active channels, for all supported PHY modes. This method will block for the duration of the scan.

See also:

CWInterfaceMBS.scanForNetworksWithSSID(ssid as memoryblock, byref error as NSErrorMBS) as CWNetworkMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Scans for networks.

ssid The SSID for which to scan.
error: An NSErrorMBS object passed by reference, which will be populated with the error code and the error description if an error occurs during the execution of this method. This parameter is optional and can be passed as nil.

Returns an array of CWNetworkMBS objects.

If ssid parameter is present, a directed scan will be performed by the interface, otherwise a broadcast scan will be performed. This method will block for the duration of the scan.

Available on Mac OS X 10.7 or later.

CWInterfaceMBS.setChannel(channel as UInt32) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the channel for the given CoreWLAN interface.

channel: An integer representing the channel to which the CoreWLAN interface should be tuned.
error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns a boolean value which will indicate whether or not a failure occured. True indicates no error occured.

The current channel cannot be changed if the CoreWLAN interface is associated to a network. channel must be supported by the given interface.

See also:

CWInterfaceMBS.setChannel(channel as UInt32, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the channel for the given CoreWLAN interface.

channel: An integer representing the channel to which the CoreWLAN interface should be tuned.
error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns a boolean value which will indicate whether or not a failure occured. True indicates no error occured.

The current channel cannot be changed if the CoreWLAN interface is associated to a network. channel must be supported by the given interface.

See also:

CWInterfaceMBS.setPairwiseMasterKey(key as Memoryblock, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 13.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the interface pairwise master key (PMK).

key: A memoryblock containing the pairwise master key (PMK).
error: An NSError object passed by reference, which will be populated with the error code and the error description if an error occurs during the execution of this method.
Returns a Boolean value which will indicate whether or not a failure occurred during execution. True indicates no error occurred.

Key must be 32 octets. If key is nil, this method clears the PMK for the interface.

CWInterfaceMBS.setPower(p as boolean) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the power state for the given CoreWLAN interface.

power: A boolean value indicating the power state to which the CoreWLAN interface should be set. False indicates the "OFF" state.

error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns a boolean value which will indicate whether or not a failure occured. True indicates no error occured.

This method may prompt for an administrator password if the corresponding preference is enabled in the current configuration.

See also:

CWInterfaceMBS.setPower(p as boolean, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the power state for the given CoreWLAN interface.

power: A boolean value indicating the power state to which the CoreWLAN interface should be set. False indicates the "OFF" state.

error: A error object passed by reference, which will be populated with error code and error description if an error occurs during the execution of the method. This parameter is optional.

Returns a boolean value which will indicate whether or not a failure occured. True indicates no error occured.

This method may prompt for an administrator password if the corresponding preference is enabled in the current configuration.

See also:

CWInterfaceMBS.setWEPKey(key as Memoryblock, flags as Integer, index as Integer, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 13.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the interface WEP key.

key: A memoryblock containing the WEP key.
flags: The cipher key flags to use for the specified key. Combination of kCWCipherKeyFlagsNone, kCWCipherKeyFlagsUnicast, kCWCipherKeyFlagsMulticast, kCWCipherKeyFlagsTx or kCWCipherKeyFlagsRx.
index: Integer which default key index to use for the specified key.
error An NSError object passed by reference, which will be populated with the error code and the error description if an error occurs during the execution of this method.

Returns a boolean value which will indicate whether or not a failure occurred during execution. True indicates no error occurred.

Key must be 5 octets for WEP-40 or 13 octets for WEP-104. if key is nil, this method clears the WEP key for the interface. index must correspond to default key index 1-4.

CWInterfaceMBS.setWLANChannel(channel as CWChannelMBS, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the interface channel.

channel: A CWChannel object corresponding to the channel.
error: An NSErrorMBS object passed by reference, which will be populated with the error code and the error description if an error occurs during the execution of this method. This parameter is optional and can be passed as nil.

A Boolean value which will indicate whether or not a failure occurred during execution. True indicates no error occurred.

The channel cannot be changed if the interface is associated to a network.

Available on Mac OS X 10.7 or later.

CWInterfaceMBS.startIBSSModeWithSSID(ssidData as MemoryBlock, security as Integer, channel as Integer, password as string, byref error as NSErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 13.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a computer-to-computer (ad-hoc) network with the given network name, security type, and password on the specified channel.

security: The security type to be used. kCWIBSSModeSecurityNone, kCWIBSSModeSecurityWEP40 or kCWIBSSModeSecurityWEP104.
channel: The channel on which the network will be created.
password: The password to be used. This paramter is not applicable to open system authentication.

Returns a Boolean value which will indicate whether or not a failure occurred during execution. True indicates no error occurred.

This operation may require an administrator password.

CWInterfaceMBS.supportedWLANChannels as CWChannelMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
An array of channels supported by the interface for the active country code.
Example
Var c as CWInterfaceMBS = CWInterfaceMBS.interfaceWithName("en0")
Var channels() as CWChannelMBS = c.supportedWLANChannels
Var lines() as string
for each ch as CWChannelMBS in channels
lines.append str(ch.channelNumber) + ": "+ str(ch.channelBand)
next
MsgBox join(lines,", ")

Dynamically queries the interface for the supported channels. Returns an array of CWChannel objects, or nil in the case of an error.

Available on Mac OS X 10.7 or later.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...