How to get downlink communication?

I mean that I have successfully enabled the gateway to transmit the uplink to the network server. Next, I want to receive some downlink. Can anyone provide a detailed tutorial?

Which part do you want a detailed tutorial for?

Downlinks can be sent via the web console - you literally enter the bytes you want to send and click Send.

Or do you mean the code for the device - for which we’ll need to know what software you are using.

Sorry, I’m a complete novice.

I think downlink refers to the message that the server automatically returns to the device after the device sends information to the server through the gateway.

Do you mean that it is possible to send the desired message directly from the server to the device?

A downlink is a message from you via the server to the device. There is nothing automatic about it.

Due to the impact on other devices in the area which can’t be heard when whilst the gateway is transmitting, please use downlinks sparingly. They are not guaranteed to arrive and they may not arrive on the schedule you think.

Can you describe again what you are trying to achieve please. Don’t use downlink or uplink, just describe where the data starts, what it moves through and where you want it to stop.

I hope to see the Downstream JSON data structure described in the Semetch packet forward PROTOCOL:

{"txpk":{
	"imme":true,
	"freq":864.123456,
	"rfch":0,
	"powe":14,
	"modu":"LORA",
	"datr":"SF11BW125",
	"codr":"4/6",
	"ipol":false,
	"size":32,
	"data":"H3P3N2i9qc4yt7rK7ldqoeCVJGBybzPY5h1Dd7P7p8v"
}}

How does this work.

For a novice this seems like you are getting in to low level details. You can see that sort of information in the gateway logs if you dig around but again, it’s not clear why. The gateway sends uplink information to the network server which validates & decrypts and then passes it on to an application server for further decryption and processing. It works in reverse for downlinks. There is some useful information in this data structure, but due to the encryption you won’t know which device’s downlink that it is for.

To use LoRaWAN, we configure the gateways, use the network & application servers and make purposeful use of the data that comes out the other end - either in a dashboard or a custom app. Occasionally we may send a downlink and again, we leave the infrastructure to get on with it. So we tend not to get too tied up with the internals unless we are building our own gateways or servers or having to do some debugging.

So to answer what seems a very vague question, you may be able to see the information in your gateway logs. The why & how of its working is well documented in the Semtech documentation that you linked to and to the LoRaWAN specification.

1 Like

QQ截图20201128213818
Thank you for your answer.

My question is very intuitive.

When I view gateway traffic in the TTN console, I can only see the data of uplink, but never the data of downlink. Therefore, I ask how to generate the data of downlink that can be viewed here.

In other words, under normal circumstances,whether uplink and downlink must appear at the same time? if so, I must have something wrong here.

This was answered right at the beginning:

That’s not other words, that’s a different question - downlinks will appear here when you create one for sending if the gateway is chosen to be the sender - TTN will chose the best gateway to send a downlink.

Maybe you should explore the web console more - you’ll find all sorts of facilities. And read more of the docs https://www.thethingsnetwork.org/docs/ to fill in the fundamentals.

2 Likes

Thanks a lot. I will do that!

Downlinks are supposed to be very rare.

A few are automatically generated, for example join accept messages for an OTAA node, certain channel configuration messages, and very infrequently ADR responses.

Some are commanded, such as when you enter one in the web console or use an available API.

But downlinks are supposed to be rare - maximum a few a day per node, so most of the time when you look, you should not be able to see one in the live traffic view.

1 Like

I have a small problem. The node device I am using is not registed to the TTN through ABP or OTAA.

It only sends uplink data to the gateway that has successfully connected to TTN, and the gateway can receive uplink data and transmit it to TTN.

However, if the device is not connected to the network in the application, is it impossible to receive downlink data at all? If so, I need to register the device first.

There is a limit to our ability to help unravel such muddles. I really think you need to go back to basics. Read all of:

https://www.thethingsnetwork.org/docs/lorawan/
The devices section of: https://www.thethingsnetwork.org/docs/devices/
The gateways section of: https://www.thethingsnetwork.org/docs/gateways/
The network section of: https://www.thethingsnetwork.org/docs/network/
The applications and API sections of: https://www.thethingsnetwork.org/docs/applications/

I’m verry sorry. :pensive:

Don’t be sorry, it’s just about knowing enough to make progress, just read a little more and you’ll understand more for important concepts like having a device registered on TTN - the gateway may hear the uplink, but won’t relay it on but certainly won’t be able to process a downlink as there won’t be a device to tell to downlink.

1 Like

For a device to be used with TTN you need to register it as part of an application. If you don’t the gateway will receive data and send it to the back-end, but the back-end does not know what to do with the data and discards it. Once your device is registered the data will be forwarded to the application and can be accessed (at time it arrives, not later) with mqtt or forwarded to one of the integrations.

2 Likes