RockBlock MK2 scrambled message

Hello, My name is Hythem from the SHS InvenTeam, we are currently working with the RockBlock MK2 Modem to send GPS readings from the SAM-M8Q module over the iridium network. We have successfully sent messages via the RockBlock modem, However the message which was supposed to be GPS coordinates (printed in the serial monitor before sending but I do not have the specific coordinates) was replaced by “b41921fefe69011d5fe47b43ffb82d7bc1fbfd8b2d1f3a1801bdad771ee5fda3da5385ffec5c7eda4dc1099563fb3f68fda3dd4551d88fa3fe9fffddbbed1c3e08”

We are unsure if the message is just corrupted or somehow encoded but we could not find an answer via google which brought us here. Below is the code we are using.

//------------{Libraries}----------//
#include <Wire.h> //Needed for I2C to GPS
#include <IridiumSBD.h>
#define IridiumSerial Serial3
#define DIAGNOSTICS false // Change this to see diagnostics
#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_Ublox_GPS
//--------------------------------//

SFE_UBLOX_GPS myGPS;
IridiumSBD modem(IridiumSerial);

long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module.

void setup() {
  int signalQuality = -1;
  int err;
  Serial.begin(9600);
  Wire.begin();
  while (!Serial);
  IridiumSerial.begin(19200);
  Serial.println("Starting modem...");
  err = modem.begin();
  if (err != ISBD_SUCCESS) {
    Serial.print("Begin failed: error ");
    Serial.println(err);
    if (err == ISBD_NO_MODEM_DETECTED) {
      Serial.println("No modem detected: check wiring.");
    } return;
  }

 
  if (myGPS.begin() == false) {
    Serial.println(F("Ublox GPS not detected, Is it plugged in?"));
    while (1);
  }

  myGPS.setI2COutput(COM_TYPE_UBX);
  myGPS.saveConfiguration();

  char version[12];
   err = modem.getFirmwareVersion(version, sizeof(version));
  if (err != ISBD_SUCCESS) {
     Serial.print("FirmwareVersion failed: error ");
     Serial.println(err);
     return;
  }
  Serial.print("Firmware Version is ");
  Serial.print(version);
  Serial.println(".");

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

  Serial.print("On a scale of 0 to 5, signal quality is currently ");
  Serial.print(signalQuality);
  Serial.println(".");

  long latitude = myGPS.getLatitude();
  long longitude = myGPS.getLongitude();
 
  delay(60000);  
 
  latitude = myGPS.getLatitude();
  longitude = myGPS.getLongitude();
 
  Serial.println(latitude);
   
    Serial.print("Trying to send the message.  This might take several minutes.\r\n");
    err = modem.sendSBDText(latitude);
    if (err != ISBD_SUCCESS) {
      Serial.print("sendSBDText failed: error ");
      Serial.println(err);
      if (err == ISBD_SENDRECEIVE_TIMEOUT) {
      Serial.println("Try again with a better view of the sky.");
      }
    } else {
      Serial.println("Hey, it worked!");
    }
   
  Serial.println(longitude);
 
  err = modem.sendSBDText(longitude);
    if (err != ISBD_SUCCESS) {
      Serial.print("sendSBDText failed: error ");
      Serial.println(err);
      if (err == ISBD_SENDRECEIVE_TIMEOUT) {
      Serial.println("Try again with a better view of the sky.");
      }
    } else {
      Serial.println("Hey, it worked!");
    }
  }

void loop() {
}

#if DIAGNOSTICS
void ISBDConsoleCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}

void ISBDDiagsCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}
#endif

Thank you for your time. :smiley:

Well, it's hexadecimal. Look for something that produces hex output.

