Skip to content

v1.0.0

Compare
Choose a tag to compare
@FokkeZB FokkeZB released this 05 Dec 09:18
· 204 commits to master since this release
  • Optimized TheThingsNetwork memory efficiency
  • Added TheThingsMessage for encoding and decoding data with protocol buffers
  • Breaking: Keys are now set as strings instead of byte arrays.
  • Breaking: Initialize class via new constructor instead of - now removed - init()
  • Breaking: Receive downlink messages via function registered via onMessage()
  • New: Set keys via provision() without actually activating
  • New: Call personalize() or join() without keys to use those already in memory
  • New: New poll() method to send single byte to check for queued downlink messages

See the documentation for details.

Old public API for TheThingsNetwork:

    int downlinkPort;
    byte downlink[64];
    void init(Stream& modemStream, Stream& debugStream);
    void reset(bool adr = true, int sf = DEFAULT_SF, int fsb = DEFAULT_FSB);
    bool personalize(const byte devAddr[4], const byte nwkSKey[16], const byte appSKey[16]);
    bool join(const byte appEui[8], const byte appKey[16]);
    int sendBytes(const byte* buffer, int length, int port = 1, bool confirm = false);
    int sendString(String message, int port = 1, bool confirm = false);
    void showStatus();

New public API for TheThingsNetwork:

    TheThingsNetwork(Stream& modemStream, Stream& debugStream, ttn_fp_t fp, uint8_t sf = TTN_DEFAULT_SF, uint8_t fsb = TTN_DEFAULT_FSB);
    void showStatus();
    void onMessage(void (*cb)(const byte* payload, size_t length, port_t port));
    bool provision(const char *appEui, const char *appKey);
    bool join(const char *appEui, const char *appKey, int8_t retries = -1, uint32_t retryDelay = 10000);
    bool join(int8_t retries = -1, uint32_t retryDelay = 10000);
    bool personalize(const char *devAddr, const char *nwkSKey, const char *appSKey);
    bool personalize();
    int8_t sendBytes(const byte* payload, size_t length, port_t port = 1, bool confirm = false);
    int8_t poll(port_t port = 1, bool confirm = false);