IridiumSBD getSignalQuality return 10 insted 0-5

Hello there!
I am a newbie, this is my first post.
I am using IridiumSBD library by Mikal Hart (http://arduiniana.org)
My board is a Chipkit Max32. :grin: and Arduino IDE 1.81.
I used example “SendReceive.ino” included in IridiumSBD library.
I am using Rockblock from Sparkfun RockBLOCK Mk2 - Iridium SatComm Module

Program:

#include <IridiumSBD.h>
#include <SoftwareSerial.h>

SoftwareSerial nss(18, 19);
IridiumSBD isbd(nss, 10);

void setup()
{
  int signalQuality = -1;

  Serial.begin(115200);
  nss.begin(19200);

  isbd.attachConsole(Serial);
  isbd.attachDiags(Serial);

  isbd.begin();

  isbd.setPowerProfile(1);

  int err = isbd.getSignalQuality(signalQuality);
  if (err != 0)
  {
    Serial.print("SignalQuality failed: error ");
    Serial.println(err);
    return;
  }

  Serial.print("Signal quality is ");
  Serial.println(signalQuality);

  uint8_t buffer[200] = 
  { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
  size_t bufferSize = sizeof(buffer);
  err = isbd.sendReceiveSBDBinary(buffer, 20, buffer, bufferSize);
  if (err != 0)
  {
    Serial.print("sendReceiveSBDText failed: error ");
    Serial.println(err);
    return;
  }

  Serial.print("Inbound buffer size is ");
  Serial.println(bufferSize);
  for (int i=0; i<bufferSize; ++i)
  {
    Serial.write(buffer[i]);
    Serial.print("(");
    Serial.print(buffer[i], HEX);
    Serial.print(") ");
  }
  Serial.print("Messages left: ");
  Serial.println(isbd.getWaitingMessageCount());
}

void loop()
{
}

This is the output:

Calling internalBegin
>> AT

Waiting for response OK

<< AT

OK
>> ATE1

Waiting for response OK

<< ATE1

OK
>> AT&D0

Waiting for response OK

<< AT&D0

OK
>> AT&K0

Waiting for response OK

<< AT&K0

OK
InternalBegin: success!
SignalQuality failed: error 10

These are Rockblock connected pins:
Modem Max32
Gnd Gnd
5V In 5V from external voltage regulator
On/Off 5V (Is that Sleep pin?)
Rx Rx
Tx Tx

As I got error 10 → ISBD_IS_ASLEEP, maybe I am not setting Sleep pins as should be :confused:

I hope to have included all details. :grin:

Thanks in advance for any help, any hints will be appreciated very much! :slight_smile:

I'm having exactly the same issue. From the Arduino Iridium SBD site, error code 10 is the ISBD_IS_ASLEEP error, but I'm not using the sleep pin functionality.

There's a related issue with some of the pins on a Mega not working for software serial. I'm using hardware serial (port Serial1) on a Teensy 3.6, and all of the serial commands run fine until the sleep error on getSignalQuality. I tried using software serial on the Serial1 pins and it gives the same behavior: serial commands work fine until the getSignalQuality command throws the error 10/ sleep error. So, it doesn't seem to be the existing Mega issue.

This seems to be a sleep/ power issue, but I know not where. My sleep line is disconnected (so the Rockblock will pull it high internally and the module should be always on) and both LEDs are on (red for power and green for super cap is charged). I've also tested the code using both low and high power mode (passing 1 and 0 to setPowerProfile() ) and by adding a variety of delays around the code. So far, I've been unable to affect the behavior.

I tried using the rockblock USB cable and sending command to the rockblock directly, I did not get an error when sending the signal quality command (AT+CSQ), so it looks like this is an issue with the IridiumSBD library and not with my configuration. I also tried commenting out the isbd.attachconsole(Serial); and isbd.attachDiags(Serial); lines because my serial monitor showed duplicates of all commands. Neither of these affected anything, and the problem persists.