Platform: Windows 7 64 - bit
Languages: c #
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Using c # developed A PC (WinForm) small program, using UDP asynchronous communication mode, the connection between the PC and charged equipment turn A RS485 Ethernet devices (shorthand for: A) module, the beginning of A PC sends instructions through the module can be normal control supports RS485 protocol is accused of equipment, including the temperature of the equipment setting, boot, temperature reading, shutdown, and other functions can be normal, but the temperature reading after A period of time, the temperature of the upper machine to send to read instructions will no longer be the response, by the preliminary debugging found PC just call the function to send A message, but it's actually A message has not been sent out successfully, so wondered why communication under the normal state will appear this kind of circumstance? How should solve?
Please tell the teacher, rightly or wrongly, views, thank you very much!
CodePudding user response:
Debugging data interaction1. Suggest using minisniffer caught tools such as
With precise positioning in which link out the problem
2. Debugging data interaction to avoid breakpoint debug
Because of the interrupt state and is not the same as the normal operation of the
It is recommended to use log or Debug. Writeline () output data
CodePudding user response:
Udp problems, such as creating good udp socket, sendto succeeded, but in fact is false, I judge is through the response timeout udp is dead, and to establish a udp socket