Does any one know how to publish a message to the TTN using the code below:
var ttn = require(‘ttn’);
var appEUI = ‘xxxxxxxxxx’;
var accessKey = ‘********************************************’;
var client = new ttn.Client(‘staging.thethingsnetwork.org’, appEUI, accessKey);
client.on(‘uplink’, function (msg) {
console.log(‘Received message’, msg);
});
client.on(‘activation’, function (msg) {
console.log(‘Device activated:’, msg.devEUI);
});
@MikeAski: ok, now I see why you said you didn’t find a definitive answer to whether downlink is supported or not. So, to clarify a bit more: downlink is supported as of today, support is limited to Class A devices.
payload(PayloadArray | PayloadRaw | String | PayloadFields) The raw payload as a Buffer, an Array of numbers, a hex string or an object of payload fields.