Stuart Feichtinger
8a40f42958
Updated comment
2016-01-31 16:18:45 -06:00
Stuart Feichtinger
0d8c841af5
Clean up duplicate functions
2016-01-31 15:33:58 -06:00
Stuart Feichtinger
e65f9b446e
Deleted extraneous code
2016-01-19 16:17:15 -06:00
Stuart Feichtinger
67092945e6
Removed redundant code
2016-01-19 16:10:03 -06:00
Stuart Feichtinger
cda4a5d7d4
Working
...
MUST include empty void “MQTT_connect” function declaration or will
crash with 2 publish feeds on ESP8266
2016-01-19 16:01:20 -06:00
Stuart Feichtinger
2876ac43dd
Added generic buffer
...
Crashes when publishing to more than one stream
2016-01-17 19:27:20 -06:00
ladyada
72b3ce172e
verify PUBACK for QoS 1
2016-01-10 02:21:54 -05:00
Malachi Burke
f36ec4cf85
Fixing reversal of topic/packet identifier (topic should come first)
2015-12-14 20:10:00 -08:00
Kevin Townsend
a339810b75
Disabled dtostrf on STM32F2
2015-12-03 11:56:31 +01:00
Kevin Townsend
bb7cdb5059
Added ARDUINO_STM32F2_FEATHER check
2015-12-03 11:49:10 +01:00
ladyada
0f2fd58345
right - fixed dtostrf for anything else
2015-11-11 12:50:23 -05:00
ladyada
dbc989ac1d
essentially, add Zero support by shimming in the missing functions
2015-11-11 10:22:26 -05:00
ladyada
7c2b558ee9
ping flushes input, tries multiple times
2015-10-22 13:03:55 -04:00
Todd Treece
2aed9ae737
remove defaults from mqtt constructors
2015-10-22 10:09:16 -04:00
ladyada
632c2f2cfe
back compatible ping()
2015-10-21 00:15:27 -04:00
ladyada
286245ab62
compile fix & #ifdef the MQTT version
2015-10-21 00:05:46 -04:00
Todd Treece
b48265faed
support anon auth & generated client id in constructor
2015-10-05 14:54:37 -04:00
Todd Treece
4ab72be73e
adds disconnect & disconnectPacket functions
2015-10-05 14:18:31 -04:00
Todd Treece
16da46aece
renames disconnect to disconnectServer and adds disconnectPacket
2015-10-05 14:07:49 -04:00
Todd Treece
f9ae6f3146
comment out suback for now
2015-10-05 13:46:38 -04:00
Todd Treece
921c132f92
adds missing will payload to connect packet
2015-10-05 13:41:14 -04:00
Todd Treece
e70e2367b6
only check for suback if using MQTT 3.1.1 or higher
2015-10-05 11:32:10 -04:00
Todd Treece
b9c9a28883
adds packet ids for publish QoS > 0
...
also adds packet id counter so packet ids aren't
static values. this is a step in the direction
of QoS 1 support
2015-10-05 11:21:05 -04:00
Todd Treece
765a2feaff
remove broken while loop from ping()
2015-10-05 10:38:09 -04:00
Todd Treece
0fbd734646
adds unsubscribe & unsubscribePacket functions
2015-10-05 10:33:33 -04:00
Todd Treece
476d1115e6
adds will() function
2015-10-05 09:50:57 -04:00
Todd Treece
e9e154ab52
adds will support to the connect packet
2015-10-05 09:45:27 -04:00
Todd Treece
913cce41af
adds zero byte client id option for 3.1.1
2015-10-02 17:10:16 -04:00
Todd Treece
a3925bdb6b
adds MQTT 3.1.1 connect packet changes
2015-10-02 10:45:00 -04:00
Todd Treece
a0520d3265
default to MQTT_PROTOCOL_LEVEL 4
2015-10-01 12:00:56 -04:00
Matthijs Kooijman
5d101b8a7b
Allow passing __FlashStringHelper* in addition to char* everywhere
...
Arduino supplies the F() macro that allows easily putting strings in
PROGMEM and marking them with a custom type. Essentially,
a __FlashStringHelper* is just the same char*, but cast to a different
type, which allows for example Serial.print() to automatically handle
both PROGMEM and normal strings.
By letting this library accept __FlashStringHelper* as well, you can
use easily use the F() macro and reduce the chance of mixing up normal
and PROGMEM pointers.
2015-08-02 11:51:43 +02:00
Matthijs Kooijman
22b77ecb68
Add Adafruit_MQTT_Subscribe::datalen
...
This stores the number of valid bytes in lastread. Having access to this
information allows transmitting binary data as well, containing embedded
nul bytes.
2015-08-02 11:51:43 +02:00
Matthijs Kooijman
05b145146a
Comment out stringprint(), it is not used
...
This fixes a compiler warning.
2015-07-27 20:32:38 +02:00
Matthijs Kooijman
b996b096b3
Fix Adafruit_MQTT:subscribe()
...
This method contained a loop that checked for an existing subscription,
but it only printed a debug message if so. Now, it immediately returns
true if the subscription is already registered.
When this method succesfully adds a subscription, it was documented to
return true, but the actual code did not return anything in this case,
resulting in a compiler warning. In practice, on AVR, the value of the
first argument would be returned, which likely evaluates as true, so
it is likely it actually seemed to work fine.
2015-07-27 20:32:38 +02:00
Matthijs Kooijman
564e87ff36
Fix indentation in Adafruit_MQTT::subscribe
2015-07-27 20:32:38 +02:00
Matthijs Kooijman
6879df86f6
Add Adfruit_MQTT::connectErrorString() method
...
This easily allows printing error messages without having to hard-code
return values in the sketch and makes the example sketches a bit more
concise.
2015-07-27 20:32:36 +02:00
Matthijs Kooijman
73f5be4e5c
Use const pointers for payload
...
The payload data is never modified by the library, so using const is
possible without any further changes. Using const allows using a string
literal, or String::c_str() as the payload.
2015-07-27 20:23:55 +02:00
Tony DiCola
ea7549445b
Switch back to calling dtostrf for float to string (snprintf doesn't work by design on ESP8266).
2015-06-19 01:23:29 -07:00
Tony DiCola
6a740d4004
Cleanup and prepare for publishing.
2015-06-10 15:38:34 -07:00
Tony DiCola
d7a6433b81
Add Adafruit_MQTT_Client class that implements MQTT code for generic Arduino client. Add ESP8266 example using new MQTT client class. Fix bugs with using library on ESP8266 (move CC3000 to header-only class).
2015-06-08 01:48:25 -07:00
Tony DiCola
2fa9804b48
Merge cleanup changes and update README todo.
2015-06-05 13:10:22 -07:00
Tony DiCola
ac74ef4fd6
Refactor Adafruit_MQTT to have a simple interface for packet sending & receiving that subclasses implement.
2015-06-04 21:16:08 -07:00
ladyada
0152ac91cb
woooo
2015-06-02 18:33:03 -04:00
ladyada
7c5113e32e
more flash memory, pingreq debugging, etc.
2015-06-02 15:23:42 -04:00
ladyada
6a3b6132d9
fixed user/client/password mixup
2015-06-01 22:51:59 -04:00
ladyada
fa63c335a5
string friend, made client optional
2015-05-31 23:56:27 -04:00
ladyada
495f2cddd5
Merge branch 'master' of github.com:adafruit/Adafruit_MQTT_Library
...
Conflicts:
Adafruit_MQTT.h
2015-05-31 23:21:00 -04:00
ladyada
1a0e611e01
publish works (QoS 0)
2015-05-31 23:19:13 -04:00
Todd Treece
e7b8ee0797
adds client id to connect
2015-05-31 21:07:17 -04:00
Todd Treece
1bcef195f1
MQIdsp -> MQIsdp
2015-05-31 20:16:05 -04:00
ladyada
16123f9d04
connections working
2015-05-31 18:38:33 -04:00