Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Eclipse Paho - Arduino Client

Guy,

I created an MQTTClient sub-directory of libraries in the WaspMote IDE workspace, and was able to build from there.  I copied the source of the Hello example into a new sketch and built it (after modifications), but only a skeleton that won't work.

It won't work out of the box because:

1) The Countdown class needs to be ported to the Waspmote.  The Arduino version uses the millis() function which could not be found here.

2) The EthernetClient class needs to be replaced with an implementation for the Waspmote wireless API.

3) The Arduino example needs to be changed for the Waspmote because it uses the Serial.print() method which could not be found after I commented out the Arduino system headers.  This could be as simple as including the correct header.

The classes in 1) and 2) are intended to be replaced as needed by platform dependent implementations.   The core code in MQTTClient.h should never change, although in this case I needed to add an include for <string.h> so that memcpy could be found.

Ian

On 02/16/2015 11:23 AM, Guy Dillen wrote:
Ian,

Indeed there’s no add library whatsoever in the menu. The way to add external libraries is:

"To install a third-party library: Libraries are often distributed as a ZIP file or folder. The name of the folder is the name of the library. Inside the folder will be a .cpp file, a .h file and often a keywords.txt file, examples folder, and other files required by the library. To install the library, first quit the Waspmote IDE. Then uncompress the ZIP file containing the library. It should contain a folder called MyLibrary, with files like MyLibrary.cpp and MyLibrary.h inside. If the .cpp and .h files aren’t in a folder, you’ll need to create one. In this case, you’d make a folder called “MyLibrary”. Drag the MyLibrary folder into the IDE libraries folder. There may be more files than just the .cpp and .h files, just make sure they’re all there. Restart the IDE. Make sure the new library appears in the Sketch → Import Library menu item. "

Thanks.
Guy

From: Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>
Reply-To: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Date: Monday 16 February 2015 12:09
To: <paho-dev@xxxxxxxxxxx>
Subject: Re: [paho-dev] Eclipse Paho - Arduino Client

Guy,

I had a quick look, seems like the Waspmote IDE doesn't have the "import external library" function.  I'll see if I can get it to work later.

Ian

On 02/14/2015 01:15 PM, Guy Dillen wrote:
Hi,

I would like using the Arduino Paho client with Waspmote (IDE). Using third-party libraries with the IDE expects a “MQTTClient.h" and “MQTTClient.cpp". Since all files in the Arduino Paho client have the “c" extension and (if i’m right) “MQTTClient.h" contains the headers as well as the implementation I’m looking for a suggestion how to create the needed “MQTTClient.h" and “MQTTClient.cpp" files?

Thanks.
Guy



_______________________________________________
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

_______________________________________________ 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


_______________________________________________
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


Back to the top