This is an Arduino Library for Arduino-compatible devices like The Things Uno and Node to communicate with The Things Network.
At the moment this library requires devices to feature a Microchip RN2xx3 module.
- Download the source code of the master or latest GitHub release as ZIP file.
- Follow Importing a .zip Library to install the library using the ZIP file.
- Restart the Arduino IDE to see the library's examples.
NOTE: Examples for the library will not be exposed in the File > Examples > TheThingsNetwork until after the IDE has restarted.
The library comes with several examples that can be found under File > Eamples > TheThingsNetwork once you've installed the library and restarted the IDE.
TheThingsNetwork class features the following public methods:
public:
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();
Source code for The Things Network is MIT licensed. We encourage users to make contributions on Github and to participate in discussions on Slack.
If you find bugs or documentation mistakes, please check open issues before creating a new issue. Please be specific and give a detailed description of the issue. Explain the steps to reproduce the problem. If you're able to fix the issue yourself, please help the community by forking the repository and submitting a pull request with your fix.
For contributing a feature, please open an issue that explains what you're working on. Work in your own fork of the repository and submit a pull request when you're done.
If you want to contribute, but don't know where to start, you could have a look at issues with the label help wanted or difficulty/easy.
Source code for The Things Network is released under the MIT License, which can be found in the LICENSE file. A list of authors can be found in the AUTHORS file.