GATT REST API
2021-03-31 11:03:13 8 举报
AI智能生成
GATT REST API White Paper
作者其他创作
大纲/内容
Characteristic Value
Read
Requests
Read Value
GET http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value
Read Value By UUID
GET http://<gateway>/gatt/nodes/<node>/characteristics/value?uuid=<uuid>&start=<handle>&end=<handle>
Read the long value
GET http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value?long=1
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
412 – Precondition failed
504 – Not able to connect
Multiple Read
Requests
Read the Multiple Value of Characteristics
GET http://<gateway>/gatt/nodes/<node>/characteristics/value?multiple=1
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
412 – Precondition failed
504 – Not able to connect
Cached Indicated or Notified Read
Requests
Read the Latest Cached Indicated Value
GET http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value?indicate=1
Read the Latest Cached Notified Value
GET http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value?notify=1
Responses
200 - OK
400 - Bad Request
404 - Not Found
412 – Precondition failed
Write
Requests
Write Value
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value/<value>
Write the Long Value
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value/<value>?long=1
Write Without Response
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/value/<value>?noresponse=1
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
405 – Method not allowed
412 – Precondition failed
504 – Not able to connect
Reliable Write
Requests
PUT http://<gateway>/gatt/nodes/<node>/characteristics/value?reliable=1
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
412 – Precondition failed
415 – Unsupported Media Type
504 – Not able to connect
Characteristic Descriptors
Requests
Discover All Descriptors
GET http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>/descriptors
Read Data
GET http://<gateway>/gatt/nodes/<node>/descriptors/<descriptor>
Responses
200 - OK
400 - Bad Request
404 - Not Found
504 – Not able to connect
Characteristic Descriptor Value
Read
Requests
Read value
GET http://<gateway>/gatt/nodes/<node>/descriptors/<descriptor>/value
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
504 – Not able to connect
Write
Requests
Write value
PUT http://<gateway>/gatt/nodes/<node>/descriptors/<descriptor>/value/<value>
Write long value
PUT http://<gateway>/gatt/nodes/<node>/descriptors/<descriptor>/value/<value>?long=1
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
504 – Not able to connect
Nodes
Request
Read data for a specific node
GET http://<gateway>/gatt/nodes/<node>
List Available Nodes
GET http://<gateway>/gatt/nodes
Responses
200 - OK
400 - Bad Request
404 - Not Found
Services
Requests
Discover All Services
GET http://<gateway>/gatt/nodes/<node>/services
Discover All Primary Services
GET http://<gateway>/gatt/nodes/<node>/services?primary=1
Discover Primary Services By UUID
GET http://<gateway>/gatt/nodes/<node>/services?primary=1&uuid=<uuid>
Read Data for a Service
GET http://<gateway>/gatt/nodes/<node>/services/<service>
Responses
200 - OK
400 - Bad Request
404 - Not Found
504 – Not able to connect
Characteristics
Discovery
Requests
Discover All Characteristics
GET http://<gateway>/gatt/nodes/<node>/services/<service>/characteristics
Discover Characteristics By UUID
GET http://<gateway>/gatt/nodes/<node>/characteristics?uuid=<uuid>
Get Data for a Characteristic
GET http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>
Responses
200 - OK
400 - Bad Request
404 - Not Found
504 – Not able to connect
Indication and Notification
Requests
Enable Indication
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>?indicate=1
Disable Indication
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>?indicate=0
Enable Notification
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>?notify=1
Disable Notification
PUT http://<gateway>/gatt/nodes/<node>/characteristics/<characteristic>?notify=0
Responses
200 - OK
400 - Bad Request
403 – Forbidden
404 - Not Found
504 – Not able to connect
General error returns
406 – Not acceptable
0 条评论
下一页
为你推荐
查看更多