XDK workbench 3.4.0
Antwort
27.09.18 20:03

Just installed Workbench 3.4.0 , then modiefied wifi info and tried to flash the XDK with project "SendDataOverMQTT".

 

But I get the "Flash Information Dialog" message saying: "Flashing selected project aborted due to compilation problem.

 

I noticed a few lines in the console saying "undefined reference to xQueueGenericCreateStatic" and "undefined reference to xTaskCreateStatic"

XDK has S/N 17-01942 and bootloader Version 1.1.0

0 (0 Stimmen)
RE: XDK workbench 3.4.0
Antwort
27.09.18 21:13 als Antwort auf Lars Andersson.

Found another post suggesting clean and build, and that helped.

 

My next problem is that my MQTT broker requires a username and password , in addition to client ID when connecting, and I'm not clear on how I would add that?

0 (0 Stimmen)
RE: XDK workbench 3.4.0
Antwort
28.09.18 12:33 als Antwort auf Lars Andersson.
Hello Lars,

I am glad to hear that you were able to solve the issue regarding the error Flashing selected project aborted due to compilation problem .
Unfortunately, the interface XDK_MQTT.h , which is used by the SendDataOverMQTT example does not integrate the functionality to add a username and password.

For that, you would need to use the underlaying interface Serval_Mqtt.h , which integrates both in the struct MqttSession_T . You can find the interface, by navingating to it over the following folderpath:

SDK > xdk110 > Libraries > ServalStack > 3rd-party > ServalStack > api

However, this requires a manual implementation of the MQTT functionality over the interface Serval_Mqtt.h . A good starting point would be to use the Full Code Example from the XDK Knowledge Base . There you simple need to register an account and then navigate to the MQTT article under the Protocols slider in the left bar.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: XDK workbench 3.4.0
Antwort
28.09.18 15:30 als Antwort auf Franjo Stjepandic.

Franjo, thanks for that link. I registered and is looking at the sample code now.

2 things:

1.Would I just declare usernam and  password on line 42 and the add these on line 176?

2.So far I have only imported the sample projects luisted in the XDK workbench welcome page, so how would I utilize the sample script?

0 (0 Stimmen)
RE: XDK workbench 3.4.0
Antwort
01.10.18 14:48 als Antwort auf Lars Andersson.
Hello Lars,

I assume you are referring to using a define such as #define "username" to declare the username and password. Am I right so far? If I am, then you can, of course, use this approach.

Furthermore, these credentials need to be configured in the function configSetConnectData() instead of configSetTarget() in the same manor as for the clientID parameter.

In regards to your other question, unfortunately, configuring username and password can currently not be achieved with the XDK_MQTT.h API. For that, you need to use the Serval_MQTT.h API. As such, you would need to exchange the complete XDK_MQTT.h MQTT implementation from the example you are using with the Serval_Mqtt.h implementation.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)