1

member

Medium Basics: Project 053k SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) - LED control by SMS

of Acoptex.com in UNO

Basics: Project 053k

Project name: SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) - LED control by SMS

Tags: Arduino, Arduino Uno, SIM808, GPS GPRS GSM module, GPS GPRS GSM Bluetooth module, EVB-V3.2, AT commands, LED control, LED. +CMS ERROR 604 fix

Attachments: ATsetupsketch; sketch1

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1.Arduino Uno R3 (you can also use the other version of Arduino)

2. SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) 1pc

3.Arduino IDE ( you can download it from here  )

4.Jumper cables F-M, M-M

5. IPX GSM antenna with SMA male connector

6. GPS antenna with SMA male connector

7. IPX Bluetooth antenna with SMA male connector

8. To power module: 5V-26V DC 2A power adapter or Litium Ion battery 3.7VDC

 or 

9. SIM card

12.Resistor 3 pcs (10 KOhm 1 pc, 4.7 KOhm 1 pc, 220 Ohm)

13.Breadboard half size or small size 1 pc

14. LED 1 pc (any color)

General

We will learn how to connect SIM808 GPS module to Arduino board and use it to control LED by SMS.

Understanding the SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2)

You can read more about it here.

Signals and connections of the SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2)

RX (or RXD) - receive data input pin. Connected to Arduino board or USB to TTL converter TX pin.

TX (or TXD) - transmit data output pin. Connected to Arduino board or USB to TTL converter RX pin.

V_IN - power supply 5-26VDC

LI-ion + - positive pin for Li-Ion battery 3.5-4V DC

LI-ion -  - negative pin for Li-Ion battery 3.5-4V DC

POWKEY - start button. press it to start the module

VMCU - The pin of VMCU is used to control the high level of TTL UART, so as to realize to match between 1.25V/3.3V /5V systems. For example, if you want to use the 51 MCU to control this board, the pin of VMCU should be connected the DC5V. And if use the STM32 MCU, the pin of VMCU should be connected the DC3.3V. 

GND - ground. Connected to Arduino board GND pin.

MIC - microphone jack input. An external  microphone connected to it.

EPP - speaker or headphone jack output. Speaker or headphone connected to it.

PPS - Pulse per second. This is an output pin on some GPS modules. Generally, when this pin toggles, once a second, you can synchronize your system clock to the GPS clock.

MOTO - Vibration motor

SDA - I2C serial bus data I/O pin

SCL - I2C serial bus clock output pin

NET - Network status.

STA - Power on status

DTR - Data terminal ready input pin. Used for Serial communication.

2.8V - power supply 2.8VDC

RI - Ring indicator output pin.

CTS - Clear to send output pin.

RST - Reset input(Active low)

D9 - GPIO pin.

RTS - Request to send input pin.

DCD - Data carrier detect output pin.

The power supply range of SIM808 is from 3.4V to 4.4V. Recommended voltage is 4.0V.The transmitting burst will cause voltage drop and the power supply must be able to provide sufficient current up to 2A. 

Wiring

Step by Step instruction

  1. Do wiring.
  2. Attach GSM, GPS and Bluetooth antennas to GSM GPRS GPS Bluetooth module.
  3. Insert a valid unlocked SIM card to SIM card slot of GSM GPRS GPS Bluetooth module.
  4. You can power up GSM GPRS GPS Bluetooth module with power supply adapter (5-26VDC 2A) DC044 interface, with V_IN pin (5-26VDC 2A) and with Lithium Ion battery 3,5-4VDC. 
  5. We used the 5VDC 2A power adapter. Push the power switch to ON position - towards the SIM808 IC. When the module powered on, the LED power on indication (PWR) will be ON. 
  6. Press Start button for 2 seconds. Status indication LEDs (NET, STA, PPS) will be ON. One of them starts to flash  (1 second on, 1 second off) - SIM808 begins to work. If the power supply, GSM, Bluetooth, GPS antennas and SIM card connected to the module correctly, the LED will be flash slowly (1 second on, 3 seconds off), that indicates that the module is registered to the network, and you can make a call or do something else. 
  7. Open Arduino IDE.
  8. Plug your Adruino Uno board into your PC and select the correct board and com port
  9. Verify and upload the ATsetupsketch to your Adruino Uno
  10. Open the Serial Monitor at a baud rate of 9600. Both NL & CR must be selected too.
  11. First you need to check if AT commands are working - enter “AT” and press button Send.This would print OK which signifies of working connection and operation of the module. 
  12. Modify the sketch1 with your phone number, for example +37122222222, which will receive SMS messages.
  13. Verify and upload this sketch1 to your Adruino Uno.
  14. Open up serial monitor and set your baud to 9600 baud.
  15. First you will get the message - GPSmodule ready..
  16. When you send the SMS with text On from your smartphone to your SIM card phone number in  SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) you will get reply on your smartphone LED is ON and the LED will be switched ON.
  17. When you send the SMS with text Off from your smartphone to your SIM card phone number in  SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) you will get reply on your smartphone LED is OFF and the LED will be switched OFF.
  18. When you send the SMS with text State from your smartphone to your SIM card phone number in  SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) you will get reply on your smartphone about the ledPin state.

 

