• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 25, 2024, 06:10:40 am

News:

SMF - Just Installed!


TnrZModem component

Started by Drew, May 22, 2008, 07:53:30 am

Previous topic - Next topic

Drew

Hi,

I'm using the TnzZModem component (in the trial version at the moment) and it's only sending data every 10 seconds.  Why is this, and how can I speed it up?

Thanks

Drew

Roman Novgorodov

Hi Drew

This is wrong situation.
TnrZModem gets timeout, therefore it resend data packets after 10 second interval.

It seems like problem with serial port settings. Please verify and set correct values for StreamProtocol property (spNone, spHardware, spXOnXOff) Maybe you have unstable connection.

What do you use on other end of serial port? You to test ZModem session with Hyper Terminal.

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

Drew

Roman,

Thanks for your quick reply.

THis is the output from the TnrLog component that is linked to the ZModem;

[22/05/2008 12:32:16] nrComm Lib v8.04 Pro Windows XP [5.1.2600] Service Pack 2
[22/05/2008 12:32:16] nrZModem: SendFile U:\Configuration training\Configuration CD\MM4 RTU Firmware\ARCOM_703345.EXE
[22/05/2008 12:32:16] nrZModem: Answer Begin session ...
[22/05/2008 12:32:16] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[22/05/2008 12:32:16] nrZModem: Is RINIT or Challenge !!!
[22/05/2008 12:32:16] nrZModem: Is RINIT !!!
[22/05/2008 12:32:16] nrZModem: File opened [U:\Configuration training\Configuration CD\MM4 RTU Firmware\ARCOM_703345.EXE]
[22/05/2008 12:32:16] nrZModem: Answer ZFile [arcom_703345.exe\00h1345082 10033044522 0 0 1 1345082\00h]
[22/05/2008 12:32:16] nrZModem: zRxHdr: 42,09 [00,00,00,00] CRC=00A8
[22/05/2008 12:32:16] nrZModem: Is RPOS !!!
[22/05/2008 12:32:16] nrZModem: Answer ZData [Pos=0]
[22/05/2008 12:32:27] nrZModem: zRxHdr: 42,09 [00,04,00,00] CRC=0074
[22/05/2008 12:32:27] nrZModem: Interrupt RPOS [1024] !!!
[22/05/2008 12:32:27] nrZModem: Answer ZData [Pos=1024]
[22/05/2008 12:32:27] nrZModem: zRxHdr: 42,03 [00,08,00,00] CRC=0047
[22/05/2008 12:32:27] nrZModem: Is ZACK (2048)
[22/05/2008 12:32:27] nrZModem: Answer ZData [Pos=2048]
[22/05/2008 12:32:38] nrZModem: zRxHdr: 42,09 [00,0C,00,00] CRC=00DD
[22/05/2008 12:32:38] nrZModem: Interrupt RPOS [3072] !!!
[22/05/2008 12:32:38] nrZModem: Answer ZData [Pos=3072]
[22/05/2008 12:32:38] nrZModem: zRxHdr: 42,03 [00,10,00,00] CRC=00AD
[22/05/2008 12:32:38] nrZModem: Is ZACK (4096)
[22/05/2008 12:32:38] nrZModem: Answer ZData [Pos=4096]
[22/05/2008 12:32:48] nrZModem: zRxHdr: 42,09 [00,14,00,00] CRC=0037
[22/05/2008 12:32:48] nrZModem: Interrupt RPOS [5120] !!!
[22/05/2008 12:32:48] nrZModem: Answer ZData [Pos=5120]
[22/05/2008 12:32:48] nrZModem: zRxHdr: 42,03 [00,18,00,00] CRC=0004
[22/05/2008 12:32:48] nrZModem: Is ZACK (6144)
[22/05/2008 12:32:48] nrZModem: Answer ZData [Pos=6144]


This is the same before and after changing the StreamProtocol property of the serial port.

Can you tell what is happening from this output?

Drew

Roman Novgorodov

Drew

What baud rate do you use? ZModem sends 1024 byte data blocks and if you are using low baud rate speed, the total speed of transmission can be low.

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

Drew

Roman,

I'm using 115,200 baud, so it shouldn't take long to transmit.

Using HyperTerminal as the other end, the ZModem sessions connects, but HyperTerminal shows packets being received only every 10 seconds.

Drew

Roman Novgorodov

May 22, 2008, 01:17:00 pm #5 Last Edit: May 22, 2008, 01:18:43 pm by Roman Novgorodov
Hi Drew

I hope we have repeated your situation on our side.

