• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

ZModem can't send data to the specific hardware

Started by Alex Kononov, November 15, 2011, 04:04:15 pm

Previous topic - Next topic

Alex Kononov

Hello,

Our company using specific hardware with z-modem communication protocol.
As you told, i've tried to use DTerminal exampl. It works for receiving data from PC to hardware unit with enabled zoWithoutRZ option, but i can't send any file.
You can see log in the attachment.

Thank you,
Alex.


Roman Novgorodov

November 15, 2011, 04:28:24 pm #1 Last Edit: November 15, 2011, 04:30:21 pm by Roman Novgorodov
Hello

It seems like you call InitDeviceConnect() or GetPNPDeviceString() methods of TnrComm class.
It is outdated methods for Windows PNP process. Please exclude these methods and try again.

Also check serial port settings: StreamProtocol := spHardware, baud rate and etc.

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.

Alex Kononov

November 15, 2011, 04:31:59 pm #2 Last Edit: November 15, 2011, 05:15:52 pm by Alex Kononov
Roman,
Hardware unit based on DOS microboard and any changes at these side is problematic (it's thirdparty unit for as; we do not have source code to do changes)
I'm using DTerminal example from your demo codes; I can't find any calls of InitDeviceConnect() or GetPNPDeviceString() methods.

Short update

Ok, looks that it works now with enabled zoChallenge settings and disabled zoCheckConnection; but it works extremely slowly.
Hyperterminal sends the same file up to 20...50 times faster
Any ideas?

Roman Novgorodov

Hello

Yes had to set False zoCheckConnection.

About speed.
Give us details about serial port properties (baud rate parity etc.)  and we will check on our side.

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.

Roman Novgorodov

Hello

Also I recommend to set TnrComm.Log and TnrZModem.Log into null and test speed again.

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.

Alex Kononov

November 15, 2011, 08:47:09 pm #5 Last Edit: November 15, 2011, 08:54:46 pm by Alex Kononov
Baud Rate = 115200
Stop Bits = 1
Stream protocol = spNone

I've selected exactly the same settings in Hyperterm and it works fine; these parameters is predefined with our system.

I've tried to disable any loggers but i'm not lucky.
When i'm using your component display on my unit freezing every 2..3 secs and then show "receiving 2048bytes... receiving 4096 bytes" etc
When i'm using hyperterm display updates in the real time very quicly and continually "receiving 1 bytes... receiving 2 bytes" etc

If you want i can rec a short video and send it to your personal messaging system

Roman Novgorodov

Hello

Please set tsTxEmpty in TnrComm.TraceStates property.

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.

Alex Kononov

November 16, 2011, 12:45:18 pm #7 Last Edit: November 16, 2011, 01:10:53 pm by Alex Kononov
With enabled tsTxEmpty unit shows '"receiving 1024 bytes" for a 5 secs,  then "ReadFileData: frame = -1" and that's all...
I've found that our unit using GreenLeafSoft CommLib library;
This is one of the tips from GreenLeafSoft site:

"I am having problems sending files using ZModem in Win32. I am using the default sliding window and the file transfer repeatedly fails at the same location.
Why does it fail and is there anything that can be done to correct this problem?"

Answer:
"The first thing to determine is if the receiver is experiencing buffer overflows or UART overrun errors. If either of these is true, this does not indicate a problem with the Modem file transfer but could cause the transfer to fail.
If the receiver is not experiencing either of these conditions, the transfer may be failing because the default Tx buffer size for the port is too small (1050 bytes).
The default window size for ZModemSendWithOptions() in CommLib is 4096 bytes. The mismatch in buffer vs. window size may cause a failure when trying to place a data subpacket into the small Tx buffer because there isn't enough free space.
If no other underlying problems are occurring, this problem might be corrected by increasing the size of the Tx buffer to 4096 or 8192 bytes using the function SetDefaultBufferSize before opening the port."

I tried to use different In/Out buffer size in your component unsuccessfully.

Roman Novgorodov

Hello

It is strange.

We have tested today various combinations of ZModem transfer over null-modem cable (COM1 <-> COM6) 115200, spNone:

1)  DTerminal COM1 <-> DTerminal COM6
2)  HyperTerminal COM1 <-> DTerminal COM6

All works fine and speed of transfer is not differ.

It seems like something wrong with baud rate of stream protocol settings of serial connection on your side.
Please upload latest LOG file.

Also , if you can, please, grant me TeamViewer access to your test machine, I will look at place.

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.

Alex Kononov

You can see the latest logs in attachment

Thank you,
Alex.