Error running rf95_reliable_datagram_client.pde [solved]

Started by r.rabin, July 06, 2017, 12:41:07 AM

r.rabin

Hello,

I am testing the sketch "rf95_reliable_datagram_client.pde" on the Moteino with the RF96 Tranceiver (LoRa 433 MHz).
When running the sketch, the following error occurs after "sending to rf_95_reliable_datagram_server":

"SendtoWait failed"

Has anyone encountered this problem? Are any changes to the code required in using the RF96 vs RF95 transceiver?

Thank you,

-Bob

Serial.println("Sending to rf95_reliable_datagram_server");
   
  // Send a message to manager_server
  if (manager.sendtoWait(data, sizeof(data), SERVER_ADDRESS))
  {
    // Now wait for a reply from the server
    uint8_t len = sizeof(buf);
    uint8_t from;   
    if (manager.recvfromAckTimeout(buf, &len, 2000, &from))
    {
      Serial.print("got reply from : 0x");
      Serial.print(from, HEX);
      Serial.print(": ");
      Serial.println((char*)buf);
    }
    else
    {
      Serial.println("No reply, is rf95_reliable_datagram_server running?");
    }
  }
  else
    Serial.println("sendtoWait failed");
  delay(500);
}


Felix


r.rabin


Felix



Felix


r.rabin

Unfortunately not. It turns out I originally downloaded "RadioHead_LowPowerLab.zip" from your link (rather than from another source as I had stated earlier). The link I used is: https://lowpowerlab.com/RadioHead_LowPowerLab.zip

Sorry I didn't respond earlier. I just returned from being away last week. Do you have any other suggestions?
Thanks for checking!

Felix

Please try rf95_client and rf95_server sample sketches, those are the default working examples.

r.rabin

Thanks! I'll give those a try and let you know if they work for me.

r.rabin

I am now running rf95_client & rf95_server on Moteinos plugged into different machines. When activating serial monitors on each machine, it appears that random characters are scrolling on both. From the code, I had expected to see "Hello World" displayed. Any ideas of might be wrong?
-I am using the rf96 radios. Does the RH_RF95 class work with the rf96 radios?

Thanks! -Bob

r.rabin


Felix

Whats the serial baud rate on your serial monitors?

r.rabin

9600. I switched to lower baud rates, but that didn't seem to help. What rate do you recommend?

Felix

Please have a look at the sketch of your gateway Moteino.
What is the baud rate defined there?

r.rabin

11520 baud. I changed the setting to this value and the sketch is working now!

Thank you!!