Hello, I want to send GPS data through the RockBlock9603 via an Ardiuno Mega, I’m having a few issue though. Firstly when I try to upload the code I encounter an error during compilation ‘class IridiumSBD’ has no member named ‘getFirmwareVersion’. This isn’t an issue on my other computer however, I’m on Ardiuno 1.8.12 and have version 2.0.0 of the library. Secondly, when the program does work, yesterday it gave back an interesting message “b41921fefe69011d5fe47b43ffb82d7bc1fbfd8b2d1f3a1801bdad771ee5fda3da5385ffec5c7eda4dc1099563fb3f68fda3dd4551d88fa3fe9fffddbbed1c3e08” When it should have just sent a string of numbers. Anyway, here’s my code

//------------{Libraries}----------//
#include <Wire.h> //Needed for I2C to GPS
#include <IridiumSBD.h>
#define IridiumSerial Serial3
#define DIAGNOSTICS false // Change this to see diagnostics
#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_Ublox_GPS
//--------------------------------//

SFE_UBLOX_GPS myGPS;
IridiumSBD modem(IridiumSerial);

long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module.

void setup() {
  int signalQuality = -1;
  int err;
  Serial.begin(9600);
  Wire.begin();
  while (!Serial);
  IridiumSerial.begin(19200);
  Serial.println("Starting modem...");
  err = modem.begin();
  if (err != ISBD_SUCCESS) {
    Serial.print("Begin failed: error ");
    Serial.println(err);
    if (err == ISBD_NO_MODEM_DETECTED) {
      Serial.println("No modem detected: check wiring.");
    } return;
  }

  
  if (myGPS.begin() == false) {
    Serial.println(F("Ublox GPS not detected, Is it plugged in?"));
    while (1);
  }

  myGPS.setI2COutput(COM_TYPE_UBX);
  myGPS.saveConfiguration();

  char version[12];
  err = modem.getFirmwareVersion(version, sizeof(version));
  if (err != ISBD_SUCCESS) {
     Serial.print("FirmwareVersion failed: error ");
     Serial.println(err);
     return;
  }
  Serial.print("Firmware Version is ");
  Serial.print(version);
  Serial.println(".");
  
  err = modem.getSignalQuality(signalQuality);
  if (err != ISBD_SUCCESS) {
    Serial.print("SignalQuality failed: error ");
    Serial.println(err);
    return;
  }

  Serial.print("On a scale of 0 to 5, signal quality is currently ");
  Serial.print(signalQuality);
  Serial.println(".");

  long latitude = myGPS.getLatitude();
  long longitude = myGPS.getLongitude();
  
  delay(60000); 
  
  latitude = myGPS.getLatitude();
  longitude = myGPS.getLongitude();

  long int GPS[] = {latitude, longitude};
  
  Serial.println(latitude);
    
  Serial.print("Trying to send the message.  This might take several minutes.\r\n");
  for(int i = 0; i >= 1; i++) {
  err = modem.sendSBDText(GPS[i]);
    if (err != ISBD_SUCCESS) {
      Serial.print("sendSBDText failed: error ");
      Serial.println(err);
      if (err == ISBD_SENDRECEIVE_TIMEOUT) {
      Serial.println("Try again with a better view of the sky.");
      }
    } else {
      Serial.println("Hey, it worked!");
    }
  }
}

void loop() {
}

#if DIAGNOSTICS
void ISBDConsoleCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}

void ISBDDiagsCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}
#endif
   err = modem.sendSBDText(latitude);

"latitude" is a long integer, not text. What does the above function expect as an input argument?

I've merged your cross-posts @Stockbridge_InvenTeam.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

My team and I have been working on combining an Iridium Modem and the SAM-M8Q Sparkfun GPS. We’ve been making pretty good progress on combining them until a day or so ago. There’s 2 problems have come up. We would’ve tried to post this on Sparkfun’s forum, but we’ve been continuously getting 403 Forbidden errors whenever we try to post. Staff over there really haven’t been the most helpful. lol

