Questions tagged [mqttnet]
78 questions
0
votes
0 answers
MQTTNet: How to change value in topic for active client?
I have a device that has a built-in mqtt client that subscribes to a broker server and displays topic 0 or 1;
0 - disabled;
1 - enabled;
MQTT Broker (ASP.NET WEB API) .Net 6
BUILDER
var optionBuilder = new MqttServerOptionsBuilder()
…

itprodavets
- 69
- 3
- 9
0
votes
0 answers
Why UseApplicationMessageReceivedHandler doesn't work for ManagedClient? MQTTnet C#
When I run my program, everything is fine. However, this function doesn't execute anything. Starting from the line "this.Client.UseApplicationMessageReceivedHandler(e =>", the thing doesn't work. I wonder does UseApplicationMessageReceivedHandler…

chelsea
- 21
- 3
0
votes
1 answer
How do you print MQTT messages to the console?
I have a very simple C# command line app that connects to an MQTT server and prints messages to the console.
using MQTTnet;
using MQTTnet.Client.Options;
using MQTTnet.Extensions.ManagedClient;
using System.Text;
var options = new…

nate-thegrate
- 378
- 2
- 13
0
votes
0 answers
MQTTnet can't support sha256ECDSA (ECC 521 Bit) crypto TLS?
I am using MQTTnet to connect MQTT broker with TLS
Broker's company said we use mosquitto broker and will provide client with ca.crt file to connect our broker
So we use only ca.crt(CA certificate) file to connect broker
public async Task…

이지수
- 1
0
votes
1 answer
MQTTnet getting Topic names of Topics you are subscribed to
Is there an option for getting Topics that the client is currently subscribed to? I'm currently saving all this data locally in client app DB, but I think that just add the unnecessary difficulty to my application and introduces some bugs (if the…

Simas Paškauskas
- 433
- 8
- 20
0
votes
0 answers
Xamarin.Android Mqtt Client with TLS Unauthorized result
I'm basically new to mobile development and stuck for a few weeks because,
I am unable to connect XAMARIN Android app with MQTTT over TLS.
Maybe i am using the wrong library or is it an Xamarin error?
My certificate is a .crt file from…

Pearl
- 39
- 7
0
votes
0 answers
How to use client certificate and key with MQTTnet?
I would like to replicate this Python code sample with MQTTnet.
client = mqtt.Client(str(uuid4()))
current = dirname(__file__)
cerfile = join(current, "rcm_certchain_pem.cer")
keyfile = join(current, "rcm_pem_privkey.pkcs8")
context =…

0lan
- 179
- 1
- 14
0
votes
0 answers
MQTTNet Connection.Async() MqttCommunicationTimedOutException
I am trying to initiate a simple codebase to test MQTTNet's library implementation of its subscriber & publisher code using the local mosquito broker, and subsequently, through HiveMQ's WebSocket.
For now, these codes are within a C# Console…

Ajax
- 33
- 5
0
votes
0 answers
Close Connection Message MQTTNet C#
I am using the MQTTNet library for the MQTT connection in my application. I am using Mosquitto Broker as a MQTT broker. My app is in .Net core 3.1.
I am having requirement to send the MQTT message to device when the app is connected, normal…

John
- 351
- 4
- 16
0
votes
1 answer
How to connect mqtt with websocket in c#?
I tried use MQTTnet to connect mqtt.
But seems not worked, it would show the error message:
Unable to connect the remote server, the request was aborted: Could not create SSL/TLS secure channel.
I also found error message on windows event:
A fatal…

EvaHHHH
- 293
- 3
- 16
0
votes
1 answer
LWT with user properties (timestamp): disconnect ungracefully
MQTT newbie here
Developing on .NET with MqttNet library for EMQX broker:
I am using MQTTv5 feature 'user properties' to add a timestamp to my messages when published. That is working flawlessly.
However, I need to stamp the LWT messages too.
In my…

Master Azazel
- 612
- 1
- 12
- 32
0
votes
1 answer
MQTTnet Nuget to AWS IoT using CA Root, Client Certificate and Client Key files
I am going to simply connect to AWS using MQTTnet.MqttClient and know the library does not support these 3 files separately so I first create a .pfx file from Client Certificate and Client Key.
Then I send .pfx + CA Root file to the server using…

Parda
- 31
- 5
0
votes
0 answers
How to notify MQTT subscriber's if publisher goes offline?
I'm working on the application where I want to get notified when the publisher of the topic goes offline. I'm using setInterval() for sending the ping-pong every 2sec and using timeOut(8sec) for checking if pong received,but it not working as…

Meghraj Deshmukh
- 1
- 1
- 2
0
votes
1 answer
EF Core - adding range - possible duplicate
I have a service that posts data to web-server (asp.net core 3.1) each second that I store to a sql server using EF Core 3.1.
Up til now I have, when trying to store new data, for each new data row separately:
Checked if data entity exist in…

Erik Thysell
- 1,160
- 1
- 14
- 31
0
votes
0 answers
Are there synchronous versions of the MQTTnet client methods?
I'm using the MQTTnet client in a console app. In my use case it seems like I do not need asynchrouns execution and I'd like to ease design by using synchronous execution. However in case I'd have to switch to an asynchrous design I'd like to…

thinwybk
- 4,193
- 2
- 40
- 76