Flow control with GSM Modem
HenkieD
Posts: 8
Hello stampers,
I'm having some problems to communicate with a cellphone modem (Siemens MC388).
I'm using a BSP40 in combination with a Max232.
When i send the AT command (for example ATI) it stops with the A
On receiving side I don't see anything.
I wrote a small VB application to check out the MC388, and it seem to work properly with the Flowcontrol (RTS,CTS)
Can somebody help me on this one.
' {$STAMP BS2p}
' {$PBASIC 2.5}
RXGSM···· CON 4········· ·· 'Receive from GPRS
TXGSM···· CON 7········ ··· 'Transfer to GPRS
RTSGSM··· CON 5······· ··· 'Request to send to GPRS
CTSGSM··· CON 6······· ··· 'Clear to send from GPRS
BaudGSM··· CON 240···· ·· '9600,N,8,1
idx··········· VAR Word······ 'EEprom pointer
dByte········· VAR Byte··· · 'Data byte for communication
HIGH RTSGSM
WRITE 10, "ATI"
WRITE 13, 13· 'CR
WRITE 14, 10· 'LF
idx = 10
SEND:
READ idx, dByte
SEROUT TXGSM\RTSGSM, BaudGSM,[noparse][[/noparse]dByte]
idX = idx + 1
IF idx = 15 THEN GOTO DELAY
GOTO SEND
DELAY:
PAUSE 100
RECEIVE:
idx = 20
· SERIN RXGSM\CTSGSM, BaudGSM, [noparse][[/noparse]dByte]
· IF dByte = 0 THEN
··· GOTO NOTHING
· ELSE
··· WRITE idx, dByte
··· idx = idx + 1
· ENDIF
· GOTO RECEIVE
NOTHING:
END
Thank you
Henk
I'm having some problems to communicate with a cellphone modem (Siemens MC388).
I'm using a BSP40 in combination with a Max232.
When i send the AT command (for example ATI) it stops with the A
On receiving side I don't see anything.
I wrote a small VB application to check out the MC388, and it seem to work properly with the Flowcontrol (RTS,CTS)
Can somebody help me on this one.
' {$STAMP BS2p}
' {$PBASIC 2.5}
RXGSM···· CON 4········· ·· 'Receive from GPRS
TXGSM···· CON 7········ ··· 'Transfer to GPRS
RTSGSM··· CON 5······· ··· 'Request to send to GPRS
CTSGSM··· CON 6······· ··· 'Clear to send from GPRS
BaudGSM··· CON 240···· ·· '9600,N,8,1
idx··········· VAR Word······ 'EEprom pointer
dByte········· VAR Byte··· · 'Data byte for communication
HIGH RTSGSM
WRITE 10, "ATI"
WRITE 13, 13· 'CR
WRITE 14, 10· 'LF
idx = 10
SEND:
READ idx, dByte
SEROUT TXGSM\RTSGSM, BaudGSM,[noparse][[/noparse]dByte]
idX = idx + 1
IF idx = 15 THEN GOTO DELAY
GOTO SEND
DELAY:
PAUSE 100
RECEIVE:
idx = 20
· SERIN RXGSM\CTSGSM, BaudGSM, [noparse][[/noparse]dByte]
· IF dByte = 0 THEN
··· GOTO NOTHING
· ELSE
··· WRITE idx, dByte
··· idx = idx + 1
· ENDIF
· GOTO RECEIVE
NOTHING:
END
Thank you
Henk