mergBLE
Type
library
Description
mergBLE is a LiveCode external for iOS and OS X that enables CoreBluetooth (BLE) functionality. You can use the external to discover and interact with peripherals or advertise your app as a peripheral for others to interact with.
Associated Syntax
Command
Name | Summary | Syntax |
---|---|---|
mergBLEInitialize | Initialise the external | mergBLEInitialize |
mergBLEScanForPeripheralsWithServices | Scans for peripherals that are advertising services | mergBLEScanForPeripheralsWithServices [<pUUIDs>] |
mergBLEStopScanningForPeripherals | Stop the scan begun by mergBLEScanForPeripheralsWithServices | mergBLEStopScanningForPeripherals |
mergBLEConnectPeripheral | Establishes a local connection to a peripheral | mergBLEConnectPeripheral <pUUID> |
mergBLECancelConnectionToPeripheral | Cancel a pending or active connection to a peripheral | mergBLECancelConnectionToPeripheral <pUUID> |
mergBLEPeripheralDiscoverServices | Discover the services offered by a peripheral | mergBLEPeripheralDiscoverServices <pUUID>, [<pServiceUUIDs>] |
mergBLEPeripheralDiscoverIncludedServicesForService | When discovered the mergBLEPeripheralDidDiscoverIncludedServices is sent | mergBLEPeripheralDiscoverIncludedServicesForService <pUUID>, <pService>, [<pServiceUUIDs>] |
mergBLEPeripheralDiscoverCharacteristicsForService | Discover the characteristics of a service | mergBLEPeripheralDiscoverCharacteristicsForService <pUUID>, <pService>, [<pCharacteristicUUIDs>] |
mergBLEPeripheralReadValueForCharacteristic | Read the value of a service characteristic | mergBLEPeripheralReadValueForCharacteristic <pUUID>, <pService>, <pCharacteristic> |
mergBLEPeripheralWriteValueForCharacteristic | Write the value for a service characteristic | mergBLEPeripheralWriteValueForCharacteristic <pUUID>, <pService>, <pCharacteristic>, <pValue> |
mergBLEPeripheralSetNotificationsForCharacteristic | Set notifications to service characteristic value changes | mergBLEPeripheralSetNotificationsForCharacteristic <pUUID>, <pService>, <pCharacteristic>, <pNotify> |
mergBLEPeripheralDiscoverDescriptorsForCharacteristic | Discover the descriptors of a service characteristic | mergBLEPeripheralDiscoverDescriptorsForCharacteristic <pUUID>, <pService>, <pCharacteristic> |
mergBLEPeripheralReadValueForDescriptor | Read the value of a descriptor of a service characteristic | mergBLEPeripheralReadValueForDescriptor <pUUID>, <pService>, <pCharacteristic>, <pDescriptor> |
mergBLEPeripheralWriteValueForDescriptor | Write the value of a descriptor of a service characteristic | mergBLEPeripheralWriteValueForDescriptor <pUUID>, <pService>, <pCharacteristic>, <pDescriptor>, <pValue> |
mergBLEPeripheralReadRSSI | Read the RSSI value which is returned via the mergBLEPeripheralDidUpdateRSSI message | mergBLEPeripheralReadRSSI <pUUID> |
mergBLECreateService | Create a service to advertise | mergBLECreateService <pUUID> |
mergBLEDeleteService | Delete a service | mergBLEDeleteService <pUUID> |
mergBLEAddCharacteristicToService | Add a characteristic to a previously created service | mergBLEAddCharacteristicToService <pUUID>, <pCharacteristic>, <pRead>, <pWriteWithoutResponse>, <pWrite>, <pNotify>, <pIndicate>, <pAuthenticatedSignedWrites>, <pNotifyEncryptionRequired>, <pIndicateEncryptionRequired>, [<pValue>] |
mergBLEUpdateValueForCharacteristicOfService | mergBLEUpdateValueForCharacteristicOfService <pUUID>, <pCharacteristic>, <pValue> | |
mergBLERemoveCharacteristicFromService | mergBLERemoveCharacteristicFromService <pUUID>, <pCharacteristic> | |
mergBLEStartAdvertising | mergBLEStartAdvertising [<pName>] | |
mergBLEStopAdvertising | mergBLEStopAdvertising |
Message
Name | Summary | Syntax |
---|---|---|
mergBLEDidDiscoverPeripheral | Sent when a peripheral is discovered | mergBLEDidDiscoverPeripheral <pUUID>, <pName>, <pRSSI>, <pTx>, <pServiceUUIDs>, <pManufacturerData> |
mergBLEDidConnectPeripheral | Sent when a peripheral connected | mergBLEDidConnectPeripheral <pUUID> |
mergBLEDidFailToConnectPeripheral | Sent when a peripheral connection failed | mergBLEDidFailToConnectPeripheral <pUUID>, <pError> |
mergBLEDidDisconnectPeripheral | Sent when a peripheral is disconnected | mergBLEDidDisconnectPeripheral <pUUID> |
mergBLEPeripheralDidDiscoverServices | Sent when services are discovered | mergBLEPeripheralDidDiscoverServices <pUUID>, <pServices> |
mergBLEPeripheralDidDiscoverIncludedServices | Sent when services included in a service are discovered | mergBLEPeripheralDidDiscoverIncludedServices <pUUID>, <pService>, <pServices> |
mergBLEPeripheralDidDiscoverCharacteristicsForService | Sent when characteristics of a service are discovered | mergBLEPeripheralDidDiscoverCharacteristicsForService <pUUID>, <pService>, <pCharacteristic> |
mergBLEPeripheralDidUpdateValueForCharacteristic | Sent when a characteristic value is read | mergBLEPeripheralDidUpdateValueForCharacteristic <pUUID>, <pCharacteristic>, <pValue>, <pError> |
mergBLEPeripheralDidWriteValueForCharacteristic | Sent when a characteristic value is written | mergBLEPeripheralDidWriteValueForCharacteristic <pUUID>, <pCharacteristic>, <pError> |
mergBLEPeripheralDidUpdateNotificationStateForCharacteristic | Sent when the update notification state is set for a characterisitc | mergBLEPeripheralDidUpdateNotificationStateForCharacteristic <pUUID>, <pCharacteristic>, <pError> |
mergBLEPeripheralDidDiscoverDescriptorsForCharacteristic | Sent when the descriptors of a characteristic of a service are discovered | mergBLEPeripheralDidDiscoverDescriptorsForCharacteristic <pUUID>, <pCharacteristic>, <pDescriptors> |
mergBLEPeripheralDidUpdateValueForDescriptor | Sent when a descriptor value is read | mergBLEPeripheralDidUpdateValueForDescriptor <pUUID>, <pDescriptor>, <pValue>, <pError> |
mergBLEPeripheralDidWriteValueForDescriptor | Sent when a descriptor value is written | mergBLEPeripheralDidWriteValueForDescriptor <pUUID>, <pDescriptor>, <pError> |
mergBLECentralManagerDidUpdateState | Sent when the central manager updates state | mergBLECentralManagerDidUpdateState <pState> |
mergBLEPeripheralDidUpdateRSSI | Sent when the RSSI value is read | mergBLEPeripheralDidUpdateRSSI <pUUID>, <pRSSI>, <pError> |
mergBLEPeripheralDidModifyServices | Sent when the peripheral adds or invalidates services | mergBLEPeripheralDidModifyServices <pUUID>, <pInvalidatedServices> |
mergBLEPeripheralManagerDidStartAdvertising | Sent when the device starts advertising as a peripheral | mergBLEPeripheralManagerDidStartAdvertising <pError> |
mergBLECentralDidSubscribeToCharacteristic | Sent when a central subscribes to one of the advertised service characteristics | mergBLECentralDidSubscribeToCharacteristic <pUUID>, <pCharacteristic> |
mergBLECentralDidUnsubscribeToCharacteristic | Sent when a central unsubscribes from one of the advertised service characteristics | mergBLECentralDidUnsubscribeToCharacteristic <pUUID>, <pCharacteristic> |
mergBLECentralDidUpdateValueForCharacteristic | Sent when a central writes the value of a characteristic | mergBLECentralDidUpdateValueForCharacteristic <pUUID>, <pCharacteristic>, <pValue> |
mergBLEPeripheralManagerDidUpdateState | Sent when the peripheral manager updates state | mergBLEPeripheralManagerDidUpdateState <pState> |
Function
Name | Summary | Syntax |
---|---|---|
mergBLEPeripheralServiceAdvertisementData | Get the advertisement data for a service from a peripheral discovery | mergBLEPeripheralServiceAdvertisementData(<pUUID>, <pService>) |