im supposed to be writing a python script that enables receiving SMS (GSM), on the hyper terminal i used the same AT commands i wrote in the script and they worked just fine, but when i download the script on the GSM module ( GT863-PY ) i get nothing at all, i would appreciate any ideas, im on a dead line, here's the code i wrote, thnx
import MDM
import GPIO
import MOD
#Set SMSC number
a=MDM.send('AT+CSCA="+20122000020",145',0)
data=MDM.receive(5)
#Save Settings
b=MDM.send('AT+CSAS',0)
data=MDM.receive(5)
#Select the message service
c=MDM.send('AT+CSMS=0',0)
data=MDM.receive(5)
#Set mode to TEXT
d=MDM.send('AT+CMGF=1\r',0)
res=MDM.receive(5)
#Set memory to be used
e=MDM.send('AT+CPMS="SM","SM","SM"\r',0)
data=MDM.receive(5)
#Initialize the GPIO 4 interface,LOW,OUTPUT
f=MDM.send('AT#GPIO=4,0,1\n',0)
data=MDM.receive(5)
#Set indication when a new sms is received
g=MDM.send('AT+CNMI=1,2,0,0,0\r',0)
data=MDM.receive(5)
while(1):
data=MDM.receive(5)
if data.find('CMT')!= -1:
res=MDM.receive(5)
#List unread messages
h=MDM.send('AT+CMGL=REC UNREAD',0)
#Set GPIO 4 to high
MDM.send('AT#GPIO=4,1,1\n',0)
#Wait for a while
MOD.sleep(10)
#Set GPIO 4 back to LOW
MDM.send('AT#GPIO=4,0,1\n',0)
break