Quantcast
Channel: The Things Network - Latest posts
Viewing all articles
Browse latest Browse all 116632

Connection p2p with two RN2483 and LoRaWan gateway

$
0
0

try this:

char rx[20];
int leng ;

Serial1.begin(57600);
while (!Serial1);

Serial1.println("radio set wdt 0\r\n");
leng = readWaitLn(rx, sizeof(rx), 100);
if (leng) Serial.println(rx); //should read ok
//setting the rx to continous mode of reception
while(1)
{
Serial1.write("mac pause\r\n");
leng = readWaitLn(rx, sizeof(rx), 100);
if (leng) Serial.println(rx); //should read 4294967295
Serial1.write("radio rx 0\r\n");
leng = readWaitLn(rx, sizeof(rx), 100);
if (leng) Serial.println(rx); //should read ok
while(!leng)
{
leng = readWaitLn(rx, sizeof(rx), 1000); // wait message for 1 second
if (leng) Serial.println(rx); //should read the message
}
Serial1.write("mac resume\r\n");
leng = readWaitLn(rx, sizeof(rx), 100);
if (leng) Serial.println(rx); //should read ok
}


Viewing all articles
Browse latest Browse all 116632

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>