Serial Help needed with RockBlock7 Iridium Modem [Solved]

I am having a very hard time communicating with the Iridium RockBLOCK module via SerialPort.

I tried Serial1, Serial2, although I need to talk to it thru Serial5.

This is the Developer Guide from the iridium modem.

I really can’t seem to find a problem, I tried writing code from a lot of angles, and this is the simplest I can try. This is a passthru sample, but I also tried a direct Print(“AT”) code.

All I get back is some weird characters and sometimes echo (which isn’t supposed to be). I doubled check baud rates, cables (TX in Block7 is supposed to be connected to TX in Arduino and not cross like expected) [I tried inverting it anyway without luck]). I send AT and I get weird characters.

The Rock7 is powered by the 3.7 battery directly using the li+ connection in the block. If I use an Arduino the device works as expected. It is a 5v module though. I might have some level issues… But I am not sure!

Here is my sample code:


#include "Serial5/Serial5.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup()
{
	Serial.begin(9600);
	Serial5.begin(19200, SERIAL_8N1);	

	delay(1000);			
}

String NewCommand = "";

void loop()
{				
		while(Serial.available())
		{
			char c = Serial.read();
			NewCommand += c;
			if(c == '\n') {
				NewCommand.remove(NewCommand.indexOf('\n'));
				NewCommand.remove(NewCommand.indexOf('\r')); //Removing all characters just in case
				Serial5.print(NewCommand + "\n\r"); //Rockblock 7 needs /r not /n.. tried it both ways
				NewCommand = "";
			} 
		}				

	while(Serial5.available())
	{
		char c = Serial5.read();
		Serial.print(c);
	}
}

I am really pulling my hair! I am thinking this is a hardware issue or something stupid I am missing.

UPDATE:
I found that the UART pins are NOT 5v tolerant. I don’t know why I thought they where but they are not specified like that on the data sheet on a second read, I hope I haven’t blown the electron IO yet. Will try a level shifter and report back…

UPDATE2:
Indeed there was level shifting required. I made a test with a couple of MOSFETS and ti work. Now waiting for a better board for shifting from SparkFun.

Glad your testing this!

I bought one of these RockBlock Sat modems when Sparkfun first started carrying them but have not had a chance or reason yet to get it out and play with it.

Hopefully, the Level Shifter will fix your problem, it’s always good to have the Arduino to verify the equipment is indeed working as expected.

How do you plan on using this modem?

Fixed! Level Shifter fixed it. Thank God!

I am planing on using it on HAB (High Altitude Balloon). At my local school theres a Near Space Program and I suggested that we use the Electron as the flight computer. It is well equipped for the job since we will use cellular [high throughput] in low altitude as backup and satellite as high altitude [low data throughput] telemetry.

So… Now GPS is working… And Sat Modem talking. Now I need to figure a way to talk to this baby without blocking the main thread.

All Looking good now!

BY THE WAY: There’s an Arduino library but I don’t like that it highjacks the main thread, so I am staying away for now from it.

ANOTHER GOTCHA: RockBlock Uses ‘\r’ as an end of line character… I also spent some time finding out why \n did not work! If you use println it will send the required characters for it to work…

Sweet.

Looking forward to seeing how the modem works out for you.

I always thought it would be cool to build a solar-powered boat using that modem to keep tabs on its location as it goes out to sea. I’ve seen a few people online share maps of units they released. They always ended up going offline for some reason. Still cool to be in touch with stuff that far out of your reach.

Sparkfun just released a smaller RockBlock modem yesterday actually.

This is a great new version. Specially for the external antena! That’s something that on the current version sucks… But What I don’t like about this new model is the small connector for data.

Let us know if you do that boat!