Hello,
For testing I have created a small TTN network using a Mikrotik wAP LoRA8 Kit gateway and an application in which I have a LoRAWAN modul that I'm controlling by AT commands.
The Node Red project I am using for testing in what you can see in the image:
When I send an uplink message I receive it well in the Debug window of the Node Red.
When I send a downlink message (just 3 bytes: 0x11 0x22 0x33) to the device, I can see that the Gateway receives the data, but this data is not forwarded to the application and neither the device. In the function node I have written the next:
return {
"end_device_ids":{
"device_id": "eui-70b3d57ed005629d",
"application_ids": {
"application_id": "rfm6601-test-1"
},
"dev_eui": "70B3D57ED005629D",
"join_eui": "323531322F002E00",
"dev_addr": "260B7D71"
},
"payload": {
"downlinks": [{
"f_port": 15,
"frm_payload": msg.payload.toString("base64"),
"priority": "NORMAL"
}]
}
}
When I downlink the message, the debug window shows the next:
msg.payload : Object
object
downlinks: array[1]
0: object
f_port: 15
frm_payload: "17,34,51"
priority: "NORMAL"
The euis and IDs are the same than those I receive when I uplink data to the Node Red MQTT node.
Please, may you help me in developing the right function to get the message arrives to the end device in the TTN network? Excuse me if I have limited knowledge on this and this could be more a sintaxis issue.
Thank you very much in advance for your help.
Regards,
Joel