I am using SIM808 to send SMS to a perticuar number. But when trying to set the number using AT+CMGS=XXXXXXX returns +CMS ERROR:325. I have set the AT+CSCS to GSM but still no luck.The following is the code:
import serial
import os, time
# Enable Serial Communication
port = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=1)
# Transmitting AT Commands to the Modem
# '\r\n' indicates the Enter key
port.write('AT'+'\r\n')
rcv = port.read(10)
print rcv
port.write('AT+CMGF=1\r\n')
time.sleep(10)
rcv = port.read(10)
print rcv
port.write('AT+CMGS=\'9912345678\'\r\n')
time.sleep(2)
port.write('test msg')
time.sleep(2)
port.write(chr(26))
rcv = port.read(10)
print rcv
port.flush()