How do TTN handlers know which port and data format to use for a Downlink message?

Hello all,

I am interesting on sending a message back to my motes, so the downlink; I was wondering how the TTN handlers know what port to use in order to perform such as action, or if it is not the responsible for such an action who is and how does that.
![](TTN handlers)](http://staging.thethingsnetwork.org/wiki/forum/uploads/TTN-Backend-Components.png)

I am interesting on knowing it since if I have my own application (A) connected to the Handler, I would be interested to see the format in which I should push that data, wiki says that it is like below

{ "payload": "SGVsbG8gd29ybGQK",
  "port": 1,
  "ttl": "1h" }

But should I wrap it with something more? Like for instance the device DevEUI . Is it possible to do the same with the old TTN back-end?

Thanks in advance!

Regards!

This port is the FPort of LoRaWAN. You will be able to set this in the MQTT payload, but this is not implemented yet, and the backend will always use FPort 1.

Just push it to the correct device topic: <AppEUI>/devices/<DevEUI>/down.

No.

Hi @htdvisser, thanks for replying!!

OK that is clear

In such as case I have to make my app just talk to MQTT (broker) as wiki explains now and not to the handler?

thanks again!

Just to have it crystal clear, with the old TTN back-end was not possible at all to use the downlink? I thought it was using ttnclt

thanks again

The new back-end uses ttnctl, the old back-end does not and, as @htdvisser stated, it does not support downlink.

1 Like

Hi all. Any update about downlink support?

Downlink works for staging. Check the wiki for documentation. It will not work for the old API and will not be implemented, the old API is scheduled to be retired soon.

BTW, don’t ask the same question in multiple threads.

Thanks for your reply. Sorry for the duplicate, but I found the other thread afer this one…