mergBLE

Typelibrary
DictionaryLCS
LibraryLiveCode Script
Associationsmergble
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.

TypeNameSummarySyntax
commandmergBLEAddCharacteristicToService

Add a characteristic to a previously created service

mergBLEAddCharacteristicToService <pUUID>, <pCharacteristic>, <pRead>, <pWriteWithoutResponse>, <pWrite>, <pNotify>, <pIndicate>, <pAuthenticatedSignedWrites>, <pNotifyEncryptionRequired>, <pIndicateEncryptionRequired>, [<pValue>]

- - -mergBLECancelConnectionToPeripheral

Cancel a pending or active connection to a peripheral

mergBLECancelConnectionToPeripheral <pUUID>

- - -mergBLEConnectPeripheral

Establishes a local connection to a peripheral

mergBLEConnectPeripheral <pUUID>

- - -mergBLECreateService

Create a service to advertise

mergBLECreateService <pUUID>

- - -mergBLEDeleteService

Delete a service

mergBLEDeleteService <pUUID>

- - -mergBLEInitialize

Initialise the external

mergBLEInitialize

- - -mergBLEPeripheralDiscoverCharacteristicsForService

Discover the characteristics of a service

mergBLEPeripheralDiscoverCharacteristicsForService <pUUID>, <pService>, [<pCharacteristicUUIDs>]

- - -mergBLEPeripheralDiscoverDescriptorsForCharacteristic

Discover the descriptors of a service characteristic

mergBLEPeripheralDiscoverDescriptorsForCharacteristic <pUUID>, <pService>, <pCharacteristic>

- - -mergBLEPeripheralDiscoverIncludedServicesForService

When discovered the mergBLEPeripheralDidDiscoverIncludedServices is sent

mergBLEPeripheralDiscoverIncludedServicesForService <pUUID>, <pService>, [<pServiceUUIDs>]

- - -mergBLEPeripheralDiscoverServices

Discover the services offered by a peripheral

mergBLEPeripheralDiscoverServices <pUUID>, [<pServiceUUIDs>]

- - -mergBLEPeripheralReadRSSI

Read the RSSI value which is returned via the mergBLEPeripheralDidUpdateRSSI message

mergBLEPeripheralReadRSSI <pUUID>

- - -mergBLEPeripheralReadValueForCharacteristic

Read the value of a service characteristic

mergBLEPeripheralReadValueForCharacteristic <pUUID>, <pService>, <pCharacteristic>

- - -mergBLEPeripheralReadValueForDescriptor

Read the value of a descriptor of a service characteristic

mergBLEPeripheralReadValueForDescriptor <pUUID>, <pService>, <pCharacteristic>, <pDescriptor>

- - -mergBLEPeripheralSetNotificationsForCharacteristic

Set notifications to service characteristic value changes

mergBLEPeripheralSetNotificationsForCharacteristic <pUUID>, <pService>, <pCharacteristic>, <pNotify>

- - -mergBLEPeripheralWriteValueForCharacteristic

Write the value for a service characteristic

mergBLEPeripheralWriteValueForCharacteristic <pUUID>, <pService>, <pCharacteristic>, <pValue>

- - -mergBLEPeripheralWriteValueForDescriptor

Write the value of a descriptor of a service characteristic

mergBLEPeripheralWriteValueForDescriptor <pUUID>, <pService>, <pCharacteristic>, <pDescriptor>, <pValue>

- - -mergBLERemoveCharacteristicFromService

mergBLERemoveCharacteristicFromService <pUUID>, <pCharacteristic>

- - -mergBLEScanForPeripheralsWithServices

Scans for peripherals that are advertising services

mergBLEScanForPeripheralsWithServices [<pUUIDs>]

- - -mergBLEStartAdvertising

mergBLEStartAdvertising [<pName>]

- - -mergBLEStopAdvertising

mergBLEStopAdvertising

- - -mergBLEStopScanningForPeripherals

Stop the scan begun by mergBLEScanForPeripheralsWithServices

mergBLEStopScanningForPeripherals

- - -mergBLEUpdateValueForCharacteristicOfService

