Bluetooth ========= The :js:class:`SCWS.Bluetooth` provides an interface for manipulating bluetooth devices (or *peripherals*), including pairing and scanning. This is supported on **iOS** and **Android** platforms only. Pairing a device allows you to use your bluetooth reader as a standard :js:class:`SCWS.Reader` object. Here are the steps to pair a bluetooth device: 1. :js:func:`SCWS.Bluetooth.startScan`: this allows application to detect bluetooth devices around you. 2. :js:func:`SCWS.Bluetooth.getDetected`: to get a list of detected devices. 3. :js:func:`SCWS.Bluetooth.register`: to register one of the **detected** and **supported** devices. 4. At this point, or after a further :js:func:`SCWS.Bluetooth.startScan` call, the device is paired and can be used as a :js:class:`SCWS.Reader`. The operation of pairing is **permanent** and could be done only once if only one bluetooth device is to be used. Bluetooth interface has some constraints: - Getting detected devices is **not possible** if a bluetooth reader is currently *paired*. - Only **one device** can be *registered*, and so *paired*, at the same time. .. js:autofunction:: SCWS.Bluetooth.getDetected .. js:autofunction:: SCWS.Bluetooth.getRegistered .. js:autofunction:: SCWS.Bluetooth.register .. js:autofunction:: SCWS.Bluetooth.startScan .. js:autofunction:: SCWS.Bluetooth.stopScan .. js:autofunction:: SCWS.Bluetooth.release .. js:autofunction:: SCWS.Bluetooth.unregister .. js:autofunction:: SCWS.Bluetooth.isScanning