@@ -96,7 +96,7 @@ received, and associated metadata, to the server.
96
96
97
97
Bytes | Function
98
98
:------:|---------------------------------------------------------------------
99
- 0 | protocol version = 1
99
+ 0 | protocol version = 2
100
100
1-2 | random token
101
101
3 | PUSH_DATA identifier 0x00
102
102
4-11 | Gateway unique identifier (MAC address)
@@ -109,7 +109,7 @@ PUSH_DATA packets received.
109
109
110
110
Bytes | Function
111
111
:------:|---------------------------------------------------------------------
112
- 0 | protocol version = 1
112
+ 0 | protocol version = 2
113
113
1-2 | same token as the PUSH_DATA packet to acknowledge
114
114
3 | PUSH_ACK identifier 0x01
115
115
@@ -269,9 +269,11 @@ Example (white-spaces, indentation and newlines added for readability):
269
269
| | Anytime after first PULL_DATA for each packet to TX |-|
270
270
| ------------------------------------------------------- |
271
271
| |
272
- | PULL_RESP (token 0 , JSON payload) |
272
+ | PULL_RESP (token Z , JSON payload) |
273
273
|<-------------------------------------------------------------|
274
274
| |
275
+ | TX_ACK (token Z, JSON payload) |
276
+ |------------------------------------------------------------->|
275
277
276
278
### 5.2. PULL_DATA packet ###
277
279
@@ -288,7 +290,7 @@ route stays open for the server to be used at any time.
288
290
289
291
Bytes | Function
290
292
:------:|---------------------------------------------------------------------
291
- 0 | protocol version = 1
293
+ 0 | protocol version = 2
292
294
1-2 | random token
293
295
3 | PULL_DATA identifier 0x02
294
296
4-11 | Gateway unique identifier (MAC address)
@@ -300,7 +302,7 @@ open and that the server can send PULL_RESP packets at any time.
300
302
301
303
Bytes | Function
302
304
:------:|---------------------------------------------------------------------
303
- 0 | protocol version = 1
305
+ 0 | protocol version = 2
304
306
1-2 | same token as the PULL_DATA packet to acknowledge
305
307
3 | PULL_ACK identifier 0x04
306
308
@@ -311,16 +313,30 @@ metadata that will have to be emitted by the gateway.
311
313
312
314
Bytes | Function
313
315
:------:|---------------------------------------------------------------------
314
- 0 | protocol version = 1
315
- 1-2 | unused bytes
316
+ 0 | protocol version = 2
317
+ 1-2 | random token
316
318
3 | PULL_RESP identifier 0x03
317
319
4-end | JSON object, starting with {, ending with }, see section 6
318
320
321
+ ### 5.5. TX_ACK packet ###
322
+
323
+ That packet type is used by the gateway to send a feedback to the server
324
+ to inform if a downlink request has been accepted or rejected by the gateway.
325
+ The datagram may optionnaly contain a JSON string to give more details on
326
+ acknoledge. If no JSON is present (empty string), this means than no error
327
+ occured.
328
+
329
+ Bytes | Function
330
+ :------:|---------------------------------------------------------------------
331
+ 0 | protocol version = 2
332
+ 1-2 | same token as the PULL_RESP packet to acknowledge
333
+ 3 | TX_ACK identifier 0x05
334
+ 4-end | [optional] JSON object, starting with {, ending with }, see section 6
319
335
320
336
6. Downstream JSON data structure
321
337
----------------------------------
322
338
323
- The root object must contain an object named "txpk":
339
+ The root object of PULL_RESP packet must contain an object named "txpk":
324
340
325
341
``` json
326
342
{
@@ -383,10 +399,48 @@ Examples (white-spaces, indentation and newlines added for readability):
383
399
}}
384
400
```
385
401
402
+ The root object of TX_ACK packet must contain an object named "txpk_ack":
403
+
404
+ ``` json
405
+ {
406
+ "txpk_ack": {...}
407
+ }
408
+ ```
409
+
410
+ That object contain status information concerning the associated PULL_RESP packet.
411
+
412
+ Name | Type | Function
413
+ :----:|:------:|------------------------------------------------------------------------------
414
+ error | string | Indication about success or type of failure that occured for downlink request.
415
+
416
+ The possible values of "error" field are:
417
+
418
+ Value | Definition
419
+ :-----------------:|---------------------------------------------------------------------
420
+ NONE | Packet has been programmed for downlink
421
+ TOO_LATE | Rejected because it was already too late to program this packet for downlink
422
+ TOO_EARLY | Rejected because downlink packet timestamp is too much in advance
423
+ COLLISION_PACKET | Rejected because there was already a packet programmed in requested timeframe
424
+ COLLISION_BEACON | Rejected because there was already a beacon planned in requested timeframe
425
+ TX_FREQ | Rejected because requested frequency is not supported by TX RF chain
426
+ TX_POWER | Rejected because requested power is not supported by gateway
427
+ GPS_UNLOCKED | Rejected because GPS is unlocked, so GPS timestamp cannot be used
428
+
429
+ Examples (white-spaces, indentation and newlines added for readability):
430
+
431
+ ``` json
432
+ {"txpk_ack":{
433
+ "error":"COLLISION_PACKET"
434
+ }}
435
+ ```
386
436
387
437
7. Revisions
388
438
-------------
389
439
440
+ ### v1.3 ###
441
+
442
+ * Added downlink feedback from gateway to server (PULL_RESP -> TX_ACK)
443
+
390
444
### v1.2 ###
391
445
392
446
* Added value of FSK bitrate for upstream.
0 commit comments