Please add flag tsTxEmpty into TnrComm.TraceStates property and try to transmit a file again.

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

Drew

Thanks, Roman, that seems to have fixed it.

One other question; once the download has completed, do I need to set the TnrZModem component to Active=false or will that happen automatically.  Similarly do I have to set the Comms port to active=false?

Which are the best events to use at the end of the download?

Thanks

Drew

Roman Novgorodov

Drew,

If TnrZModem.Active property is True, the component waits the incoming ZModem transfer session and it is ready to receive files. If you don't want to receive files you can set this property in False. But before send file this property should be True too.

If serial port is closed (the TnrComm.Active is False) the TnrZModem do nothing.

QuoteWhich are the best events to use at the end of the download?


You can use following event:


  • TnrZModem.OnSuccessfulEnd This event raises after several files are transfered.

  • TnrZModem.OnAfterFileSent This event raises after one file is transfered.



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

Drew

Thanks, Roman.  It seems to be working now, so thanks for all your time on this.

Drew

Drew

Roman,

I though it was working, but I recently came across this problem;

[02/06/2008 11:50:42] nrComm: The port COM2 succesful opened
[02/06/2008 11:50:44] nrZModem: SendFile D:\Altham\MM4 RTU Firmware\ARCOM_703345.EXE
[02/06/2008 11:50:44] nrZModem: Answer Begin session ...
[02/06/2008 11:50:44] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[02/06/2008 11:50:44] nrZModem: Is RINIT or Challenge !!!
[02/06/2008 11:50:44] nrZModem: Is RINIT !!!
[02/06/2008 11:50:44] nrZModem: File opened [D:\Altham\MM4 RTU Firmware\ARCOM_703345.EXE]
[02/06/2008 11:50:44] Fatal Error: 3, 2, Error open file "D:\Altham\MM4 RTU Firmware\ARCOM_703345.EXE" !!!
[02/06/2008 11:50:44] Fatal Error: 1, 0, Error open file "D:\Altham\MM4 RTU Firmware\ARCOM_703345.EXE" !!!
[02/06/2008 11:50:54] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[02/06/2008 11:50:54] nrZModem: Is RINIT or Challenge !!!
[02/06/2008 11:50:54] nrZModem: Is RINIT !!!
[02/06/2008 11:50:54] Fatal Error: 1, 0, List index out of bounds (0)
[02/06/2008 11:50:54] nrZModem: Timeout!!! 10000 ms
[02/06/2008 11:50:54] nrZModem: Answer Begin session ...
[02/06/2008 11:50:58] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[02/06/2008 11:50:58] nrZModem: Is RINIT or Challenge !!!
[02/06/2008 11:50:58] nrZModem: Is RINIT !!!
[02/06/2008 11:50:58] Fatal Error: 1, 0, List index out of bounds (0)
[02/06/2008 11:51:04] nrZModem: Timeout!!! 10000 ms
[02/06/2008 11:51:04] nrZModem: Answer Begin session ...
[02/06/2008 11:51:04] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[02/06/2008 11:51:04] nrZModem: Is RINIT or Challenge !!!
[02/06/2008 11:51:04] nrZModem: Is RINIT !!!
[02/06/2008 11:51:04] Fatal Error: 1, 0, List index out of bounds (0)
[02/06/2008 11:51:14] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[02/06/2008 11:51:14] nrZModem: Is RINIT or Challenge !!!
[02/06/2008 11:51:14] nrZModem: Is RINIT !!!
[02/06/2008 11:51:14] Fatal Error: 1, 0, List index out of bounds (0)
[02/06/2008 11:51:14] nrZModem: Timeout!!! 10000 ms
[02/06/2008 11:51:14] nrZModem: Answer Begin session ...
[02/06/2008 11:51:19] nrZModem: zRxHdr: 42,01 [00,00,00,27] CRC=00FE
[02/06/2008 11:51:19] nrZModem: Is RINIT or Challenge !!!
[02/06/2008 11:51:19] nrZModem: Is RINIT !!!
[02/06/2008 11:51:19] Fatal Error: 1, 0, List index out of bounds (0)
[02/06/2008 11:51:24] nrZModem: Timeout!!! 10000 ms

It seems as though the component can't open the file, but HyperTermoinal can download the same file without problem.  Is there a limit to the length of the filename or path?

Any other thoughts?

Drew

Drew

OK, I've found what was causing this.  The file that we were trying to send by ZModem was marked as Read-only.  Don't know why this should cause a problem, but removing the read only attribute sorted the problem.

Drew