Trying to switch xbee project to wifly and cannot get past wifly.begin() method

I have a simple project to use xbee to send commands to another xbee mounted on an elecfreaks 2 channel relay shield, details here: and an arduino uno. It worked with the below sketch for the xbee’s:

#include <SoftwareSerial.h>

SoftwareSerial xbee(2, 3); //RX, TX
const int ledPin = 13; // the pin that the LED is attached to
const int topPlug = 5; // the pin for the top plug relay
const int botPlug = 4; // the pin for the bottom plug relay
char incomingByte; // a variable to read incoming serial data into

void setup(){
 //Serial.println( "Arduino started receiving bytes via XBee" );
 pinMode(ledPin, OUTPUT);
 pinMode(topPlug, OUTPUT);
 pinMode(botPlug, OUTPUT);

void loop(){
  while (xbee.available()) {
    incomingByte =;
    // if it's a capital H (ASCII 72), turn on the LED:
    if (incomingByte == 'T') {
      digitalWrite(topPlug, HIGH);
    // if it's an L (ASCII 76) turn off the LED:
    if (incomingByte == 't') {
      digitalWrite(topPlug, LOW);
    // if it's a capital H (ASCII 72), turn on the LED:
    if (incomingByte == 'B') {
      digitalWrite(botPlug, HIGH);
    // if it's an L (ASCII 76) turn off the LED:
    if (incomingByte == 'b') {
      digitalWrite(botPlug, LOW);

Now that I’m trying to use wifly, I put the wifly module ( on the same relay board and uno and tried using the following libraries:

WiflySerial (
WiflyHQ (GitHub - harlequin-tech/WiFlyHQ: WiFly RN-XV Arduino Library)

I am attempting to use the test example sketches for both of these and neither will get past the wifly.begin() methods. For HQ, I at least get an error that I have seen referenced in other posts, but none of the solutions in any posts I’ve seen has helped so far.

setPrompt failed
Failed to enter command mode
Failed to start wifly

Though I do not get an error in WiflySerial, I updated the .cpp file in the source code and it errors on trying to go into command mode as well. Is there something that I have to set to allow the sketches to put the wifly module into command mode? Or does anyone recommend a library to use SoftwareSerial with the wifly module?

Thank you for the help!