Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

IOBluetoothRFCOMMChannelMBS.closeChannel
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Close the channel.
Notes: Lasterror is set to error code value. 0 if successful.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: The constructor.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.openRFCOMMChannelAsync(device as IOBluetoothDeviceMBS, channelID as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Opens a new RFCOMM channel to the target device. Returns immediately.
Notes:
channelID: The RFCOMM channel ID for the new channel.

Lasterror is set tokIOReturnSuccess if the open process was successfully started (or if an existing RFCOMM channel was found). The channel must be released when the caller is done with it.

This method will begin the process of opening a new RFCOMM channel to the target device. The baseband connection to the device will be opened if it is not open already. The RFCOMM channel open process will not complete until the client has registered an incoming data listener on the new channel. The RFCOMM channel object is already retained when this function returns success; the channel must be released when the caller is done with it.
You should verify that the channel you wish to open exists on the remote device before attempting to open it, by performing an SDP query. This is recommended because the service might have been removed from the, remote device or the channel assignments for the service could have changed (this is rare, but it does happen frequently on some devices). This also works around a bug that existed in early Leopard versions in certain situations where the method would return an error; in these instances, the desired RFCOMM channel could not be opened again until the calling app was restarted.

NOTE: This method is only available in macOS 10.2.5 (Bluetooth v1.2) or later.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.openRFCOMMChannelSync(device as IOBluetoothDeviceMBS, channelID as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Opens a new RFCOMM channel to the target device.
Notes:
Returns only once the channel is open or failed to open.

channelID: The RFCOMM channel ID for the new channel.

Returns kIOReturnSuccess if the open process was successfully started (or if an existing RFCOMM channel was found). The channel must be released when the caller is done with it.

This method will begin the process of opening a new RFCOMM channel to the target device. The baseband connection to the device will be opened if it is not open already. The RFCOMM channel open process will not complete until the client has registered an incoming data listener on the new channel. The RFCOMM channel object is already retained when this function returns success; the channel must be released when the caller is done with it.
You should verify that the channel you wish to open exists on the remote device before attempting to open it, by performing an SDP query. This is recommended because the service might have been removed from the, remote device or the channel assignments for the service could have changed (this is rare, but it does happen frequently on some devices). This also works around a bug that existed in early Leopard versions in certain situations where the method would return an error; in these instances, the desired RFCOMM channel could not be opened again until the calling app was restarted.

NOTE: This method is only available in macOS 10.2.5 (Bluetooth v1.2) or later.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.sendRemoteLineStatus(lineStatus as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Sends an error to the remote side.
Notes:
lineStatus: the error type. The error code can be NoError, OverrunError, ParityError or FramingError.

Lasterror is set to an error code value. 0 if successful.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.setSerialParameters(speed as Integer, dataBits as Integer, parity as Integer, stopBits as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Changes the parameters of the serial connection.
Notes:
speed: the baudrate.
nBits: number of data bits.
parity: the type of parity can be NoParity, OddParity, EvenParity or MaxParity.
bitStop: number of stop bits.

See kParityType* constants.
Lasterror is set to error code value. 0 if successful.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.writeAsync(data as MemoryBlock, tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Sends a block of data in the channel asynchronously.
Notes:
data: The data buffer to be sent.

Lasterror is set to kIOReturnSuccess if the data was buffered successfully.

The number of bytes to be sent must not exceed the channel MTU. If the return value is an error condition none of the data was sent. Once the data has been successfully passed to the hardware to be transmitted, the WriteCompleted event will be called with the tag that was passed to this method.

NOTE: This method is only available in macOS 10.2.5 (Bluetooth v1.2) or later.

Feedback, Comments & Corrections

IOBluetoothRFCOMMChannelMBS.writeSync(data as MemoryBlock)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Sends a block of data in the channel synchronously.
Notes:
data The data buffer to be sent.

Lasterror is set to kIOReturnSuccess if the data was written successfully.

Sends data through the channel. The number of bytes to be sent must not exceed the channel MTU. If the return value is an error condition none of the data was sent. This method will block until the data has been successfully sent to the hardware for transmission (or until an error occurs).

NOTE: This method is only available in macOS 10.2.5 (Bluetooth v1.2) or later.

Feedback, Comments & Corrections

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





Links
MBS Xojo blog