Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modbus TCP Transaction ID >255 #256

Closed
Kudie86 opened this issue Jan 4, 2018 · 5 comments
Closed

Modbus TCP Transaction ID >255 #256

Kudie86 opened this issue Jan 4, 2018 · 5 comments
Labels

Comments

@Kudie86
Copy link

Kudie86 commented Jan 4, 2018

Versions

  • Python: 2.7
  • OS:
  • Pymodbus: 1.4

Pymodbus Specific

  • Server: tcp - async
  • Client: tcp - sync

Description

Hello,

I have a async modbus TCP server running on a RaspberryPi and a windows computer as a sync client. With pymodbus 1.4.0 the server stops responding after several time, which is not the case with pymodbus 1.3.2. I checked with wireshark and found out that the server does not respond to Transaction IDs larger than 255. When I start a new client, which starts with Transaction ID 1, the server is again running until Transaction ID 255.

Best regards,
Jörg

@dhoomakethu
Copy link
Contributor

Could you please attach the debug logs for both client and server.

@Kudie86
Copy link
Author

Kudie86 commented Jan 4, 2018

logging_client.log
logging_server.log

Attached the logs.
The client has a timeout at transaction 256 (row 1793). The position where the server stops is in row 2983 in the server log.
I use a single thread (threading library) to read data out of the data store in the server and put it to a digital-analog-converter.

@dhoomakethu
Copy link
Contributor

Got it thanks, I could reproduce the b issue and found out the reason. Will give you a patch by tomorrow

@dhoomakethu dhoomakethu added this to the 1.4.1 milestone Jan 4, 2018
@dhoomakethu dhoomakethu added the Bug label Jan 4, 2018
@dhoomakethu
Copy link
Contributor

@Kudie86 Please use this branch and see if it fixes your issue.
https://github.com/riptideio/pymodbus/tree/%23256-Fix-TCP-Server-Transactions

@Kudie86
Copy link
Author

Kudie86 commented Jan 5, 2018

Great, it is working now! Thanks!

@Kudie86 Kudie86 closed this as completed Jan 5, 2018
dhoomakethu added a commit that referenced this issue Jan 13, 2018
dhoomakethu added a commit that referenced this issue Jan 13, 2018
dhoomakethu added a commit that referenced this issue Apr 26, 2018
*  Modbus sync client timing enhancements #221
 Fix TCP server #256, #260

* Fix #221 timing enhancements, #188 workarounds

* 1. #284 Async servers - Option to start reactor outside Start<server>Server function
2. #283 Fix BinaryPayloadDecoder/Builder issues when using with pymodbus server
3. #278 Fix issue with sync/async servers failing to handle requests with transaction id > 255
4. #221 Move timing and transcational logic to framers for sync clients
5. #221 More debug logs for sync clients
6. Misc updates with examples and minor enhancements

* 1. #277 MEI message reception issue with UDP client
2. Fix unit tests
3. Update changelog

* Patch 1 (#292)

* Fix #289 and other misc enhancements

* Replace nosetest with pytest

* Update Changelog

* serial sync client wait till timeout/some data is available in read buffer + update changelog

* serial sync client read updates when timeout is None and Zero

* fix sync client unit test and example
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants