0

I'm having problems with my setup.

I'm trying to create a wind-speed system when you send an SMS to retrieve the correct wind speed as an SMS response.

I'm using a pro mini, connected by USB via FTDI, and a SIM808 module.

The SIM808 is connected to a mains supply and the LED status suggests it is connected to the network.

The SIM808 pins are as follows:

TX > Pin 9 
RX > Pin 10 
VMCU V IN > Power supply + 
GND (the one under VMCU) > Power supply - 
GND (under Li-on) > GND on the Arduino

I've tried lots of source code examples but nothing much seems to happen, this is the latest code I'm testing (the top part of the loop at least). In the serial monitor, it reports back the "Sim808 init error" over and over.

include <DFRobot_sim808.h>
include <SoftwareSerial.h>
define MESSAGE_LENGTH 160
char message[MESSAGE_LENGTH]; 
int messageIndex = 0; 
char MESSAGE[300]; 
char lat[12]; 
char lon[12]; 
char wspeed[12];

char phone[16]; 
char datetime[24];

define PIN_TX 9
define PIN_RX 10
SoftwareSerial mySerial(PIN_TX,PIN_RX); 
DFRobot_SIM808 sim808(&mySerial);//Connect RX,TX,PWR,

void sendSMS(); void getGPS(); void readSMS();

void setup() { mySerial.begin(9600); Serial.begin(9600);

//******** Initialize sim808 module ************* 
while(!sim808.init()) { 
  Serial.print("Sim808 init error\r\n"); 
  delay(1000); 
} 
delay(3000);

Serial.println("SIM Init success");

I hope someone can help as I've spent ages on this and had no luck.

  • Are you sure this is the code you are running? You code won't compile, e.g. it should be #define instead of define... – hcheung Sep 6 at 8:17
  • Your connection doesn't make any sense, how do you power the pro mini? It will be better for you to provide the drawing or picture of your connection. – hcheung Sep 6 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.