Hi,
I would like to share my flow to manage AT sequences (array of AT commands) for RAK811 breakout board.
The RAK811 breakout is a 3.3V LoRaWAN board. It can be connected with a FTDI to a USB port of a PC or a Raspberry Pi. It can also be connected to Rpi UART (Rx/Tx) GPIO (15/14).
The flow is able to manage an array of expected AT answers with an expected timeout for each answer.
Have fun...
Regards,
David
Link to download the flow
Exemple of AT sequence :
msg.payload=
[
{
"topic": "JOIN OTAA",
"ATcommand": "at+join=otaa",
"expectedAnswers": [
{
"expected_answer": "OK",
"wait_time_ms": 2000,
"error": "Echec authentification otaa (error RAK811)"
},
{
"expected_answer": "at+recv=3",
"wait_time_ms": 20000,
"error": "Echec authentification otaa (pas de réponse du concentrateur)"
}
]
},
{
"topic": "SEND & RECEIVE",
"ATcommand": "at+send=0,2,"+msg.payload,
"expectedAnswers": [
{
"expected_answer": "OK",
"wait_time_ms": 2000,
"error": "Echec de la transmission (error RAK811)"
},
{
"expected_answer": "at+recv=2",
"wait_time_ms": 20000,
"error": "Echec de la transmission (no answer from network)"
},
{
"expected_answer": "at+recv=0",
"wait_time_ms": 2000,
"extractOutput" : true, // Find a data in a coma separated payload
"positionInResponse":3, // Position of data to extract 0 to X
"responseName":"Réponse RX RAK 811 (Downlink Message)",
"error": "Pas de message RX (downlink) après transmission",
"errorReport":false //Just warn after wait-time_ms if no answer
}
]
}
]
;
return msg;