
Gateway TLG8411V1 User Manual V1.0.0
38
July 2020
udp_sock.send(recv_data, 0, recv_data.length, server_port,
server_ip, function(err, bytes) {
if (err) throw err;
debug_print('UDP message sent to ' + ser':'+ server_port);
});
}
function beacon () {
if (update_cmd == true) {
debug_print("Send beacon with cmd");
beacon_pkt[3] = cmd_node_address;
beacon_pkt[4] = cmd_node_data;
update_cmd = false;
} else {
debug_print("Send beacon");
beacon_pkt[3] = 0;
beacon_pkt[4] = 0;
}
beacon_pkt[2] = 0x11; //beacon cmd
beacon_channel.data = new Buffer(beacon_pkt).toString('base64');
send_pkt(JSON.stringify(beacon_channel));
beacon_pkt[1]++;
}