MQTT API ‐ BLE API - CassiaNetworks/CassiaSDKGuide GitHub Wiki
BLE API
Interaction Flow
sequenceDiagram
participant Server as User Application Service
participant MQTT as User MQTT Server
participant Gateway as Cassia Bluetooth Gateway
participant Device as User BLE Device
rect rgba(136, 177, 234,0.4)
note over Server,Device: [Data Reporting] BLE Advertising Data
Device -) Device: BLE Advertising Mechanism
Device --) Gateway: BLE Advertising Data
Gateway --) Server: BLE Advertising Data
end
rect rgba(136, 177, 234,0.4)
note over Server,Device: [API Call]-BLE Connection
Server --) Gateway: BLE Connection Request
Gateway --) Device: BLE Connect
Device --) Gateway: BLE Connection Complete
Gateway --) Server: BLE Connection Response
end
rect rgba(136, 177, 234,0.4)
note over Server,Device: [Data Reporting] BLE Connection Event
Device --) Gateway: BLE Connection Event
Gateway --) Server: BLE Connection Event
Server --) Server: Processing (Response and event sequence not fixed)
end
rect rgba(136, 177, 234, 0.4)
note over Server,Device: [API Call] BLE Read Operation(Id)
Server --) Gateway: BLE Read Operation Request
Gateway --) Device: BLE Read Operation Request
opt
rect rgba(136, 177, 234, 0.4)
Device --) Gateway: BLE Read Operation Response
end
end
Gateway --) Server: BLE Read Operation Response
end
rect rgba(136, 177, 234, 0.4)
note over Server,Device: [API Call] BLE Write Operation(Id)
Server --) Gateway: BLE Write Operation Request
Gateway --) Device: BLE Write Operation Request
opt
rect rgba(136, 177, 234, 0.4)
Device --) Gateway: BLE Write Operation Response
end
end
Gateway --) Server: BLE Write Operation Response
end
rect rgba(136, 177, 234,0.4)
note over Server,Device: [Data Reporting] BLE Notification Data(Id)
Device --) Gateway: BLE Notification Data
Gateway --) Server: BLE Notification Data
Server --) Server: Processing (Response and BLE Notification data sequence not in order)
end
rect rgba(136, 177, 234,0.4)
note over Server,Device: [API Call]-BLE Disconnect
Server --) Gateway: BLE Disconnect Request
Gateway --) Device: BLE Disconnect
Device --) Gateway: BLE Disconnect Complete
Gateway --) Server: BLE Disconnect Response
end
rect rgba(136, 177, 234,0.4)
note over Server,Device: [Data Reporting] BLE Disconnection Event
Device --) Gateway: BLE Disconnection Event
Gateway --) Server: BLE Disconnection Event
Server --) Server: Processing (Response and event sequence not fixed)
end