-
Notifications
You must be signed in to change notification settings - Fork 17
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
Error message after running "epevermodbus --portname /dev/ttyUSB0 --slaveaddress 1" #27
Comments
Can you enable the debugging-feature in the In https://github.com/rosswarren/epevermodbus/blob/main/epevermodbus/driver.py#L43 add a line Please provide the output afterwards. |
Hi, thank you very much for your response! I added this line after Line43 (
I am using a Foiled Twisted Pair Cat5e cable, After cutting the cable, I left out only wires 4(blue) and 6(green). and on the other end of the USB to RS485 converter, I placed to A (D+) the green wire and to B (D-) de blue wire. I was inspired by Adam Welch's video about making a custom cable for communicating with your Epever Tracer (https://www.youtube.com/watch?v=r3LrWeYYtnQ&t=188s&ab_channel=AdamWelch) |
My guess is, that it is not an issue with your cable, but with the RS485 transceiver: Your transceiver has local echo enabled. So every word written on the bus is also received. This is generally not a bad thing. But we need to tell After your (I am sure there is a way to do it in the Linux serial stack, too. But I am always confused which flags to set on the line discipline...) |
After inserting a new line with |
Sorry for the delay. (I was on some vacation.) But this riddle still bothers me: I still suspect that this is a problem in handling the local echo, since A few more ideas:
|
Hi, no problem, I did manage to solve thre issue by buying their original
RS485 to USB converter and it works fine.
With my custom cable, I changed wires between them, cut out other wires and
connecting to different pins to try out but with no success.
Thank you for your help!
…On Fri, 17 May 2024, 13:45 SmithChart, ***@***.***> wrote:
Sorry for the delay. (I was on some vacation.) But this riddle still
bothers me:
I still suspect that this is a problem in handling the local echo, since
MinimalModbus receives back what it has send - but just one byte less.
A few more ideas:
1. Do you have the option to capture what is actually going on "on the
wire"? e.g. with another RS485 transceiver/cable or a logic analyzer?
2. Let's try a few more options on Minimalmodbus:
2.1) After self.handle_local_echo = True set self.precalculate_read_size
= False. Let's see if this already changes something. But I do not
think that this will do the trick.
2.2) After self.precalculate_read_size = False add another
"self.serial.timeout = 1.0`. This will lead to *very* long timeouts
for each transaction. But maybe something here is very slow and we thus do
not capture the whole transmission from the bus.
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5ZUMN3PWIK7X2KKB7I7QM3ZCXNWHAVCNFSM6AAAAABG26RCAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXGI4TGNBUGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Great to hear this solved the problem. Good to know that is is a problem of the cable or a combination of cable and how Feel free to close the issue when it is resolved for you. |
Hi, I'm having issues when running this command ("epevermodbus --portname /dev/ttyUSB0 --slaveaddress 1"):
"raise InvalidResponseError(text)
minimalmodbus.InvalidResponseError: Checksum error in rtu mode: b'\x01?' instead of b'I?' . The response is: b'\x01\x041\x00\x00\x01?' (plain response: b'\x01\x041\x00\x00\x01?')"
My Epever Tracer 1210AN is connected to my Raspberry Pi 4 model B through a USB to RS485 converter (CHT340)
Here is the output for "stty -F /dev/ttyUSB0":
"speed 115200 baud; line = 0;
min = 0; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke"
I checked also the cabling in-between them with multimeter before actually connecting them together and everything seems to be in order.
The text was updated successfully, but these errors were encountered: