• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • Synchronization
      • Services
        • Overview
        • Synchronization Connection String
        • CSWeb
        • Bluetooth
        • Dropbox
        • FTP
        • Local Files
        • Syncable Name
      • Messages
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Bluetooth Synchronization Service

Overview
The Bluetooth synchronization service allows a device to connect to another device as a client, with the other device acting as a passive server that responds to client commands. The two devices must be physically close, as Bluetooth is a short-range wireless technology.
Bluetooth allows two devices, such as computers, laptops, tablets, or phones, to connect to transfer data. Android and Windows devices can connect over Bluetooth. When using Bluetooth, no Internet connection is required, however the two devices must be in close physical proximity. This is useful when transferring data in areas where no Internet connection is available.
Bluetooth Connection
A connection to another device using Bluetooth occurs as a result of a syncconnect function call, or as part of a CSPro operation such as an application deployment. For CSPro to successfully establish a connection, the device running the server must call the function syncserver at roughly the same time as the client attempts to make the connection.
The resource of a Bluetooth connection string is simply the text "Bluetooth".
When attempting to make a connection, CSPro displays a dialog showing the names of nearby Bluetooth devices. The getbluetoothname and setbluetoothname functions provide functionality to get or set a device's Bluetooth name. If you do not want the user to pick the Bluetooth device manually, and you know the name of the device running the server, you can include the server's Bluetooth name as part of the connection string's path. For example: "Bluetooth/USD_865K" would connect to a device with the Bluetooth name "USD_865K".
The following are examples of how to create connections to devices running the Bluetooth server:
// connect to a Bluetooth device, allowing the user to select the device
syncconnect("Bluetooth");

// connect to a Bluetooth device named "François", properly encoding the
// name's characters so that they are valid as part of a path
syncconnect(maketext(
   
"Bluetooth/%s",
   
encode(URIComponent, "François")
));
See also: Synchronization Services, SyncMessage Function, SyncServer Function