mergBLEUpdateValueForCharacteristicOfService <pUUID>, <pCharacteristic>, <pValue>

functionmergBLEPeripheralServiceAdvertisementData

Get the advertisement data for a service from a peripheral discovery

mergBLEPeripheralServiceAdvertisementData(<pUUID>, <pService>)

librarymergBLE

mergBLEPeripheralServiceAdvertisementData(<pUUID>, <pService>)

messagemergBLECentralDidSubscribeToCharacteristic

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>

- - -mergBLECentralManagerDidUpdateState

Sent when the central manager updates state

mergBLECentralManagerDidUpdateState <pState>

- - -mergBLEDidConnectPeripheral

Sent when a peripheral connected

mergBLEDidConnectPeripheral <pUUID>

- - -mergBLEDidDisconnectPeripheral

Sent when a peripheral is disconnected

mergBLEDidDisconnectPeripheral <pUUID>

- - -mergBLEDidDiscoverPeripheral

Sent when a peripheral is discovered

mergBLEDidDiscoverPeripheral <pUUID>, <pName>, <pRSSI>, <pTx>, <pServiceUUIDs>, <pManufacturerData>

- - -mergBLEDidFailToConnectPeripheral

Sent when a peripheral connection failed

mergBLEDidFailToConnectPeripheral <pUUID>, <pError>

- - -mergBLEPeripheralDidDiscoverCharacteristicsForService

Sent when characteristics of a service are discovered

mergBLEPeripheralDidDiscoverCharacteristicsForService <pUUID>, <pService>, <pCharacteristic>

- - -mergBLEPeripheralDidDiscoverDescriptorsForCharacteristic

Sent when the descriptors of a characteristic of a service are discovered

mergBLEPeripheralDidDiscoverDescriptorsForCharacteristic <pUUID>, <pCharacteristic>, <pDescriptors>

- - -mergBLEPeripheralDidDiscoverIncludedServices

Sent when services included in a service are discovered

mergBLEPeripheralDidDiscoverIncludedServices <pUUID>, <pService>, <pServices>

- - -mergBLEPeripheralDidDiscoverServices

Sent when services are discovered

mergBLEPeripheralDidDiscoverServices <pUUID>, <pServices>

- - -mergBLEPeripheralDidModifyServices

Sent when the peripheral adds or invalidates services

mergBLEPeripheralDidModifyServices <pUUID>, <pInvalidatedServices>

- - -mergBLEPeripheralDidUpdateNotificationStateForCharacteristic

Sent when the update notification state is set for a characterisitc

mergBLEPeripheralDidUpdateNotificationStateForCharacteristic <pUUID>, <pCharacteristic>, <pError>

- - -mergBLEPeripheralDidUpdateRSSI

Sent when the RSSI value is read

mergBLEPeripheralDidUpdateRSSI <pUUID>, <pRSSI>, <pError>

- - -mergBLEPeripheralDidUpdateValueForCharacteristic

Sent when a characteristic value is read

mergBLEPeripheralDidUpdateValueForCharacteristic <pUUID>, <pCharacteristic>, <pValue>, <pError>

- - -mergBLEPeripheralDidUpdateValueForDescriptor

Sent when a descriptor value is read

mergBLEPeripheralDidUpdateValueForDescriptor <pUUID>, <pDescriptor>, <pValue>, <pError>

- - -mergBLEPeripheralDidWriteValueForCharacteristic

Sent when a characteristic value is written

mergBLEPeripheralDidWriteValueForCharacteristic <pUUID>, <pCharacteristic>, <pError>

- - -mergBLEPeripheralDidWriteValueForDescriptor

Sent when a descriptor value is written

mergBLEPeripheralDidWriteValueForDescriptor <pUUID>, <pDescriptor>, <pError>

- - -mergBLEPeripheralManagerDidStartAdvertising

Sent when the device starts advertising as a peripheral

mergBLEPeripheralManagerDidStartAdvertising <pError>

- - -mergBLEPeripheralManagerDidUpdateState

Sent when the peripheral manager updates state

mergBLEPeripheralManagerDidUpdateState <pState>