Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serialization of CQC SMS Serial Interface Driver
#31
Great thanks. Will try it out.
Reply
#32
This is a no go as well.. Driver is in an error state when trying to send message.

[Image: Screen-Shot-2019-09-15-at-12-31-23.jpg]

Driver details:

[Image: Screen-Shot-2019-09-15-at-12-32-26.jpg]
Reply
#33
Ugh... To get rid of the warning message about unitialized fields, I set them to error state until such time as they get a value stored. But apparently the driver isn't storing values up front, and some that should be write only (and hence not affected by this) are read/write.

Let me take one more shot at it and I think we'll be OK.
Dean Roddey
Explorans limites defectum
Reply
#34
OK, one more time...


Attached Files
.cqcdrvpack   SMS_WithBusyFld_DefValues.CQCDrvPack (Size: 8.89 KB / Downloads: 3)
Dean Roddey
Explorans limites defectum
Reply
#35
Thanks.. set up another test of four consecutive SMS messages. Before each one I use WaitFieldValue to ensure SMSGateway.Busy is False before sending the message.

[Image: Screen-Shot-2019-09-15-at-15-23-29.jpg]

Only the first message is sent out, then this error:

[Image: Screen-Shot-2019-09-15-at-15-25-12.jpg]

I then upped the wait time to 10000 in WaitFieldValue and ran the same commands in scheduled action test so that I could see the actual number of milliseconds of wait time. The change to 10000 did the trick as I see that your changes changed the amount of wait time. Driver is busy for about 6500 milliseconds after sending a message whereas before it was about 2500 milliseconds.
Reply
#36
Before it wasn't imposing any inter-send delay. So it would make sense it was shorter before. That's why you had to do it. Now it's imposing that. Of course one reason for WaitFieldValue() is that you can put a conservatively large time in, but won't wait any longer than is really required. So you can account for a worst case, but only ever pay for what really happens.

Oh, and another reason for the slight increase is that it's not just setting Busy back to false before returning from the SendMessage, it's doing it later during the driver's poll callback after the minimum time has expired. But the poll interval is a couple seconds. So there will also tend to be on average a couple seconds extra. I could now lower that poll interval since the stuff that the poll method does is controlled by time stamps now. So it won't do things too fast. That would let it more quickly get Busy back to false, if that would matter much.
Dean Roddey
Explorans limites defectum
Reply
#37
(09-15-2019, 12:22 PM)Dean Roddey Wrote: Before it wasn't imposing any inter-send delay. So it would make sense it was shorter before. That's why you had to do it. Now it's imposing that. Of course one reason for WaitFieldValue() is that you can put a conservatively large time in, but won't wait any longer than is really required. So you can account for a worst case, but only ever pay for what really happens.

Oh, and another reason for the slight increase is that it's not just setting Busy back to false before returning from the SendMessage, it's doing it later during the driver's poll callback after the minimum time has expired. But the poll interval is a couple seconds. So there will also tend to be on average a couple seconds extra. I could now lower that poll interval since the stuff that the poll method does is controlled by time stamps now. So it won't do things too fast. That would let it more quickly get Busy back to false, if that would matter much.

Great change. Thanks. My particular CQC implementation makes heavy use of SMS.
Reply
#38
Hi all, I was contacted by Chris to help with this, but I don’t think I can offer much.
My only thought was to check if the AT command set supports a completed indicator of some sort.

The other (possibly dumb) idea was some form of generic async to sync driver that could generally queue action requests and feed them out sequentially.

Anyway, I am a long time out of it and I’m sure there are probably better ways these days.

Cheers

Rohan
HAMFIELD
Software & Hardware Solutions
Makers of the Translink C-Bus Gateway
for the Apple iPad, iPhone and iPod Touch.
Reply
#39
(09-15-2019, 03:22 PM)rhamer Wrote: My only thought was to check if the AT command set supports a completed indicator of some sort.

Sending SMS is the AT+CMGS command which, after sending a message, provides response of OK after message is send

Here: https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/at-cmgs-text-mode/

And

Page 120: https://www.elecrow.com/wiki/images/2/20..._V1.09.pdf
Reply
#40
It could be made async queuing them up and spooling them out. It would just be tricky to implement by eye.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TTS Driver Error kblagron 7 720 03-03-2023, 01:05 AM
Last Post: kblagron
  Admin Interface Help Doesn't Work alexismtz13 1 638 04-28-2022, 01:14 PM
Last Post: Dean Roddey
  Driver for Amazon 4k Stick Darrie 3 888 01-15-2022, 02:21 PM
Last Post: znelbok
  CQSL Interface Driver connects but no control NightLight 3 934 10-26-2021, 01:12 PM
Last Post: NightLight
  6.0.0 Interface Viewer - Action Trace Mark Stega 1 859 03-09-2021, 06:39 PM
Last Post: Dean Roddey
  Cannot Bind Interface to 80 gReatAutomation 1 1,155 11-05-2020, 04:18 PM
Last Post: Dean Roddey
  ClickPLC driver now failing after upgrade znelbok 2 1,263 09-21-2020, 10:48 PM
Last Post: znelbok
  Pentair driver tom 5 2,428 08-02-2020, 11:29 PM
Last Post: kblagron
  Marantz receiver driver (IP) dlmorgan999 6 2,468 05-15-2020, 03:32 PM
Last Post: dlmorgan999
  Variables Driver Client gReatAutomation 4 2,026 04-25-2020, 12:46 PM
Last Post: gReatAutomation

Forum Jump:


Users browsing this thread: 1 Guest(s)