Our first problem is that whenever we try to send GPS coordinates other than 0, we get an Error 13 message from the modem. We looked into this, and it said that an error 13 means we’re sending over 100 credits (1 credit = 50 bytes; we should only be sending 2 at most. We have 95 credits so we shouldn’t have an issue? Has anyone else had this issue and found a way to solve it?

//------------{Libraries}----------//
#include <Wire.h> //Needed for I2C to GPS
#include <IridiumSBD.h>
#define IridiumSerial Serial3
#define DIAGNOSTICS false // Change this to see diagnostics
#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_Ublox_GPS
//--------------------------------//

SFE_UBLOX_GPS myGPS;
IridiumSBD modem(IridiumSerial);

long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module.

void setup() {
  int signalQuality = -1;
  int err;
  Serial.begin(9600);
  Wire.begin();
  while (!Serial);
  IridiumSerial.begin(19200);
  Serial.println("Starting modem...");
  err = modem.begin();
  if (err != ISBD_SUCCESS) {
    Serial.print("Begin failed: error ");
    Serial.println(err);
    if (err == ISBD_NO_MODEM_DETECTED) {
      Serial.println("No modem detected: check wiring.");
    } return;
  }

  if (myGPS.begin() == false) {
    Serial.println(F("Ublox GPS not detected, Is it plugged in?"));
    while (1);
  }

  myGPS.setI2COutput(COM_TYPE_UBX);
  myGPS.saveConfiguration();

  char version[12];
   err = modem.getFirmwareVersion(version, sizeof(version));
  if (err != ISBD_SUCCESS) {
     Serial.print("FirmwareVersion failed: error ");
     Serial.println(err);
     return;
  }
  Serial.print("Firmware Version is ");
  Serial.print(version);
  Serial.println(".");

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

  Serial.print("On a scale of 0 to 5, signal quality is currently ");
  Serial.print(signalQuality);
  Serial.println(".");
 
  delay(60000);  
 
 long  latitude = myGPS.getLatitude();
 long longitude = myGPS.getLongitude();
 
  Serial.println(latitude);
   
    Serial.print("Trying to send the message.  This might take several minutes.\r\n");
    err = modem.sendSBDText(latitude);
    if (err != ISBD_SUCCESS) {
      Serial.print("sendSBDText failed: error ");
      Serial.println(err);
      if (err == ISBD_SENDRECEIVE_TIMEOUT) {
      Serial.println("Try again with a better view of the sky.");
      }
    } else {
      Serial.println("Hey, it worked!");
    }
   
  Serial.println(longitude);
 
  err = modem.sendSBDText(longitude);
    if (err != ISBD_SUCCESS) {
      Serial.print("sendSBDText failed: error ");
      Serial.println(err);
      if (err == ISBD_SENDRECEIVE_TIMEOUT) {
      Serial.println("Try again with a better view of the sky.");
      }
    } else {
      Serial.println("Hey, it worked!");
    }
  }

void loop() {
}

#if DIAGNOSTICS
void ISBDConsoleCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}

void ISBDDiagsCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}
#endif

Our second issue came up when we added new strings, “slatitude” and “slongitude.” We added these because we had some issues with getting our original “latitude” and “longitude” variables combined (we wanna only use 1 credit/message if possible). Now, I haven’t a clue why this happened, but now our code gets automatically stuck at “sending message. this may take several minutes.” We have had a timeout in place (5 minutes), so it should at least we timing out, yet it isn’t.

//------------{Libraries}----------//
#include <Wire.h> //Needed for I2C to GPS
#include <IridiumSBD.h>
#define IridiumSerial Serial3
#define DIAGNOSTICS false // Change this to see diagnostics
#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_Ublox_GPS
//--------------------------------//

SFE_UBLOX_GPS myGPS;
IridiumSBD modem(IridiumSerial);
String slatitude;
String slongitude;

long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module.

