Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: SMS Driver
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a scheduled task that sends an SMS in the morning with the daily weather from a third-party weather driver:

[Image: Screen-Shot-2019-07-10-at-09-06-31.jpg]

I build the forecast that I want to send and assign variables to each element, then build the full forecast. I then send the SMS message to two cell phone numbers that are stored in the CQC Variable Driver.

The issue is that it always sends the SMS to the first phone number. I added a 5 second pause and then tried to have it send to the second one, but it does not always send the SMS to the second phone number.

Am I missing something here? Longer pause?


[Image: Screen-Shot-2019-07-10-at-09-00-57.jpg]
I had a similar need but I didn't have access to a GSM modem so I did an email to the email-to-text address of my carrier.

System::EMail
    P1=mstega <-- This is the email account for sending
    P2=443xxx0169@txt.att.net <--- the email address
    P3=Doorbell <-- The subject
    P4=DING <-- The text message, mine was just the literal, you would use a replacement token
(07-10-2019, 08:11 AM)Mark Stega Wrote: [ -> ]I had a similar need but I didn't have access to a GSM modem so I did an email to the email-to-text address of my carrier.

System::EMail
    P1=mstega <-- This is the email account for sending
    P2=443xxx0169@txt.att.net <--- the email address
    P3=Doorbell <-- The subject
    P4=DING <-- The text message, mine was just the literal, you would use a replacement token

Thanks. I've used that before but I want to be able to send/receive stuff to/from CQC even if my Internet connection is down.
Does that driver has any sort of 'busy' field indicating it's working on a call? It may ignore a new one if it's working on an existing one. If it has some sort of busy field you can wait for it to clean then send the other one.

Just to see if it's something like that, bump the sleep to 30 seconds. You wouldn't want to do that for real, but if it works then, then most likely it's something to do with sending them fairly quickly.
(07-10-2019, 12:29 PM)Dean Roddey Wrote: [ -> ]Does that driver has any sort of 'busy' field indicating it's working on a call? It may ignore a new one if it's working on an existing one. If it has some sort of busy field you can wait for it to clean then send the other one.

Just to see if it's something like that, bump the sleep to 30 seconds. You wouldn't want to do that for real, but if it works then, then most likely it's something to do with sending them fairly quickly.

Thanks, I'll check it out.
You say "but it does not always send the SMS to the second phone number."

Has it ever sent to this number?

Does it work if you disable the first sms send command?

If not then I'd double check the number, command syntax etc. If it does only sometimes then i'd say that its your service provider. they may be rate limiting your messages to stop spam via SMS.
After reading an AT Commands manual, you have to wait for the modem to respond to (i.e., to send) the first SMS before you can feed it another command.

AFAIK, you cannot check the status of the modem after a command with the current CQC SMS driver so, you have to put in a "pause" between SMS commands. The current driver only allows for:

[Image: Screen-Shot-2019-07-11-at-15-51-04.jpg]
If it's not awkward you could always use two modems and two drivers, one talking to each.
Not following you here ?
Use two different modems, and install two instances of the driver, pointing one at each modem. Pass one message to one driver and another to the other and just let them send in parallel.
Pages: 1 2