14 bool set(String key, String value);
44 bool setSSID(
const String &value);
52 bool setTopic(uint8_t index, String topic);
119 bool begin(Stream &s,
int event = -1,
int wake = -1,
int reset = -1,
bool debug =
false);
121 bool cmd(String command);
125 bool connect(
bool async =
false);
132 bool sleep(uint32_t duration, uint8_t sleep_mode = 0);
136 bool subscribe(uint8_t topic_index, String topic_name);
138 bool get(uint8_t topic_index = -1);
139 bool send(uint8_t topic_index, String message);
140 bool publish(uint8_t topic_index, String message);
145 bool otaSeek(uint32_t address = -1);
153 bool shadowUpdate(String new_state, uint8_t index = -1);
165 String
readLine(uint32_t count = 1);
182 void escape(String &value);
Definition: ExpressLink.h:9
bool setCustomName(const String &value)
equivalent to: AT+CONF CustomName={value}
Definition: ExpressLink.cpp:71
bool setShadow(uint8_t index, String topic)
String getCustomName()
equivalent to: AT+CONF? CustomName
Definition: ExpressLink.cpp:62
bool setSSID(const String &value)
equivalent to: AT+CONF SSID={value}
Definition: ExpressLink.cpp:154
bool setAPN(const String &value)
String getAbout()
equivalent to: AT+CONF? About
Definition: ExpressLink.cpp:21
bool setOTAcertificate(const String &value)
bool setShadowToken(const String &value)
String getHOTAcertificate()
equivalent to: AT+CONF? HOTAcertificate pem
Definition: ExpressLink.cpp:127
String getCertificate()
equivalent to: AT+CONF? Certificate pem
Definition: ExpressLink.cpp:53
bool setTopic(uint8_t index, String topic)
Definition: ExpressLink.cpp:14
String getShadow(uint8_t index)
String getRootCA()
equivalent to: AT+CONF? Endpoint pem
Definition: ExpressLink.cpp:94
String getVersion()
equivalent to: AT+CONF? Version
Definition: ExpressLink.cpp:29
bool setHOTAcertificate(const String &value)
bool set(String key, String value)
bool setRootCA(const String &value)
equivalent to: AT+CONF RootCA={value}
Definition: ExpressLink.cpp:104
String getThingName()
equivalent to: AT+CONF? ThingName
Definition: ExpressLink.cpp:45
String getTopic(uint8_t index)
Definition: ExpressLink.cpp:8
bool setPassphrase(const String &value)
equivalent to: AT+CONF Passphrase={value}
Definition: ExpressLink.cpp:162
uint32_t getDefenderPeriod()
equivalent to: AT+CONF? DefenderPeriod
Definition: ExpressLink.cpp:119
String getAPN()
equivalent to: AT+CONF? APN
Definition: ExpressLink.cpp:169
bool setEndpoint(const String &value)
equivalent to: AT+CONF Endpoin={value}
Definition: ExpressLink.cpp:87
bool setDefenderPeriod(const uint32_t value)
ExpressLinkConfig(ExpressLink &el)
Definition: ExpressLink.cpp:3
String getSSID()
equivalent to: AT+CONF? SSID
Definition: ExpressLink.cpp:145
String getTechSpec()
equivalent to: AT+CONF? TechSpec
Definition: ExpressLink.cpp:37
String getShadowToken()
equivalent to: AT+CONF? ShadowToken
Definition: ExpressLink.cpp:111
String getEndpoint()
equivalent to: AT+CONF? Endpoint
Definition: ExpressLink.cpp:78
String getOTAcertificate()
equivalent to: AT+CONF? OTAcertificate pem
Definition: ExpressLink.cpp:136
Definition: ExpressLink.h:62
bool otaSeek(uint32_t address=-1)
Moves the read pointer to an absolute address.
Definition: ExpressLink.cpp:545
bool shadowUnsubscribe(uint8_t index=-1)
Unsubscribe from a device shadow document.
Definition: ExpressLink.cpp:655
bool shadowGetDoc(uint8_t index=-1)
Retrieve a device shadow document.
Definition: ExpressLink.cpp:611
String response
Definition: ExpressLink.h:166
static const uint32_t BAUDRATE
The default UART configuration shall be 115200, 8, N, 1 (baud rate: 115200; data bits: 8; parity: non...
Definition: ExpressLink.h:174
Event getEvent(bool checkPin=true)
Gets the next pending Event, if available.
Definition: ExpressLink.cpp:397
void passthrough(Stream *destination)
Enters Serial/UART passthrough mode. All serial communication is bridged between the ExpressLink UART...
Definition: ExpressLink.cpp:697
bool shadowGetDelta(uint8_t index=-1)
Retrieve a Shadow Delta message.
Definition: ExpressLink.cpp:666
bool otaClose()
The host OTA operation is completed.
Definition: ExpressLink.cpp:570
bool otaAccept()
Allow the OTA operation to proceed.
Definition: ExpressLink.cpp:523
bool isConnected()
equivalent to: AT+CONNECT? and parsing the response for CONNECTED/DISCONNECTED
Definition: ExpressLink.cpp:357
OTAState otaGetState()
Fetches the current state of the OTA process.
Definition: ExpressLink.cpp:503
uint32_t additionalLines
Definition: ExpressLink.h:168
bool unsubscribe(uint8_t topic_index)
Unsubscribe from Topic#.
Definition: ExpressLink.cpp:464
bool shadowUpdate(String new_state, uint8_t index=-1)
Request a device shadow document update.
Definition: ExpressLink.cpp:622
bool shadowInit(uint8_t index=-1)
Initialize communication with the Device Shadow service.
Definition: ExpressLink.cpp:589
bool publish(uint8_t topic_index, String message)
Publish msg on a topic selected from topic list.
Definition: ExpressLink.cpp:494
ExpressLink(void)
Definition: ExpressLink.cpp:175
bool shadowGetUpdate(uint8_t index=-1)
Retrieve a device shadow update response.
Definition: ExpressLink.cpp:633
bool otaFlush()
The contents of the OTA buffer are emptied.
Definition: ExpressLink.cpp:579
bool isOnboarded()
equivalent to: AT+CONNECT? and parsing the response for STAGING/CUSTOMER
Definition: ExpressLink.cpp:366
ExpressLinkConfig config
Definition: ExpressLink.h:163
String readLine(uint32_t count=1)
Definition: ExpressLink.cpp:211
bool factoryReset()
wipe all data and config, equivalent to: AT+FACTORY_RESET
Definition: ExpressLink.cpp:389
bool disconnect()
equivalent to: AT+DISCONNECT
Definition: ExpressLink.cpp:375
bool begin(Stream &s, int event=-1, int wake=-1, int reset=-1, bool debug=false)
Initializes an ExpressLink interface.
Definition: ExpressLink.cpp:187
EventCode
see https://docs.aws.amazon.com/iot-expresslink/latest/programmersguide/elpg-event-handling....
Definition: ExpressLink.h:68
@ CONFMODE
A connection was established or failed. Parameter=Connection Hint.
Definition: ExpressLink.h:78
@ OTA
Receive buffer Overrun (topic in detail). Parameter=0.
Definition: ExpressLink.h:76
@ SHADOW_SUBACK
A Shadow delete result was received. Parameter=Shadow Index.
Definition: ExpressLink.h:88
@ FIRST_EVENT_CODE
No event retrieved, queue was empty. Not defined in ExpressLink TechSpec.
Definition: ExpressLink.h:71
@ SUBNACK
A subscription was accepted. Parameter=Topic Index.
Definition: ExpressLink.h:80
@ STARTUP
A message was received on the topic #. Parameter=Topic Index.
Definition: ExpressLink.h:73
@ CONNECT
OTA event (see the OTA? command for details). Parameter=0.
Definition: ExpressLink.h:77
@ SHADOW_DOC
The SHADOW[Shadow Index] interface initialization failed. Parameter=Shadow Index.
Definition: ExpressLink.h:84
@ OVERRUN
Connection unexpectedly lost. Parameter=0.
Definition: ExpressLink.h:75
@ SHADOW_DELETE
A Shadow delta update was received. Parameter=Shadow Index.
Definition: ExpressLink.h:87
@ CONLOST
The module has entered the active state. Parameter=0.
Definition: ExpressLink.h:74
@ LAST_EVENT_CODE
A Shadow delta subscription was rejected. Parameter=Shadow Index.
Definition: ExpressLink.h:90
@ SHADOW_UPDATE
A Shadow document was received. Parameter=Shadow Index.
Definition: ExpressLink.h:85
@ NONE
Failed to parse response, Check response for full event. Not defined in ExpressLink TechSpec.
Definition: ExpressLink.h:70
@ SHADOW_INIT
A subscription was rejected. Parameter=Topic Index.
Definition: ExpressLink.h:82
@ SHADOW_INIT_FAILED
Shadow[Shadow Index] interface was initialized successfully. Parameter=Shadow Index.
Definition: ExpressLink.h:83
@ SHADOW_SUBNACK
A Shadow delta subscription was accepted. Parameter=Shadow Index.
Definition: ExpressLink.h:89
@ SHADOW_DELTA
A Shadow update result was received. Parameter=Shadow Index.
Definition: ExpressLink.h:86
@ MSG
Definition: ExpressLink.h:72
@ UNKNOWN
Definition: ExpressLink.h:69
@ SUBACK
CONFMODE exit with success. Parameter=0.
Definition: ExpressLink.h:79
OTACode
see https://docs.aws.amazon.com/iot-expresslink/latest/programmersguide/elpg-ota-updates....
Definition: ExpressLink.h:97
@ NewHostImageReady
A new module firmware image has arrived. The signature has been verified and the ExpressLink module i...
Definition: ExpressLink.h:103
@ UpdateProposed
No OTA in progress.
Definition: ExpressLink.h:99
@ HostUpdateProposed
A new module OTA update is being proposed. The host can inspect the version number and decide to acce...
Definition: ExpressLink.h:100
@ OTAInProgress
A new Host OTA update is being proposed. The host can inspect the version details and decide to accep...
Definition: ExpressLink.h:101
@ NewExpressLinkImageReady
OTA in progress. The download and signature verification steps have not been completed yet.
Definition: ExpressLink.h:102
@ NoOTAInProgress
Definition: ExpressLink.h:98
String error
Definition: ExpressLink.h:167
bool sleep(uint32_t duration, uint8_t sleep_mode=0)
bool send(uint8_t topic_index, String message)
Same as ExpressLink::publish - use it instead.
Definition: ExpressLink.cpp:483
bool get(uint8_t topic_index=-1)
Request next message pending on the indicated topic.
Definition: ExpressLink.cpp:474
bool shadowSubscribe(uint8_t index=-1)
Subscribe to a device shadow document.
Definition: ExpressLink.cpp:644
bool reset()
soft-reboot of the module, equivalent to: AT+RESET
Definition: ExpressLink.cpp:382
bool connect(bool async=false)
equivalent to: AT+CONNECT or AT+CONNECT!
Definition: ExpressLink.cpp:343
bool selfTest()
equivalent to sending AT and checking for OK response line
Definition: ExpressLink.cpp:333
bool shadowDelete(uint8_t index=-1)
Request the deletion of a Shadow document.
Definition: ExpressLink.cpp:677
void escape(String &value)
Escapes string in-place so it can be written to ExpressLink UART.
Definition: ExpressLink.cpp:245
bool subscribe(uint8_t topic_index, String topic_name)
Subscribe to Topic#.
Definition: ExpressLink.cpp:450
static const uint32_t TIMEOUT
The maximum runtime for every command must be listed in the datasheet. No command can take more than ...
Definition: ExpressLink.h:179
void unescape(String &value)
Unescapes string in-place after reading it from ExpressLink UART.
Definition: ExpressLink.cpp:255
bool otaApply()
Authorize the ExpressLink module to apply the new image.
Definition: ExpressLink.cpp:561
bool shadowGetDelete(uint8_t index=-1)
Request a Shadow delete response.
Definition: ExpressLink.cpp:688
bool cmd(String command)
Execute AT command and reads all response lines. Escaping and unescaping is handled automatically....
Definition: ExpressLink.cpp:266
bool shadowDoc(uint8_t index=-1)
Request a Device Shadow document.
Definition: ExpressLink.cpp:600
bool otaRead(uint32_t count)
Requests the next # bytes from the OTA buffer.
Definition: ExpressLink.cpp:535
Definition: ExpressLink.h:107
EventCode code
Definition: ExpressLink.h:108
int parameter
Definition: ExpressLink.h:109
Definition: ExpressLink.h:113
OTACode code
Definition: ExpressLink.h:114
String detail
Definition: ExpressLink.h:115