Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Embedded MQTT C Client

The CC3200 code relies on the SimpleLink libraries provided by TI. I'm not familiar with the Spark Core but it looks like it's designed to be similar to the arduino in terms of IDE and libraries. It will almost certainly be easier to port the arduino embedded C++ library. If you look in the repo at the moment under arduino there is EthernetStack.h and WifiIPStack.h, these provide the implementation specifics for the Ethernet or WifiShield on an arduino. Looking at the Spark site there seem to be most of the equivalent functions (.connect() .available() .write()) under TCPClient, although it doesn't seem to have a readBytes() so you'd have to use a loop to read() a byte at a time into the buffer. The current Countdown.h in the arduino directory should work as is as it only uses millis() which also seems to be on the spark core.

Al

On 22/09/14 16:44, Guy Dillen wrote:
Hi Al,

Thanks.
Besides the TI CC3200 I also would like porting/using the library with my Spark Core's (www.spark.io) based on that are based on the ARM cortex M3 microprocessor. I suppose, since I'm no expert C developer, can I use the same source code as for the CC3200? Any help/suggestions welcome.

Thanks.
Guy

Sent from my iPad

On 22 Sep 2014, at 17:13, Al Stockdill-Mander <asm@xxxxxxxx> wrote:

Guy,

Copy the MQTTClient.c/h and MQTTCC3200.c/h files to wherever is suitable for the app you're working on. You only need to import the MQTTClient.h, but you have to edit MQTTClient.h to #include the platform specific implementation it is to use. Currently there is only the CC3200 code, so add a #import "MQTTCC3200.h" to the end of the #includes in MQTTClient.h
I realise that there is a distinct lack of documentation/samples for the C specific embedded client, I'll try and get something up asap. In the mean time please ask any other questions here and I'll do what I can to help.

Al

On 22/09/14 14:56, Guy Dillen wrote:
Hi,

I mentioned the embedded C implementation has a specific C (and even
more specific) CC3200 implementation.
I’m confused as what sources to use; in the example form Benjamin Cabé
all source code under MQTTPacket was imported in the CC3200
microcontroller project. Should I still import these sources or only the
sources under
org.eclipse.paho.mqtt.embedded-c-master -> MQTTClient-C -> cc3200 ->
MQTTCC3200.c and MQTTCC3200.h?

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
_______________________________________________
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



Back to the top