I'll do better than give you source code, I'll give you an opensource high volume server ...
If you aren't too attached to your code, then, I would suggest using an open source gateway such as Kannel to get the job done. Kannel in use by very high volume environments and I do believe that you can do load-balancing with it as well. You can also directly connect this to a number of SMSC's once you have it stablized for you envirnment. You can download Kannel from kannel.3glab.org.
Based on the VB comments, the only down side for you may be that it is a Linux-based server. You'll need Cygwin to run it under windows.
If you have this many messages then you should be seriously considering an SMS Gateway (like Kannel) so that you can at least connect directly to the carrier's SMSC to save on incoming request costs and to handle volume.
---
Now regarding your current problem. I don't believe that collisions can cause you to receive half-SMS's - may be an issue with Wavecom modems. The SMSC will either fully deliver the message to your module based on module ack or it will store it in a store-and-forward queue for later delivery. This sounds like it could be module memory issue, or load on the wavecom processor issue.
- Are there any messages stored on the modem?
- Are you polling the modem (not good) or using the indicator events like CIND.
- Also, I don't believe that this should happen, but who knows in a high volume environment. Could the incoming +CIND interrupts be cutting into your parsing algorithm - that is, are you sure (via logging) that the messages are in-fact half-messages or could something like a +CIND or +WIND be throwing off the parser - just a thought ...
Mathew
Main Topics
Browse All Topics





by: BigRatPosted on 2003-03-06 at 07:16:18ID: 8080607
I'd be quite happy with 50 cheeses :)
"is there a command that says "resend last sms"?"
Yes and No. You can put them into storage and send them from there, but the main problem is NOT the serial link but the wireless link. It is really just too slow (9600baud)
"how do i detect if the signal is busy and it is safe to send an SMS out"
You could in fact do :-
' Send an AT+CPAS command to the phone
MSComm1.Output = "AT+CPAS" & Chr$(13) & Chr$(10)
' The phone responds with +CPAS: <pas>
' where pas = 0 (ready) 3 (Ringing) 4 (Active)
and that MIGHT help a bit, but collision is collision.
"i am now a slave to the server, as i have to monitor the gateway everyday (on public holidays too!) and restart the application after it hangs. please help."
Clobbered by your own success!
There are two possibilities :-
1) Introduce a second modem to post replies. One for in - polled I presume - and one for out.
2) Talk to your service provider about sending SMSs via some mechanism like E-Mail, HTTP or TCP/IP (there is a standard here - you make up a PDU and connect to the SPs SMS Server port and write the PDU into the socket). You have to make a contract with them but the SMSs can be sent cheaper (bulk rates) and often (Vodafone is an example if I remember rightly) they'll provide you with the software.
I'd seriously consider the latter option. Indeed there is also a mechanism to recieve incomming SMSs over a TCP/IP connection. All you need is effectively an Internet connection, and DSL these days is cheap and fast.
HTH