Home | Sign in | English EN
  • Name of the known services
  • Limitation
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
SocketConnectBluetooth (Function)
In french: SocketConnecteBluetooth
Connects a client computer to a specific Bluetooth socket.
<Result> = SocketConnectBluetooth(<Socket name> , <Department> , <Address> [, <Maximum timeout>])
<Result>: Boolean
  • True if the connection was established,
  • False otherwise. If an error occurs, you can get the details of the error with ErrorInfo.
<Socket name>: Character string (with quotes)
Name that will be given to the connection opened on the server socket. This name will be used by all socket functions.
<Department>: Character string (with quotes)
Corresponds to:
  • the name of a known service (see the Notes)
  • the GUID of a service
<Address>: Character string (with quotes)
MAC address of the server.
<Maximum timeout>: Optional integer
Maximum timeout (in milliseconds) for establishing the connection. This time-out will be used if the server refuses the connection (SocketDeny). In this case, the connection will not be locking.
This parameter can correspond to:
  • an integer corresponding to the number of milliseconds,
  • a Duration variable,
  • Versions 23 and later
    the duration in text format (e.g., 1 s or 10 ms).
    New in version 23
    the duration in text format (e.g., 1 s or 10 ms).
    the duration in text format (e.g., 1 s or 10 ms).
This time-out is set to 5000 milliseconds by default (5 seconds).

Name of the known services

The known services are the standard services described in the Bluetooth standard. The names of the accepted services are as follows:
  • ServiceDiscoveryServerServiceClassID_UUID
  • BrowseGroupDescriptorServiceClassID_UUID
  • PublicBrowseGroupServiceClass_UUID
  • SerialPortServiceClass_UUID
  • LANAccessUsingPPPServiceClass_UUID
  • DialupNetworkingServiceClass_UUID
  • IrMCSyncServiceClass_UUID
  • OBEXObjectPushServiceClass_UUID
  • OBEXFileTransferServiceClass_UUID
  • IrMCSyncCommandServiceClass_UUID
  • HeadsetServiceClass_UUID
  • CordlessTelephonyServiceClass_UUID
  • AudioSourceServiceClass_UUID
  • AudioSinkServiceClass_UUID
  • AVRemoteControlTargetServiceClass_UUID
  • AdvancedAudioDistributionServiceClass_UUID
  • AVRemoteControlServiceClass_UUID
  • VideoConferencingServiceClass_UUID
  • IntercomServiceClass_UUID
  • FaxServiceClass_UUID
  • HeadsetAudioGatewayServiceClass_UUID
  • WAPServiceClass_UUID
  • WAPClientServiceClass_UUID
  • PANUServiceClass_UUID
  • NAPServiceClass_UUID
  • GNServiceClass_UUID
  • DirectPrintingServiceClass_UUID
  • ReferencePrintingServiceClass_UUID
  • ImagingServiceClass_UUID
  • ImagingResponderServiceClass_UUID
  • ImagingAutomaticArchiveServiceClass_UUID
  • ImagingReferenceObjectsServiceClass_UUID
  • HandsfreeServiceClass_UUID
  • HandsfreeAudioGatewayServiceClass_UUID
  • DirectPrintingReferenceObjectsServiceClass_UUID
  • ReflectedUIServiceClass_UUID
  • BasicPringingServiceClass_UUID
  • PrintingStatusServiceClass_UUID
  • HumanInterfaceDeviceServiceClass_UUID
  • HardcopyCableReplacementServiceClass_UUID
  • HCRPrintServiceClass_UUID
  • HCRScanServiceClass_UUID
  • CommonISDNAccessServiceClass_UUID
  • VideoConferencingGWServiceClass_UUID
  • UDIMTServiceClass_UUID
  • UDITAServiceClass_UUID
  • AudioVideoServiceClass_UUID
  • PnPInformationServiceClass_UUID
  • GenericNetworkingServiceClass_UUID
  • GenericFileTransferServiceClass_UUID
  • GenericAudioServiceClass_UUID
  • GenericTelephonyServiceClass_UUID
  • ActiveSyncClass_UUID
If you are using another service, its identifier must be specified directly (GUID).


Only the Microsoft Bluetooth stack is supported by this function. See Which stacks to use? for more details
Component: wd260com.dll
Minimum version required
  • Version 12
This page is also available for…
Example of Using in Mobile Printer Bluetooth
Willian Fernando
28 Jun. 2016