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

Sporadic fail on readRegisters #35

Open
marn06 opened this issue Jun 15, 2023 · 3 comments
Open

Sporadic fail on readRegisters #35

marn06 opened this issue Jun 15, 2023 · 3 comments

Comments

@marn06
Copy link

marn06 commented Jun 15, 2023

Hi @dkjonas

Thanks a lot for the great work you have done with this project. I am using your code with a few small changes on an ESP32-C3. Unfortunately I see sporadic fails when reading registers, is this something you also experience? See mqtt log, where POLL represents the start of reading registers on all channels:
image

@marn06
Copy link
Author

marn06 commented Jun 15, 2023

Hi @dkjonas
I actually think I found the solution, at least I haven't had any fails for hours, with the new code in bold added:
Serial1.begin(38400, SERIAL_8N1, rxPin, txPin);
ESP_ERROR_CHECK(uart_set_mode(UART_NUM_1, UART_MODE_RS485_HALF_DUPLEX));

@Roarrk
Copy link

Roarrk commented Nov 12, 2023

Hey @marn06

Would you mind sharing your esp32-c3 repo - and are you able to use uart directly from the esp-c3 or do you still need a max3072e? My setup with a 8266 works, but I'm having intermittent issues so I'm looking to try alternatives

@marn06
Copy link
Author

marn06 commented Nov 13, 2023

Hi @Roarrk
Sure, but my code is based on this board, let me know if you are still interested.
https://www.ustepper.com/shop/#!/products/esphome-modbus-module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants