Skip to content

Commit 890fddc

Browse files
committed
Runthrough of the devices API agian, as we near release
1 parent 4cf7cf0 commit 890fddc

File tree

5 files changed

+19
-37
lines changed

5 files changed

+19
-37
lines changed

devices/api/glossary.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
outline: deep
33
---
44

5-
::: danger ⚠️ Not yet public
6-
The Device API currently in development and is not yet accessible on production devices.
7-
8-
These pages can be seen as a view of what is to come later this year.
9-
:::
10-
115
# Glossary
126

137
| Term | Description |

devices/api/headers.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ outline: [1,3]
66
import GenerateConsts from '../../components/GenerateConsts.vue'
77
</script>
88

9-
::: danger ⚠️ Not yet public
10-
The Device API currently in development and is not yet accessible on production devices.
11-
12-
These pages can be seen as a view of what is to come later this year.
13-
:::
14-
159
# Headers
1610

1711
These header field types are reserved across all message types.

devices/api/index.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@ outline: deep
66
import ProtocolBytes from '../../components/ProtocolBytes.vue';
77
</script>
88

9-
::: danger ⚠️ Not yet public
10-
The Device API currently in development and is not yet accessible on production devices.
11-
12-
These pages can be seen as a view of what is to come later this year.
13-
:::
14-
159
# Device API
1610

1711
The device API makes use of the Lightbug communication protocol, also known as the V3 protocol, which is a byte oriented protocol used for device communication.
1812

19-
The protocol builds on top of existing Lightbug Protocols, and is designed to be:
20-
- Efficient to read, build
21-
- Lightweight to store and transmit
13+
The protocol builds on top of existing Lightbug protocols, and is designed to be:
2214
- Easy to use and understand
23-
- Usable in a variety of settings, without complex dependencies
15+
- Efficient to read and build
16+
- Lightweight to store and transmit
17+
- Usable in a variety of settings, without complex or bloated dependencies
2418

2519
## API Access
2620

@@ -30,7 +24,7 @@ Typically, it can be accessed via UART, I2C, or a UDP network connection.
3024

3125
For access details, please [contact our support team](https://lightbug.io/contact/).
3226

33-
Or you can get started with Toit quickly using the Lightbug provided SDK.
27+
Or you can [get started with Toit quickly](/devices/api/sdks/toit/) using the Lightbug provided SDK.
3428

3529
## Example Message
3630

devices/api/messages/index.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,32 @@ import GenerateConsts from '../../../components/GenerateConsts.vue'
33
import ProtocolBytes from '../../../components/ProtocolBytes.vue'
44
</script>
55

6-
::: danger ⚠️ Not yet public
7-
The Device API currently in development and is not yet accessible on production devices.
8-
9-
These pages can be seen as a view of what is to come later this year.
10-
:::
11-
126
# Messages
137

14-
Messages often make use of a few common header fields, and you can expect to see these in most messages types:
8+
Messages often make use of a few common [header fields](/devices/api/headers), and you can expect to see these in most messages types:
159

1610
## Requests
1711

18-
Requests may or may not require a method.
12+
Requests may or may not require a [MH 5: Method](./../headers#_5-method) header field, such as `GET`, `DO`, `SET` or `SUBSCRIBE`.
13+
14+
This is decided by the individual message type, and if required, should be included in the header.
15+
1916

20-
This is decided by the individual message type, and if required is set in the header field [5: Method](./../headers#_5-method).
2117

2218
## Responses
2319

24-
You should receive a response to every valid and expected message.
20+
You should receive a response to every valid and expected message when the recipient is able to process the request.
2521

26-
When a message ID is provided in the request, any direct response should include the initiating message ID in the header [3: Response Message ID](./../headers#_3-response-message-id).
22+
When a message ID is provided in the request, any direct response should include the initiating message ID in the header [MH 3: Response Message ID](./../headers#_3-response-message-id).
2723

28-
Responses can come in the form of a basic [5: ACK](./5-ack) or as the same message type as the request.
24+
Responses can come in the form of a basic [MT 5: ACK](./5-ack) or as the same message type as the request.
2925

30-
Responses should contain a [4: Response Status](./../headers#_4-response-status) in the header, where 0 is OK, and anything higher indicates a warning or error.
26+
Responses should contain a [MH 4: Response Status](./../headers#_4-response-status) in the header, where 0 and below are various OK responses, and anything higher than 0 indicates a warning or error.
3127

3228
## Types
3329

3430
Per the specification, message types are represented by a single `uint16` value.
3531

36-
Values of `60,000` to `61,000` are currently reserved for custom use. Feel free to implement your own messages within this range.
32+
Values of `60,000` to `61,000` are currently reserved for custom use.
33+
34+
Feel free to implement your own messages within this range.

devices/api/sdks/toit/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
Lightbug provides a [Toit package](https://pkg.toit.io/package/github.com%2Flightbug-io%2Ftoit-lightbug) that includes a set of bindings to Lightbug devices and the [Lightbug device API](./../../).
88

99
Together, these tools allow you to quickly develop and deploy applications on Lightbug devices using Toit.
10+
11+
Once developed, Toit firmware can be build without the jaguar development tooling enabled, and sent to Lightbug devices over the air for update.

0 commit comments

Comments
 (0)