SIM800L hardware interface question

Inquiry and support for Freematics products
Post Reply
bardalas
Posts: 2
Joined: Sun Feb 19, 2017 7:31 am

SIM800L hardware interface question

Post by bardalas »

Hi,
I'm using the freematics ONE with SIM800L xBee module and trying to communicate it with no luck.

I could not understand what is the hardware interface being used here.
As far as I know, the xBee SIM800L interface is RS232 using AT commands but when I was digging in the FreematicsONE.cpp code I found that it uses SPI (see below the relevant piece of code).

So my question is which interface is being used ?
Can anyone share some documentation or electrical diagram ?
If it does uses RS232 interface (meaning the library can't work) what is the RX TX pins I should define ?

Thank you


Code from FreematicsONE.cpp (library):

void COBDSPI::write(const char* s)
{
#ifdef DEBUG
debugOutput(s);
#endif
digitalWrite(SPI_PIN_CS, LOW);
delay(1);
if (*s != '$') {
for (byte i = 0; i < sizeof(targets[0]); i++) {
SPI.transfer(pgm_read_byte(&targets[m_target][i]));
delayMicroseconds(5);
}
}
for (; *s ;s++) {
SPI.transfer((byte)*s);
delayMicroseconds(5);
}
// send terminating byte (ESC)
SPI.transfer(0x1B);
digitalWrite(SPI_PIN_CS, HIGH);
}
Post Reply