Serial Communication problem Between Prop and GM862 Gprs Module
ccastro
Posts: 5
Hello!
I'm trying to send data into an FTP Server via GPRS, so what i did is to connect TX and RX from Propeller to GM862 RX and TX.
I know that sending data to the module is working, and receiving data works sometimes. I know that because i also have the prop sending the same AT commands to my computer at the same time they are sent to the module.
DEFINITIVO 5.spin
The whole program is very extense so i will just post a little part of it.
So what i see on the LCD screen is:
CLOSING FTP
And what i see on the computer screen is:
AT#FTPCLOSE
(5 SECONDS PAUSE)
AT#FTPCLOSE
(5 SECONDS PAUSE)
AT#FTPCLOSE
....
I'm sure the response is sent by GPRS module. Even if FTP connection is already closed, the answer should be "OK". Also sometimes the answer is taken by the Prop and it continues his routine normally.
it may be someting wrong with timing?
Does anyone have an idea for keeping the prop waiting for the answer continusly?
I'm trying to send data into an FTP Server via GPRS, so what i did is to connect TX and RX from Propeller to GM862 RX and TX.
I know that sending data to the module is working, and receiving data works sometimes. I know that because i also have the prop sending the same AT commands to my computer at the same time they are sent to the module.
DEFINITIVO 5.spin
The whole program is very extense so i will just post a little part of it.
OBJ fdsp: "FULLDUPLEXSERIALPLUS" PST: "PARALLAX SERIAL TERMINAL PLUS" CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 PUB CERRARFTP FDSP.START(LCDTX,LCDTX,00,LCDBR) 'Start serial port for LCD Screen FDSP.STR(STRING(188,"CLOSING FTP")) 'Show data on LCD fdsp.Stop ' Stop LCD Serial Port FDSP.START(GPRSRX,GPRSTX,00,GPRSBR) ' Start GPRS module port FDSP.RXFLUSH ' Clean Rx Buffer pst.STR(STRING("AT#FTPCLOSE",13)) ' Send AT command into Parallax Serial Terminal (PC) FDSP.STR(STRING("AT#FTPCLOSE",13)) ' Send AT commando into GPRS Module IF FDSP.WAITSTR(STRING("OK"),400_000_000) ' Wait for "OK", as a affirmative response,(Time out Aprox 5 Sec), (When writing from PC i get this response ' in 2 seconds) fdsp.stop ' Stops GPRS module communication RETURN ' Return and proceed with routine FDSP.STOP ' If no Affirmative answer is received, it tries again. CERRARFTP
So what i see on the LCD screen is:
CLOSING FTP
And what i see on the computer screen is:
AT#FTPCLOSE
(5 SECONDS PAUSE)
AT#FTPCLOSE
(5 SECONDS PAUSE)
AT#FTPCLOSE
....
I'm sure the response is sent by GPRS module. Even if FTP connection is already closed, the answer should be "OK". Also sometimes the answer is taken by the Prop and it continues his routine normally.
it may be someting wrong with timing?
Does anyone have an idea for keeping the prop waiting for the answer continusly?