مكتبة تم إنشاؤها بواسطة: Cesar Augusto B. Barbosa E Thiago Piovesan
مركز أمريكا اللاتينية للتقنيات المفتوحة (Celtab)
حديقة Itaipu التكنولوجية (PTI)
(EN) تم تصميم هذه المكتبة لتكوين واستخدام أي عقدة LoRawan التي تستخدم في الأوامر.
Notes:
- This Library was meant to configure LoRaWAN node to the AU915 Frequency Plan
- The Library initiates Serial Communication with a baud rate of 9600, if you
initiate the communication again in the code there may be a crash.
Known Bugs:
- The testConfig Function doesn't work in Arduino Nano, it'll always reconfigure the node
(PT-BR) Esta biblioteca foi desenvolvida para configurar e Usar Quarister nó lorawan que استخدم comandos at.
Notas:
- Esta Biblioteca foi idealizada para configurar nós no Plano de Frequência AU915
- A Biblioteca inicia a Comunicação Serial com um baud rate de 9600, se você inicar
a comunicação novamente no código pode vir a ocorrer travamentos.
Bugs Conhecidos:
- A Função testConfig não funciona no Arduino Nano, ele sempre irá reconfigurar o nó
(en) قم بتنزيل المكتبة واستيرادها إلى Arduino IDE
(PT-BR) Baixe a biblioteca e importe-a para o Arduino IDE
(en) أضف المكتبة إلى الكود الخاص بك
(PT-BR) Adicione a biblioteca ao código fonte
# include < LoRaAT.h >{
LoRaAT lora (rx, tx);
} Notes (Notas):
(en) At the creation of the object you will need to set the Rx and Tx ports that you want to use
(pt-br) Na criação do objeto você precisará definir quais são as portas Rx e Tx que deseja usar
{
lora. init ();
}{
String DevAddr = " XXXXXXXX " ;
String DevEui = " XXXXXXXXXXXXXXXX " ;
String AppEui = " XXXXXXXXXXXXXXXX " ;
/* *
* (en)
* You can either pass it at once, using the function setIDs and/or setKeys
* As you can pass it individualy
*
* (pt-br)
* Você pode tanto passar todas de uma vez usando as funções setIDs e/ou setKeys
* Como você também pode passar individualmente
*/
lora. setIDs (DevAddr, DevEui, AppEui) // Passing the IDs together - Passando os IDs juntos
lora. setDevAddr (DevAddr); // Passing the DevAddr to the object - Passando o DevAddr para o objeto
lora. setDevEui (DevEui); // Passing the DevEui to the object - Passando o DevEui para o objeto
lora. setAppEui (AppEui); // Passing the AppEui to the object - Passando o AppEui para o objeto
}{
lora. config (); // Function to configure the node - Função para configurar o nó
lora. testConfig ); // Function to test the configuration and reconfigure if needed
// Função para testar as configurações e reconfigurar se necessário
} (en)
تدعم المكتبة 4 أنواع من الرسائل لإرسالها:
(PT-BR)
A Biblioteca Suporta 4 Tipos de Mensagens Para Enviar:
| وظيفة Função | وصف descrição |
|---|---|
| lora.sendmsg (سلسلة MSG) | إرسال رسالة السلسلة envia mensagem سلسلة |
| lora.sendcmsg (سلسلة MSG) | إرسال رسالة مؤكدة envia mensagem سلسلة تأكيدا |
| lora.sendmsghex (سلسلة MSG) | إرسال رسالة سد hex السلسلة envia mensagem string hex |
| lora.sendcmsghex (سلسلة MSG) | إرسال سلسلة hex مؤكدة Envia Mensagem String Hex hexda |
(EN) لتمكين الوكالة الدولية للطاقة ، فقط عدم التعريف أدناه ، تستخدم هذه الوظيفة مكتبة ESP8266WIFI.H
(PT-BR) PARA HABILITAR O Watchdog é Apenas Descomentar A Definição Abaixo ، Esta Função USA A Biblioteca ESP8266WIFI.H
# define Watchdog (EN) يتم استخدام تعريف Loglevel لتحديد ما إذا كان سيتم إرسال البيانات/التصحيح بواسطة Serial
(PT-BR) A Definição loglevel é USADA PARA SES OS DADOS
| الشجاعة | وصف descrição |
|---|---|
| 0 | لا توجد بيانات أرسلها المسلسل Nenhum Dado Enviado Por Serial |
| 1 | فقط الوضع الذي أرسله المسلسل Apenas Status Enviado Por Serial |
| 2 | بيانات التصحيح المرسلة بواسطة المسلسل Dados de Debug Enviado Por Serial |
(EN) جدول وظائف تكوين الكائن
(PT-BR) Tabela de funções de configuraço de objeto
| وظيفة Função | وصف descrição |
|---|---|
| Loraat (int rx ، int tx) | مُنشئ مُصمم |
| init () | وظيفة التهيئة Função de Inicializaço |
(EN) جدول وظائف تعريف المعلمة
(PT-BR) Funções de Definição de Parâmetros
| وظيفة Função | وصف descrição |
|---|---|
| setDevaddr (سلسلة devaddr) | تمرير سلسلة devaddr إلى الكائن passa سلسلة do devaddr para o objeto |
| setDeveui (سلسلة deveui) | تمرير سلسلة deveui إلى الكائن passa سلسلة doveui para o objeto |
| setAppeui (سلسلة appeui) | تمرير سلسلة appeui إلى الكائن passa سلسلة تفعل appeui para o objeto |
| setnwkskey (سلسلة nwkskey) | تمرير سلسلة Nwkskey إلى الكائن passa سلسلة تفعل nwkskey para o objeto |
| setAppskey (سلسلة appskey) | تمرير سلسلة AppSkey إلى الكائن الفقرة A string do appskey para o objeto |
| setIDs (String Devaddr ، String deveui ، String Appeui) | تمرير جميع المعرفات معًا إلى الكائن Passa Toodos Ids Juntos Para O Objeto |
| Setkeys (String Nwkskey ، String AppSkey) | تمرير جميع المفاتيح معًا إلى الكائن Passa Todas as Keys Juntas Para o Objeto |
(EN) جدول وظائف تكوين العقدة
(PT-BR) Tabela de funções de configuraço dos nós
| وظيفة Função | وصف descrição |
|---|---|
| التكوين () | تكوين العقدة مع تمرير التكوينات configura o nó com as configurações passadas |
| testConfig () | اختبر التكوين وإعادة تكوينه إذا لزم الأمر ، يُرجع صحيحًا إذا نجحت وكاذبة إذا لم يكن الأمر كذلك testa كـ configurações e reconfigura se neveliorio ، reactorna verdadeiro se sucesso ou falso se falhou |
(EN) جدول الوظائف العامة
(PT-BR) Tabela de Funções Genéricas
| وظيفة Função | وصف descrição |
|---|---|
| SendCMD (سلسلة CMD) | أرسل الأمر عبر المسلسل إلى العقدة (استدعاء waitmsg () في النهاية) Envia Comandos Para o nó عبر Serial (Chama Waitmsg () لا نهائي) |
| SendAtcmd (سلسلة CMD) | إرسال الأمر عبر المسلسل إلى العقدة Envia Comandos para o nó عبر المسلسل |
| قارن (سلسلة CMD ، سلسلة الجواب) | أرسل أمرًا وقارن الإجابة المستلمة Envia um Comando e Compara a represbida |
| setTimeDelay (int timedelay) | تمرير توقيت جديد إلى الوظائف Passa Um Novo Timedelay Para كما funções |
| patchdogrst () | أعد ضبط مراقبة لوحات ESP8266 Reseta o Watchdog de Placas ESP8266 |
(en) جدول إرسال وظائف الرسائل
(PT-BR) Funções de Envio de Menagens
| وظيفة Função | وصف descrição |
|---|---|
| sendmsg (سلسلة MSG) | إرسال رسالة السلسلة envia mensagem سلسلة |
| SendCMSG (سلسلة MSG) | إرسال رسالة سلسلة مؤكدة envia mensagem سلسلة تأكيدا |
| sendmsghex (سلسلة MSG) | إرسال رسالة سلسلة HEX envia mensagem string hex |
| SendCmsghex (سلسلة MSG) | إرسال رسالة سلسلة سداسي عشرية مؤكدة Envia Mensagem String Hex hexda |
(en) جدول وظيفة رسالة الانتظار
(PT-BR) Função de Espera de Mensagem
| وظيفة Função | وصف descrição |
|---|---|
| waitmsg () | انتظر الإجابة وطباعها عبر المسلسل Espera a mensagem e subrime عبر المسلسل |
| Waitansmsg () | انتظر وأعد الإجابة espera e reatorna a menagem (تأخير = timedelay*2) |
| Waitack () | الوظيفة التي تنتظر استلام ACK إرجاع صحيح إذا تم استلام ACK أو خطأ إذا لم يتم استلامه função que espera tretbimento de um ack restorna verdadeiro se um ack foi bidbodo |