'Why doesn't my Iridium 9603 respond to simple AT commands?
I have an Iridium 9603 connected to an MCU which works with the Mbed operating system. It is connected through an RS-232 serial port. The code is the following.
int main(){
UARTSerial ir_serial(IRIDIUM_TX, IRIDIUM_RX, 19200);
ATCmdParser ir_parser(&ir_serial);
mbed::DigitalIn ir_DSR(IRIDIUM_DSR);
mbed::DigitalIn ir_DCD(IRIDIUM_DCD);
mbed::DigitalIn ir_CTS(IRIDIUM_CTS);
debug("BEFORE powering the module:\n");
debug("DSR is %d\n", ir_DSR.read());
debug("DCD is %d\n", ir_DCD.read());
debug("CTS is %d\n", ir_CTS.read());
ir_parser.debug_on(true);
gpio.sbd_pwr.write(1); // enabling Iridium GPIO pin
gpio.sbd_on.write(1); // turning Iridium ON
debug("AFTER turning ON:\n");
debug("DSR is %d\n", ir_DSR.read());
debug("DCD is %d\n", ir_DCD.read());
debug("CTS is %d\n", ir_CTS.read());
char buf[256];
int i = 0;
ir_parser.set_delimiter("\r");
ir_parser.send("AT+CGMI");
ir_parser.read(buf, 256);
for (i = 0; i < 256; i++)
{
debug("%d", buf[i]);
}
}
What I would expect after sending the "AT+CGMI" command, is that the module responds with:
IRIDIUM
OK
Instead, when I print the elements of my reading buffer as integers, I see "252" or "254" as element buf[0], and all zeros for all the others. Something like:
BEFORE powering the module:
DSR is 0
DCD is 0
CTS is 0
AFTER turning ON:
DSR is 0
DCD is 1
CTS is 1
252 0 0 0 0 0 0 0 0 0 ...
I had the doubt that the Iridium module could have been badly connected and that it did not power on correctly. This is the reason why you see that I print the values of DSR, DCD, and CTS pins before and after turning on the module. From all zeros, they switch to 0,1,1, which means that DSR is active while DCD and CTS are not (since they are active-low pins).
Do you have any idea about what I could have done wrong? Thank you in advance, and don't hesitate to ask me questions in case I was unclear.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|