Author Topic: ZModem can't send data to the specific hardware  (Read 1175 times)

Alex Kononov

  • Newbie
  • *
  • Posts: 7
    • View Profile
ZModem can't send data to the specific hardware
« on: November 15, 2011, 06:04:15 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: ZModem can't send data to the specific hardware
« Reply #1 on: November 15, 2011, 06:28:24 pm »
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
« Last Edit: November 15, 2011, 06:30:21 pm by Roman Novgorodov »
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Alex Kononov

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ZModem can't send data to the specific hardware
« Reply #2 on: November 15, 2011, 06:31:59 pm »
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?
« Last Edit: November 15, 2011, 07:15:52 pm by Alex Kononov »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: ZModem can't send data to the specific hardware
« Reply #3 on: November 15, 2011, 10:39:33 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: ZModem can't send data to the specific hardware
« Reply #4 on: November 15, 2011, 10:43:09 pm »
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

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ZModem can't send data to the specific hardware
« Reply #5 on: November 15, 2011, 10:47:09 pm »
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
« Last Edit: November 15, 2011, 10:54:46 pm by Alex Kononov »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: ZModem can't send data to the specific hardware
« Reply #6 on: November 15, 2011, 11:00:29 pm »
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

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ZModem can't send data to the specific hardware
« Reply #7 on: November 16, 2011, 02:45:18 pm »
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.
« Last Edit: November 16, 2011, 03:10:53 pm by Alex Kononov »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: ZModem can't send data to the specific hardware
« Reply #8 on: November 16, 2011, 04:25:44 pm »
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

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ZModem can't send data to the specific hardware
« Reply #9 on: November 16, 2011, 05:34:29 pm »
You can see the latest logs in attachment

Thank you,
Alex.