IP*Works! Bluetooth - Online Help
Available for:
IP*Works! Bluetooth
Questions / Feedback?

BTPort Component

Properties   Methods   Events   Configuration Settings   Errors  

The BTPort component facilitates Bluetooth communications by providing an easy interface to system Bluetooth functions.

Syntax

nsoftware.IPWorksBT.Btport

Remarks

The BTPort component provides a simple way to send and receive data over a Bluetooth socket. The first step is to establish a connection to a service. Connections are established by calling the Connect method.

Example (Connecting)


BTPort.Connect("20:C9:D0:94:3E:46", 10)

Alternatively, RemoteServiceClassId may be used instead of specifying a port. For instance:

        btport1.RemoteHost = "20:C9:D0:94:3E:46";
        btport1.RemoteServiceClassId = "00001101-0000-1000-8000-00805f9b34fb";
        btport1.Connected = true;

The Bluetooth Universally Unique Identifier (UUID) is in the form

00000000-0000-1000-8000-00805F9B34FB

To send data either set DataToSend, or call the Send, SendLine, or SendFile methods.

Received data will be fired through the DataIn event.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AcceptDataEnables or disables data reception (the DataIn event).
BytesSentThe number of bytes actually sent after an assignment to DataToSend .
ConnectedTriggers a connection or disconnection.
DataToSendA string of data to be sent to the remote host.
EOLUsed to break the incoming data stream into chunks separated by EOL.
LocalHostThe address of the Bluetooth device through which connections are initiated or accepted.
LocalPortThe port in the Bluetooth device to which the component binds.
ProtocolThe Bluetooth protocol to be used.
RemoteHostThe Bluetooth address of the remote device.
RemotePortThe port on the remote Bluetooth device.
RemoteServiceClassIdThe class Id (UUID) of the remote service.
SingleLineModeSpecial mode for line-oriented protocols.
TimeoutA timeout for the component.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
ConnectConnects to a remote service.
DisconnectDisconnects from the remote host.
DoEventsProcesses events from the internal message queue.
GetLineGets a line of text from the server.
InterruptInterrupts the current action.
SendSends data to the remote host.
SendFileSends file to the remote host.
SendLineSends a string followed by a newline.
SetReceiveStreamSets the stream to which received data will be written.
SetSendStreamReads content from the stream and sends it to the server.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectedFired immediately after a connection completes (or fails).
ConnectionStatusFired to indicate changes in connection state.
DataInFired when data (complete lines) comes in.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
ReadyToSendFired when IPPort is ready to send data.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

BTAuthenticateWhether authentication is required.
BTEncryptForces an encrypted connection if set to True.
BTMTUMaxThe maximum RFCOMM MTU (Maximum Transmission Unit).
BTMTUThe default RFCOMM MTU (Maximum Transmission Unit).
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2016 /n software inc. - All rights reserved.
Build 1.0.6093.0