Rx Side of RH_ASK Issues

Hello all,

I am trying to use a set of HolyBro 915 MHz Telemetry radios , and am having issues on the receiver side of things.

These radios have LEDs inside that indicates when a message is sent or received. On my TX, the LED blinks every 2 seconds. On the RX, the LED blinks every 2 seconds, indicating they are correctly sending and receiving something. When I disconnect the Tx, the Rx LED stops blinking. The examples are slightly modified from the base examples provided with the library.

Any help is greatly appreciated!

Tx Board: Adafruit Feather M0
Rx Board: Adafruit Adalogger Feather M0

Tx Code:

// ask_transmitter.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module
// Tested on Arduino Mega, Duemilanova, Uno, Due, Teensy, ESP-12

#include <RH_ASK.h>
#ifdef RH_HAVE_HARDWARE_SPI
#include <SPI.h> // Not actually used but needed to compile
#endif
RH_ASK driver(2000, 0, 1, 0);
//RH_ASK driver;
// RH_ASK driver(2000, 4, 5, 0); // ESP8266 or ESP32: do not use pin 11 or 2
// RH_ASK driver(2000, 3, 4, 0); // ATTiny, RX on D3 (pin 2 on attiny85) TX on D4 (pin 3 on attiny85), 
// RH_ASK driver(2000, PD14, PD13, 0); STM32F4 Discovery: see tx and rx on Orange and Red LEDS

void setup()
{
#ifdef RH_HAVE_SERIAL
    Serial.begin(115200);	  // Debugging only
    delay(2000);
#endif
    if (!driver.init())
#ifdef RH_HAVE_SERIAL
         Serial.println("init failed");
#else
	;
#endif
}

void loop()
{
    const char *msg = "hello";
    Serial.println("Sending Message!");
    driver.send((uint8_t *)msg, strlen(msg));
    driver.waitPacketSent();
    delay(2000);
}

Rx Code:

// ask_receiver.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to receive messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) receiver with an Rx-B1 module

#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile

//RH_ASK driver;
//RH_ASK driver(2000, 2, 4, 5); // ESP8266 or ESP32: do not use pin 11
RH_ASK driver(2000, 0, 1); // ESP8266 or ESP32: do not use pin 11

void setup()
{
  Serial.begin(115200);	// Debugging only
  delay(3000);
  if (!driver.init())
    Serial.println("init failed");


  Serial.println("Initialized!");
}
uint32_t timer = millis();

void loop()
{

  if (millis() - timer > 5000) {
    timer = millis();
    Serial.println("Waiting for message...");

  }
  uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
  uint8_t buflen = sizeof(buf);

  //driver.printBuffer("Got:", buf, buflen);

  if (driver.recv(buf, &buflen)) // Non-blocking
  {
    //int i;

    // Message with a good checksum received, dump it.
    driver.printBuffer("Got:", buf, buflen);
  }

}

the modules you are linking to are Serial bridges (Serial interface: 3.3V UART).

You don't want RH_ASK, just use Serial1 of your Adafruit Feather M0 to send out information if you hooked the module to pins 0 and 1 (and configured the right 57600 baud rate)

I would suggest to study Serial Input Basics to handle the decoding part.

Thanks for your reply.

So I did try that method since the boards accept AT commands, but I could not get anything passed the acknowledgment from putting the module into AT mode.

I don't have the module so can't test but you don't want to go into AT mode, it seems to just be a transparent Serial bridge. What you print / write on one end appears on the other side.

Interesting…I’ll give it a go and report back. Thanks for the advice!