Code

Code is well explained. Do not forget to change the phone number or you will not get the SMS messages on your smartphone.

We use the AT command: AT+CMEE=1 to enable numeric error codes. 

Final result code +CME ERROR: indicates an error related to mobile equipment or network. The operation is similar to ERROR result code. None of the following commands in the same Command line is executed. Neither ERROR nor OK result code shall be returned. values used by common messaging commands:

CME Error Codes

  • 0 phone failure
  • 1 no connection to phone
  • 2 phone-adaptor link reserved
  • 3 operation not allowed
  • 4 operation not supported
  • 5 PH-SIM PIN required
  • 6 PH-FSIM PIN required
  • 7 PH-FSIM PUK required
  • 10 SIM not inserted
  • 11 SIM PIN required
  • 12 SIM PUK required
  • 13 SIM failure
  • 14 SIM busy
  • 15 SIM wrong
  • 16 incorrect password
  • 17 SIM PIN2 required
  • 18 SIM PUK2 required
  • 20 memory full
  • 21 invalid index
  • 22 not found
  • 23 memory failure
  • 24 text string too long
  • 25 invalid characters in text string
  • 26 dial string too long
  • 27 invalid characters in dial string
  • 30 no network service
  • 31 network timeout
  • 32 network not allowed - emergency call only
  • 40 network personalisation PIN required
  • 41 network personalisation PUK required
  • 42 network subset personalisation PIN required
  • 43 network subset personalisation PUK required
  • 44 service provider personalisation PIN required
  • 45 service provider personalisation PUK required
  • 46 corporate personalisation PIN required
  • 47 corporate personalisation PUK required
  • 99 resource limitation
  • 100 unknown
  • 103 Illegal MS
  • 106 Illegal ME
  • 107 GPRS services not allowed
  • 111 PLMN not allowed
  • 112 Location area not allowed
  • 113 Roaming not allowed in this location area
  • 132 service option not supported
  • 133 requested service option not subscribed
  • 134 service option temporarily out of order
  • 148 unspecified GPRS error
  • 149 PDP authentication failure
  • 150 invalid mobile class
  • 160 DNS resolve failed
  • 161 Socket open failed
  • 171 MMS task is busy now
  • 172 The MMS data is oversize
  • 173 The operation is overtime
  • 174 There is no MMS receiver
  • 175 The storage for address is full
  • 176 Not find the address
  • 177 The connection to network is failed
  • 178 Failed to read push message
  • 179 This is not a push message
  • 180 gprs is not attached
  • 181 tcpip stack is busy
  • 182 The MMS storage is full
  • 183 The box is empty
  • 184 failed to save MMS
  • 185 It is in edit mode
  • 186 It is not in edit mode
  • 187 No content in the buffer
  • 188 Not find the file
  • 189 Failed to receive MMS
  • 190 Failed to read MMS
  • 191 Not M-Notification.ind
  • 192 The MMS inclosure is full
  • 193 Unknown
  • 600 No Error
  • 601 Unrecognized Command
  • 602 Return Value Error
  • 603 Syntax Error
  • 604 Unspecified Error
  • 605 Data Transfer Already
  • 606 Action Already
  • 607 Not At Cmd
  • 608 Multi Cmd too long
  • 609 Abort Cops
  • 610 No Call Disc
  • 611 BT SAP Undefined
  • 612 BT SAP Not Accessible
  • 613 BT SAP Card Removed
  • 614 AT Not Allowed By Customer
  • 753 missing required cmd parameter
  • 754 invalid SIM command
  • 755 invalid File Id
  • 756 missing required P1/2/3 parameter
  • 757 invalid P1/2/3 parameter
  • 758 missing required command data
  • 759 invalid characters in command data
  • 765 Invalid input value
  • 766 Unsupported mode
  • 767 Operation failed
  • 768 Mux already running
  • 769 Unable to get control
  • 770 SIM network reject
  • 771 Call setup in progress 
  • 772 SIM powered down
  • 773 SIM file not present
  • 791 Param count not enough
  • 792 Param count beyond
  • 793 Param value range beyond
  • 794 Param type not match
  • 795 Param format invalid
  • 796 Get a null param
  • 797 CFUN state is 0 or 4

CMS ERROR Codes

Final result code +CMS ERROR: indicates an error related to message service or network.

The operation is similar to ERROR result code. None of the following commands in the same

Command line is executed. Neither ERROR nor OK result code shall be returned.

values used by common messaging commands:

Code of Meaning

 

  • 1 Unassigned(unallocated) number
  • 3 No route to destination
  • 6 Channel unacceptable
  • 8 Operator determined barring
  • 10 Call barred
  • 11 Reserved
  • 16 Normal call clearing
  • 17 User busy
  • 18 No user responding
  • 19 User alerting, no answer
  • 21 Short message transfer rejected
  • 22 Number changed
  • 25 Pre-emption
  • 26 Non-selected user clearing
  • 27 Destination out of service
  • 28 Invalid number format (incomplete number)
  • 29 Facility rejected
  • 30 Response to STATUS ENQUIRY
  • 32 Normal, unspecified 
  • 34 No circuit/channel available
  • 38 Network out of order
  • 41 Temporary failure
  • 42 Switching equipment Congestion
  • 43 Access information discarded
  • 44 Requested circuit/channel not available
  • 47 Resources unavailable, unspecified
  • 49 Quality of service unavailable
  • 50 Requested facility not subscribed
  • 55 Requested facility not subscribed
  • 57 Bearer capability not authorized
  • 58 Bearer capability not presently available
  • 63 Service or option not available, unspecified
  • 65 Bearer service not implemented
  • 68 ACM equal or greater than ACM maximum
  • 69 Requested facility not implemented
  • 70 Only restricted digital information bearer capability is available
  • 79 Service or option not implemented, unspecified
  • 81 Invalid transaction identifier value
  • 87 User not member of CUG
  • 88 Incompatible destination
  • 91 Invalid transit network selection
  • 95 Semantically incorrect message
  • 96 Invalid mandatory information
  • 97 Message type non-existent or not implemented
  • 98 Message type not compatible with protocol state
  • 99 Information element non-existent or not implemented
  • 100 Conditional information element error
  • 101 Message not compatible with protocol
  • 102 Recovery on timer expiry
  • 111 Protocol error, unspecified
  • 127 Interworking, unspecified
  • 128 Telematic interworking not supported
  • 129 Short message Type 0 not supported
  • 130 Cannot replace short message 
  • 143 Unspecified TP-PID error
  • 144 Data coding scheme (alphabet) not supported
  • 145 Message class not supported
  • 159 Unspecified TP-DCS error
  • 160 Command cannot be acted
  • 161 Command unsupported
  • 175 Unspecified TP-Command error
  • 176 TPDU not supported
  • 192 SC busy
  • 193 No SC subscription
  • 194 SC system failure
  • 195 Invalid SME address
  • 196 Destination SME barred
  • 197 SM Rejected-Duplicate SM
  • 198 TP-VPF not supported
  • 199 TP-VP not supported
  • 208 SIM SMS storage full
  • 209 No SMS storage capability in SIM
  • 210 Error in MS
  • 211 Memory Capacity Exceeded
  • 212 SIM Application Toolkit Busy
  • 213 SIM data download error
  • 224 CP retry exceed
  • 225 RP trim timeout
  • 226 SMS connection broken
  • 255 Unspecified error cause
  • 300 ME failure
  • 301 SMS reserved
  • 302 operation not allowed
  • 303 operation not supported
  • 304 invalid PDU mode
  • 305 invalid text mode
  • 310 SIM not inserted
  • 311 SIM pin necessary
  • 312 PH SIM pin necessary
  • 313 SIM failure 
  • 314 SIM busy
  • 315 SIM wrong
  • 316 SIM PUK required
  • 317 SIM PIN2 required
  • 318 SIM PUK2 required
  • 320 memory failure
  • 321 invalid memory index
  • 322 memory full
  • 323 invalid input parameter
  • 324 invalid input format
  • 325 invalid input value
  • 330 SMSC address unknown
  • 331 no network
  • 332 network timeout
  • 340 no cnma ack
  • 500 Unknown
  • 512 SMS no error
  • 513 Message length exceeds maximum length
  • 514 Invalid request parameters
  • 515 ME storage failure
  • 516 Invalid bearer service
  • 517 Invalid service mode
  • 518 Invalid storage type
  • 519 Invalid message format
  • 520 Too many MO concatenated messages
  • 521 SMSAL not ready
  • 522 SMSAL no more service
  • 523 Not support TP-Status-Report & TP-Command in storage
  • 524 Reserved MTI
  • 525 No free entity in RL layer
  • 526 The port number is already registerred
  • 527 There is no free entity for port number
  • 528 More Message to Send state error
  • 529 MO SMS is not allow
  • 530 GPRS is suspended
  • 531 ME storage full
  • 532 Doing SIM refresh 

Summary

We learnt how to connect SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) to Arduino board and use it to control LED by SMS.

You can use this sketch to control 3.3 V-5V relay or relays too.

Troubleshooting

If you are gettting the +CMS ERROR 604 and can not send SMS from your SIM808 GSM GPRS GPS Bluetooth evolution board (EVB-V3.2) the reason can be the "\r" in your sketch AT commands. Remove it.

Libraries:

  • SoftwareSerial library included in Arduino IDE.  The library has the following known limitations:If using multiple software serial ports, only one can receive data at a time.Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).On Arduino or Genuino 101 the current maximum RX speed is 57600bpsOn Arduino or Genuino 101 RX doesn't work on Pin 13 The library has the following known limitations: If using multiple software serial ports, only one can receive data at a time;Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69);Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI);On Arduino or Genuino 101 the current maximum RX speed is 57600bps; On Arduino or Genuino 101 RX doesn't work on Pin 13. You can read about it here.

Sketch:

  • See attachment on the begining of this project description.


Other projects of Acoptex.com

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 11-05-2019
Viewed: 1585 times