• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 25, 2024, 11:27:02 pm

News:

SMF - Just Installed!


No Timeout event

Started by henry64, October 28, 2011, 06:31:37 pm

Previous topic - Next topic

henry64

Why doesn't any of the error events get fired when there are a timeout on initialization of the GSM modem?

I need this to ensure that the device is online and ready when the applications is started.


[28-10-2011 22:25:15] nrComm Lib v9.24 Pro
[28-10-2011 22:25:15] nrComm: The port COM10 is opened succesfully
[28-10-2011 22:25:15] nrGsm: Medium Opened
[28-10-2011 22:25:15] nrGsm: === Use selected driver: Wavecom Modem
[28-10-2011 22:25:15] nrComm: Try to send the data with 3 length ...
[28-10-2011 22:25:15] nrComm: ... the data transmittion is OK!
[28-10-2011 22:25:15] nrGsm: DoDataSend: 3 bytes
[28-10-2011 22:25:15] nrGsm: send:AT\0Dh
[28-10-2011 22:25:35] nrGsm: Timeout!!! 20000 ms ""
[28-10-2011 22:27:01] nrComm Lib v9.24 Pro
[28-10-2011 22:27:01] nrComm: The port COM10 is opened succesfully
[28-10-2011 22:27:02] nrGsm: Medium Opened
[28-10-2011 22:27:02] nrGsm: === Use selected driver: Wavecom Modem
[28-10-2011 22:27:06] nrComm: Try to send the data with 3 length ...
[28-10-2011 22:27:06] nrComm: ... the data transmittion is OK!
[28-10-2011 22:27:06] nrGsm: DoDataSend: 3 bytes
[28-10-2011 22:27:06] nrGsm: send:AT\0Dh
[28-10-2011 22:27:26] nrGsm: Timeout!!! 20000 ms ""

Roman Novgorodov

Hello

You can try to play with serial port control lines before activate GSM component.
See following methods (Signals demo)
  nrComm1.SetStateDTR();
  nrComm1.SetStateRTS();

Also we used following algorithm in MyGsm application:
1) Open serial port.
2) Send string AT#13
3) Wait reply. If reply is 'OK' activate TnrGsm class for target serial port.

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.

henry64

Yes, sure I can play around and patch something together - but my question is, why doesn't any of error events fire where there is a timeout error?

If you already are using some workarounds in myGSM then - could you please publish the code or implement it in gsmdemo.
Did you receive my "updated" GSM demo, I have sent it to you by mail?

Roman Novgorodov

Hello

Yes, we have received your email. thank you for your information. We are analyzing LOG files and will try reproduce and resolve troubles.

Also You asked about closing event on usb plug off. Please try OnClose event in TnrComm component.

About sources of MyGSM.
We can not publish full sources.
We can post partial class that monitors serial port list and states of target ports, but we need time to prepare such sample.

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.

henry64

November 02, 2011, 04:54:57 pm #4 Last Edit: November 02, 2011, 06:42:37 pm by henry64
I'm not asking for full source  :)

I just would like to see what you are doing regarding opening and closing the GSM device, you mentioned you was doing something else that the "simple" method.
       nrGsm.Active := True;
       nrComm.Active := True;



henry64

Quote from: Roman Novgorodov on November 02, 2011, 03:10:23 pm

We can not publish full sources.
We can post partial class that monitors serial port list and states of target ports, but we need time to prepare such sample.


I forgot to mention that I would appreciat that  ::)