You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: serial_protocol.md
+9-11Lines changed: 9 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
#Protocol:
2
2
During the first use, or when the chiplet changes environments a “NETWORK” call is expected to initialize the wifi parameters.
3
3
4
-
Every time a serial connection is established we will expect a “INIT” call after which any subsequent calls can be made, until the connection is closed.
4
+
Every time a serial connection is established we will expect a “BEGIN” call after which any subsequent calls can be made, until the connection is closed.
5
5
6
6
In the following examples we use $ to represent variables. For example $Host represents your firebase host.
7
7
@@ -10,8 +10,7 @@ All responses will be prefixed with one of the following bytes signifying the re
10
10
```
11
11
+ If response is ok and a raw string value.
12
12
* If response is ok and a raw string value prefixed by count of bytes in response then new line.
13
-
# If response is ok and a integer value.
14
-
. If response is ok and a float value.
13
+
: If response is ok and a number, this could be float or int.
15
14
? If response is ok and a boolean value.
16
15
$ If response is ok and json formatted and prefixed by count of bytes in response then new line.
17
16
- If response is an error
@@ -32,17 +31,17 @@ Only needs to be called when the chiplet is in a new environment and needs to co
32
31
>> NETWORK home-guest
33
32
<< -UNABLE_TO_CONNECT
34
33
35
-
##INIT
34
+
##BEGIN
36
35
Must be called after creating a Serial connection, it can take either just a host for accessing public variables or you may also provide a secret for accessing protected variables in the database.
Fetches the value at $Path and returns it on the serial line. If $PATH points to a leaf node you will get the raw value back, if it points to an internal node you will get a JSON string with all children.
@@ -63,8 +62,7 @@ Same as GET but will either return the value in the format specified (by the for
63
62
###Usage
64
63
GET+ $PATH
65
64
GET* $PATH
66
-
GET# $PATH
67
-
GET. $PATH
65
+
GET: $PATH
68
66
GET? $PATH
69
67
GET$ $PATH
70
68
###Response
@@ -153,7 +151,7 @@ The event stream will continue until you send CANCEL_STREAM.
0 commit comments