This is what we have done...
We have set up a linux box as a breakout box using the following python code.
#!/usr/bin/python
import serial
import time
import binascii
device = serial.Serial(
port='/dev/ttyS1',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=0.005
)
wavecom = serial.Serial(
port='/dev/ttyS0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=0.005
)
device.open()
wavecom.open()
print device.isOpen()
print wavecom.isOpen()
while True:
from_device = device.readline()
if (len(from_device) > 0):
print 'Device -> Wavecom [%d]: (%s) %s' % (len(from_device), binascii.hexlify(from_device), from_device)
wavecom.write(from_device)
from_wavecom = wavecom.readline()
if (len(from_wavecom) > 0):
print 'Wavecom -> Device [%d]: (%s) %s' % (len(from_wavecom), binascii.hexlify(from_wavecom), from_wavecom)
device.write(from_wavecom)
device.close()
wavecom.close()
This is the output
True
True
Device -> Wavecom [3]: (1b0d0a)
Device -> Wavecom [4]: (41540d0a) AT
Wavecom -> Device [2]: (0d0a)
Wavecom -> Device [4]: (4f4b0d0a) OK
Device -> Wavecom [11]: (41542b434d47463d300d0a) AT+CMGF=0
Wavecom -> Device [2]: (0d0a)
Wavecom -> Device [4]: (4f4b0d0a) OK
Device -> Wavecom [11]: (41542b434d47533d31370d) AT+CMGS=17
Wavecom -> Device [2]: (0d0a)
Wavecom -> Device [2]: (3e20) >
Device -> Wavecom [47]: (303539313732323831393931303130303041383137303033313330323035303030303035453833323942464430361a) 05917228199101000A817003130205000005E8329BFD06
Wavecom -> Device [2]: (0d0a)
Wavecom -> Device [11]: (2b434d47533a2031350d0a) +CMGS: 15
Wavecom -> Device [2]: (0d0a)
Wavecom -> Device [4]: (4f4b0d0a) OK
As you can see from this, there is a 5ms+ delay in routing the packets .
The result of this is that the GSM modem now sends SMS messages perfectly without the timeout error message appearing.
BUT as soon as we remove the soft "breakout box", the RB433AH timeouts again.
Therefore the question arises - Why must the comms between the modem and the router board be slowed down and how is this done?