Giter Club home page Giter Club logo

Comments (4)

MatthiasLohr avatar MatthiasLohr commented on July 17, 2024

Here with some debug logging:

DEBUG:modbus:Opening server socket
DEBUG:modbus:Entering server loop
DEBUG:modbus:Handling event 1 on <socket state=1 timeout=-1 incoming=0 off=0>
INFO:modbus:New connection from ('192.168.128.252', 39318)
INFO:modbus:Starting to serve 192.168.128.252:39318
DEBUG:modbus:TCP request: MBAP: 000100000006f7
DEBUG:modbus:TCP request: PDU: 0300640001
DEBUG:modbus:RTU request: ADU: f70300640001d143
DEBUG:modbus:RTU response: reading address+function
DEBUG:modbus:RTU response: address is 247 and function is 03
DEBUG:modbus:RTU response: reading data length
DEBUG:modbus:RTU response: reading 2 data bytes
WARN:modbus:RTU read: short read 3/4
DEBUG:modbus:RTU read ADU: f78304a0c1
DEBUG:modbus:TCP response: MBAP: 000100000003f7
DEBUG:modbus:TCP response: PDU: 8304
INFO:modbus:Served 192.168.128.252:39318
DEBUG:modbus:Handling event 1 on <socket state=4 timeout=-1 incoming=0 off=0>
INFO:modbus:Starting to serve 192.168.128.252:39318
INFO:modbus:Remote 192.168.128.252:39318 closed connection

from esp8266-modbus-gateway.

MatthiasLohr avatar MatthiasLohr commented on July 17, 2024

@marcin1j just pinging you in case you don't get notifications here - sorry for bothering anyways.

from esp8266-modbus-gateway.

marcin1j avatar marcin1j commented on July 17, 2024

WARN:modbus:RTU read: short read 3/4

No character could be read for 10 milliseconds. Even though the characters are produced with 19200 baud rate, there could be delays in between the character. Try raising timeout_char to something like 100 or even higher first, just to see if that solves the problem. If character timeout turns out to be the reason, binary search might help you to find the lowest value that works reliably with your device. Generally speaking, the lower the timeout, the better.

@marcin1j just pinging you in case you don't get notifications here - sorry for bothering anyways.

No problem. Indeed, I missed the notification from GibHub.

from esp8266-modbus-gateway.

MatthiasLohr avatar MatthiasLohr commented on July 17, 2024

Thanks for the hint! I played around with the value a bit, the error rate seemed to be reduced, but I still can't find an optimal value.

Are there other values to play with? I'm also getting CRC errors from time to time. No idea if it's issued by the device to be controlled, but this is a commercial device so I have no chance to debug... also not sure if maybe my Wemos D1 is too weak/the wrong platform for this code? I'm open for suggestions...

from esp8266-modbus-gateway.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.