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

Connection p2p with two RN2483 and LoRaWan gateway

$
0
0

HI @a.valero thank you very much for your time, still struggling with it though... I don't understand one thing, what is the timeout value depending on? Why should it be 100? THen the radio window has to match with it right?

I have tried your code as this

RX

char rx[20];
  int leng ;


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

  Serial1.write("mac pause\r\n");
  //setting window to zero
  Serial1.println("radio set wdt 0\r\n");
  //setting the rx to continous mode of reception
  Serial1.write("radio rx 0\r\n");

  leng =  readWaitLn(rx, sizeof(rx), 100);

  Serial.println(leng);

Outcome

11
11
11
11
11
11
11
11
11
11

TX

  String text = "Node zero";
  String e = "zero";

  text = "Node " + nodeAddress + " sending: " + message;
  Serial.println(text);
  //using the LoRa modulation to reach other node instead the LoRaWan stack
  //stopping the LoRaWan stack on the device
  Serial.print("Pausing mac: ");
  Serial1.write("mac pause\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());

  Serial.print("sending to radio: ");
  e = Serial1.write("radio tx 1\r\n");
  Serial.println(e);

   Serial1.println(message);
   Serial.println(message);

output, as you see the value 12 is there, I checked out the string and it says radio_tx_ok

Node 02010102 sending: hi
Pausing mac: 4294967245
sending to radio: 12
hi


Viewing all articles
Browse latest Browse all 116887

Trending Articles



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