the downlink doesnt recieve by device, but on portal
image
1452×707 15.6 KB
recieves well,
what should be mistake?
and Multicast
need to make MQTT with C# application
here is my code sample but somethings wrong, can you assist me to fix it?
using MQTTnet;
using MQTTnet.Client;
using MQTTnet.Client.Options;
using System.Text;
using System.Threading.Tasks;
public class Program
public static async Task Main(string[] args)
// MQTT client oluştur
var factory = new MqttFactory();
var mqttClient = factory.CreateMqttClient();
// MQTT client ayarları
var options = new MqttClientOptionsBuilder()
.WithClientId("YourClientId")
.WithTcpServer("YourMqttBrokerAddress", 1883) // Port numarası genellikle 1883'tür
.WithCredentials("YourUsername", "YourPassword")
.WithCleanSession()
.Build();
// MQTT client'ı bağla
await mqttClient.ConnectAsync(options);
// Downlink mesajını oluştur
var downlinkMessage = new
confirmed = true, // Onaylanmış downlink mesajı mı?
fPort = 1, // FPort değeri
data = "SGVsbG8gd29ybGQ=" // Base64 formatında veri ("Hello world" örneği)
// Downlink mesajını JSON'a çevir
var downlinkMessageJson = JsonConvert.SerializeObject(downlinkMessage);
// Downlink mesajını MQTT mesajına çevir
var message = new MqttApplicationMessageBuilder()
.WithTopic("application/{APPLICATION_ID}/device/{DEV_EUI}/command/down") // Uygulama ID'si ve cihaz EUI'si ile konuyu değiştirin
.WithPayload(downlinkMessageJson)
.WithExactlyOnceQoS()
.WithRetainFlag()
.Build();
// Downlink mesajını gönder
await mqttClient.PublishAsync(message);
Thanks
brocaar:
I’m not 100% sure what you mean with this. By showing a screenshot of an empty queue, you mean it was sent by ChirpStack but not received by the device?
That’s totally true, i send from also hex data, its totally works fine but with mqtt application, it not got recieve from device, maybe i am missing some querry or url?
Hi all,
I used to schedule a downlink by publishing into MQTT in V3 and it worked well.
Topic: application/1234/device/aXXXX41c161832b12/command/down
Data: {"fPort":2,"confirmed":true,"object":{"method":"setAL2Value","id":0,"params":true}}
However, in V4, publishing into the topic doesnt work any more.
The documentation seems no change compared to V3:
MQTT - ChirpStack open-source LoRaWAN® Network Server documentation
There is no queue at Application > Device.
And the gateway doesn’t recei…
i didnt use deveui at payload json, problem may acquire becaause of that?
I believe I am having the same issue. Downlink data is sent just fine if done via the chirpstack web ui (hex,base64,and json) but if published as an MQTT message it is never sent to the end device nor does it ever show in the queue in the web ui.
My chirpstack.toml has the topic for downlink set as " command_topic=“application/{{application_id}}/device/{{dev_eui}}/command/{{command}}” ". However even changing {{command}} to “down” to make sure I know its listening on the right topic does nothing.