![Kiwi TLG8411V1 Скачать руководство пользователя страница 43](http://html.mh-extra.com/html/kiwi/tlg8411v1/tlg8411v1_user-manual_1974255043.webp)
Gateway TLG8411V1 User Manual V1.0.0
42
July 2020
At first, dragging
inject
,
function
,
debug
and
lora
(from output) to
Flow 1
and connecting
these nodes as Figure 4-9. Then, a dialog, Figure 4-10, pops up by double-clicking
inject
node. Choose string type and fill string in
Payload
field.
Figure 4-10 Edit Inject Node
Next step is double-clicking
function
node and input following JavaScript code in the node,
as shown in Figure 4-11. Then, deploy this flow and clicking left part of
inject
node triggers a
packet sent out each time.
var send_string = new Buffer(msg.payload).toString('Base64');
var send_json = '{' +
'"imme":true, ' +
'"freq": 915.5, ' +
'"rfch": 0, ' +
'"powe": 14, ' +
'"modu": "LORA", ' +
'"datr": "SF11BW125", ' +
'"codr": "4/6", ' +
'"ipol": false, ' +
'"size": ' + msg.payload. ', ' +
'"data": "' + send_ '"' +
'}';
msg.payload = send_json;
return msg;
Содержание TLG8411V1
Страница 1: ...Gateway TLG8411V1 User Manual V1 0 0 July 2020 ...
Страница 36: ...Gateway TLG8411V1 User Manual V1 0 0 35 July 2020 Figure 4 2 Execution of Parsing LoRaWAN Packet in LoRaScript ...
Страница 52: ...Gateway TLG8411V1 User Manual V1 0 0 51 July 2020 8 Revisions 8 1 V1 0 0 First Release Version ...