P2P Comm with Arduino and RN2903

Hi everyone, it seems that I maybe having some issues reading data packets. I have one arduino sending a packet via a RN2903 module to another arduino that has a RN2903 module attached to it. My send code and receive code is attached.

My output is (Serial monitor):

packet: FFFFFFFF

Thank you so much in advance!

receive.txt (3.83 KB)

Send.txt (3.46 KB)

void loop() {
  //Serial.println("waiting for a message");
  loraSerial.println("radio rx 0"); //continous reception
 
   char e = loraSerial.read();

Send a message to the radio. Give the radio NO time to receive or process the packet, and expect an immediate response.

Why? I demand an IMMEDIATE response!

THAT is what you then print, to get the FFFFFFFF. Otherwise known as -1, meaning there was nothing to read.

Sorry. Can't help you. You took too long to respond.

PaulS:
Sorry. Can't help you. You took too long to respond.

I do apologize for taking to long to respond. I didn't get a notification that you commented. Sorry if I offended you.

What is this "I demand an immediate response" thing about though? You demand that from me?

You are sending a request, and expecting that the request gets to the other device, processed by that device, and that the response gets back in the few nanoseconds that elapse before you begin reading the response. Does that REALLY seem like a reasonable thing to do?

PaulS:
You are sending a request, and expecting that the request gets to the other device, processed by that device, and that the response gets back in the few nanoseconds that elapse before you begin reading the response. Does that REALLY seem like a reasonable thing to do?

I thought I had the program written in a way to give it more than nano seconds to read the packet. I am not very good at writing code but I am trying to learn. No, that doesn't seem like the logical thing to do. I agree with you. I guess the next thing for me to do is try to understand more about how to give the two modules more time to respond.

I also need to learn how to set up notifications on here.

Just to give you a frame for reference, at 9600 it takes about 1ms to send one character. In Arduino-speak that's about 16,000 potential instructions. So now let's add up all the characters you want to transmit and how many you want in response. You just might find you have enough time to translate War and Peace into Mongolian.

You just might find you have enough time to translate War and Peace into Mongolian.

I've tried three times to read that book. I've read the same 45 pages three times, then tossed it back as just too boring for words.