void setup() {
  int signalQuality = -1;
  int err;
  Serial.begin(9600);
  Wire.begin();
  while (!Serial);
  IridiumSerial.begin(19200);
  Serial.println("Starting modem...");
  err = modem.begin();
  if (err != ISBD_SUCCESS) {
    Serial.print("Begin failed: error ");
    Serial.println(err);
    if (err == ISBD_NO_MODEM_DETECTED) {
      Serial.println("No modem detected: check wiring.");
    } return;
  }

 
  if (myGPS.begin() == false) {
    Serial.println(F("Ublox GPS not detected, Is it plugged in?"));
    while (1);
  }

  myGPS.setI2COutput(COM_TYPE_UBX);
  myGPS.saveConfiguration();

  char version[12];
  err = modem.getFirmwareVersion(version, sizeof(version));
  if (err != ISBD_SUCCESS) {
     Serial.print("FirmwareVersion failed: error ");
     Serial.println(err);
     return;
  }
  Serial.print("Firmware Version is ");
  Serial.print(version);
  Serial.println(".");
 
  err = modem.getSignalQuality(signalQuality);
  if (err != ISBD_SUCCESS) {
    Serial.print("SignalQuality failed: error ");
    Serial.println(err);
    return;
  }

  Serial.print("On a scale of 0 to 5, signal quality is currently ");
  Serial.print(signalQuality);
  Serial.println(".");
 
  delay(60000);
 
  long latitude = myGPS.getLatitude();
  long longitude = myGPS.getLongitude();

  long int GPS[] = {latitude, longitude};
  slongitude = String(longitude);
  slatitude = String(latitude);
  Serial.println(slatitude + ", " + slongitude);
 
  Serial.print("Trying to send the message.  This might take several minutes.\r\n");
  for(int i = 0; i >= 1; i++) {
  Serial.print("Sending: ");
  Serial.println(GPS[i]);
  err = modem.sendSBDText(GPS[i]);
    if (err != ISBD_SUCCESS) {
      Serial.print("sendSBDText failed: error ");
      Serial.println(err);
      if (err == ISBD_SENDRECEIVE_TIMEOUT) {
      Serial.println("Try again with a better view of the sky.");
      }
    } else {
      Serial.println("Hey, it worked!");
    }
  }
}

void loop() {
}

#if DIAGNOSTICS
void ISBDConsoleCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}

void ISBDDiagsCallback(IridiumSBD *device, char c) {
  Serial.write(c);
}
#endif

If anyone has any experience with this stuff or can offer us any help, it would be very much appreciated! Thanks!

DO NOT CROSS POST.

I explained the problem in your other one on the identical topic. "latitude" is NOT TEXT.

Okay, But what do you mean by it is not text? I'm sorry but I'm having trouble understanding what you mean. Latitude is a variable which is set to a specific value. wouldn't the value its set to be considered text?

Sorry to be such a bother about this. and cross posting was not our intention we apologize for that.

wouldn't the value its set to be considered text?

Of course not. You are way out of your league in this project, and really need to brush up on the basics of C/C++ programming.

cross posting was not our intention

It clearly was, and continuing to do so can get you banned from the forum. You have already been reprimanded by a moderator in a previous thread.

Our specific issue is separate from our issues we asked in our last thread. Our first/most important issue is our error code 13 issue. I described in the original post why that's so. In our previous post, we asked about why we got a weird scrambled message (we now know why), and the other part of the issue was that our software's library was being a little funky and saying we had stuff downloaded when we didn't.

I don't disagree we're a little in over our heads in this, but that's why we came to the forums in the first place. We're learning as we go, we don't have the time to take a course. We've made progress, so please don't say it's impossible.

Back to our issue, it would be very kind if you could explain what's up in a little more detail.

Thanks!

It is exactly the same error in both posts. "latitude" is a long integer, and is NOT TEXT.

Until you spend some time learning to understand the differences between types of variables in C/C++ you will get absolutely nowhere. Don't come back until you have done your homework.

@Stockbridge_InvenTeam

As you do not seem to be able to follow Per's advice and that of jremington you now have 48 hours to read the following links

TOPIC MERGED.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.