Jan,
Paolo started a new job recently, which will have impacted his
ability to answer questions. I'll try.
Are all your builds in SharpDevelop, or have you tried Visual Studio
as well? Did you build the M2MQTT library you are using, or did you
download it?
A MsgID value of 1 in itself, in MQTT, would not indicate an error.
What MQTT server are you using? Are there any log messages on it
that might indicate what is going on?
Ian
On 04/12/2016 11:30 AM, Jan Willem
Teunisse wrote:
A
kindly request to this group: is there somebody available with C#
knowledge of the M2Mqtt library and who can answer my questions,
which I sent last week to this group?
At present I could build and run the prototype C# program without
runtime errors, but I get a MSgID of value 1 and my Groovy
subscriber did not recieve the topic and Payload message.
What does the value 1 of the MsgID means?
With best regards,
Jan Willem
------------------------------ previous email ----------------
Hallo Paolo and pah-dev group,
On March, the 29th I sent you, Paolo, an email with some questions
about C# M2Mqtt client library in order to make a start with a
case study on the subject of using the M2Mqtt library in a
Winbatch script on a Windows 10 pro (64) environment. A couple
days later I also joined the paho-dev mailing group following an
advice form Dominik of HiveMQ.
unfortunately I did not get any answers on both emails.
In the meantime I started to develop as a first step a sample C#
program in order to get familiar with the library in publishing a
payload message, see the attached program.cs file.
When I build the program.cs in sharpDeveloper, I get the following
errors, which are in Dutch.
<code>
Build started.
Warning MSB3247: conflicten gevonden tussen verschillende versies
van dezelfde afhankelijke assembly.
Compiling m2mqttPubMsg
D:\Ontwikkelomgeving\C#_mono\m2mqttPubMsg\m2mqttPubMsg\Program.cs(48,4)
: Error CS0012: Het type System.Object wordt gedefinieerd in een
assembly waarnaar niet wordt verwezen. U moet een verwijzing naar
de assembly System.Runtime, Version=4.0.10.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a toevoegen.
D:\Ontwikkelomgeving\C#_mono\m2mqttPubMsg\m2mqttPubMsg\Program.cs(53,4)
: Error CS0012: Het type System.MulticastDelegate wordt
gedefinieerd in een assembly waarnaar niet wordt verwezen. U moet
een verwijzing naar de assembly System.Runtime, Version=4.0.10.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a toevoegen.
D:\Ontwikkelomgeving\C#_mono\m2mqttPubMsg\m2mqttPubMsg\Program.cs(53,31)
: Error CS0103: De naam client_MqttMsgPublished bestaat niet in de
huidige context
D:\Ontwikkelomgeving\C#_mono\m2mqttPubMsg\m2mqttPubMsg\Program.cs(56,31)
: Error CS0103: De naam MqttMsgBase bestaat niet in de huidige
context
Build failed. (00:00:00.7828545)
</code>
The warning is about differences in reference to the used
assemblies in M2Mqtt.WinRT.dll. The tool AsmSpy gives the
differences as:
<code>
Reference: System.Runtime
4.0.10.0 by M2Mqtt.WinRT
4.0.0.0 by M2Mqtt.WinRT
Reference: System.Collections
4.0.0.0 by M2Mqtt.WinRT
Reference: System.Threading
4.0.0.0 by M2Mqtt.WinRT
Reference: Windows
255.255.255.255 by M2Mqtt.WinRT
Reference: System.Text.Encoding
4.0.0.0 by M2Mqtt.WinRT
Reference: System.Runtime.Extensions
4.0.0.0 by M2Mqtt.WinRT
Reference: System.Threading.Tasks
4.0.0.0 by M2Mqtt.WinRT
Reference: System.Runtime.WindowsRuntime
4.0.10.0 by M2Mqtt.WinRT
</code>
How can I resolve this warning and the related errors?
Any tips or suggestions?
Thanks in advance,
Beste regards, from the Netherlands,
Jan Willem Teunisse
------------------- previous email29-3-2016 ------------------
Ciao Paolo,
Last week I read your nice and clear article about the MQTT Client
library (M2Mqtt) and liked to try it for my domotica IoT project.
I installed yesterday using Nuget the M2Mqtt dotnet library
package on my windows10 development PC in order to publish a MQTT
message using a Winbatch script.
Winbatch support dotnet assemblies. The M2Mqtt package is
installed in the Winbatch script directory using “nuget install
M2Mqtt -o D:\Winbatch\Ontw”
After installing the M2Mqtt package I saw 6 subdirectories in the
d:\Winbatch\Ontw\M2Mqtt.4.3.0.0\lib\ directory. All containing
different DLLs.
I’m now confused which DLL I have to take to get the
uPLibrary.Networking.M2Mqtt namespace and to define the object new
MqttClient.
Maybe you can help me out, as I need some suggestions or advice
to proceed from here on to get things working.
Beste regards, from the Netherlands,
Jan Willem Teunisse
P.S. I also posted a comment on the blog of the above mentioned
article, Dominik advices me to contact you more or less directly.
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto
|