Author Topic: Possible bugs with SmsSendWaitRefID  (Read 550 times)

ronfak

  • Newbie
  • *
  • Posts: 3
    • View Profile
Possible bugs with SmsSendWaitRefID
« on: April 26, 2015, 08:08:34 pm »
When sending an SMS with SmsSendWaitRefID to a false SMS number (like to a landline number) i got :

Quote

[26/04/2015 21:25:49] nrGsm: ... wait reply SmsSendWaitRefID ...
[26/04/2015 21:25:49] nrGsm: OK Returned !!! \0Dh\0AhOK\0Dh\0Ah
[26/04/2015 21:25:49] nrGsm: DoDataSend: 11 bytes
[26/04/2015 21:25:49] nrGsm: send:AT+CMGS=31\0Dh
[26/04/2015 21:25:49] nrGsm: OK Returned !!! \0Dh\0Ah>
[26/04/2015 21:25:49] nrGsm: DoDataSend: 65 bytes
[26/04/2015 21:25:49] nrGsm: send:0031000B913383893158F90000AA13F4F29C4EA783E8E5399D4E07D1E7743A1D\1Ah
[26/04/2015 21:25:52] nrGsm: ERROR Returned !!!  \0Dh\0AhERROR\0Dh\0Ah
[26/04/2015 21:25:59] nrGsm: ... SmsSendWaitRefID done:


Here I see 2 problems:
  • I already got the ERROR response, but the library is waiting until timeout to give back the hand.

  • When the response is ERROR, the library always keep the flag nrGsm.IsBusy to true ! Even after the end of SmsSendWaitRefID. So if we check it to know if we can do something else the application will just stop working. So, unfortunatly, IsBusy can't be trusted.


To solve this, I had to modify nrgsm.pas because I didn't find the way to do it from outside.

1. I didn't try to solve this problem, even if I think it's wrong that TnrGsm.SmsSendWait has 10s hardcoded and it is not using the actual timeout variable. But I saw a message in this forum pointing out this problem.

2. To force the IsBusy flag back to false, I had no choice but moving procedure TnrGsm.StateGsmReset(aState: TGsmInternalState); to the public scope so I can call nrGsm1.StateGsmReset(TGsmInternalState.gssIdle); from outisde.
I first thought that nrGsm1.abort; was their for this purpose, but this procedure is declared but it is empty...


Ron
« Last Edit: April 27, 2015, 07:37:54 am by ronfak »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Possible bugs with SmsSendWaitRefID
« Reply #1 on: May 02, 2015, 06:14:57 pm »
Hello

I know nothing about your device.
We need diagnostic LOG file for analyze issue.
Please read this for details:
http://forums.nrcommlib.com/index.php?topic=6.0

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.