harihanv / esp32-modbus-gateway

esp32 port of modbus RTU to TCP Arduino gateway
GNU General Public License v3.0
60 stars 28 forks source link

ArduinoRS485.h #1

Open hismastersvoice opened 3 years ago

hismastersvoice commented 3 years ago

Hello,

I'm really interested in this project, but have issues. The standard Lib ArduinoRS485.h is nor build for ESP32, and there is no Pin definition. So there I get direct an error message. How does it work for you, Is there a solution?

Do you still work on this project? I`m really like forward to build this wird an ESP32 and afterwords on an WT32-ETH01 Borad (only small changes needed)

Thanks in advance.

Dieter

harihanv commented 3 years ago

Hi,

I would like to continue on this project. It is ported on esp32-s2. I need sometime to figure things out. I will share the details with you.

Regards, Harish

On Mon, 25 Oct, 2021, 10:57 pm hismastersvoice, @.***> wrote:

Hello,

I'm really interested in this project, but have issues. The standard Lib ArduinoRS485.h is nor build for ESP32, and there is no Pin definition. So there I get direct an error message. How does it work for you, Is there a solution?

Do you still work on this project? I`m really like forward to build this wird an ESP32 and afterwords on an WT32-ETH01 Borad (only small changes needed)

Thanks in advance.

Dieter

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/harihanv/esp32-modbus-gateway/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEH5LCTZYPBRRYWGDFOGXTUIWHRNANCNFSM5GVZ6CGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

hismastersvoice commented 3 years ago

Thanks for your quick answer. Maybe an important information, I've used Arduino IDE not Platform IO.

harihanv commented 3 years ago

I have also built using arduino ide using libraries. Due to personal reasons, I need more time to upload details

On Tue, 26 Oct, 2021, 11:59 am hismastersvoice, @.***> wrote:

Thanks for your quick answer. Maybe an important information, I've used Arduino IDE not Platform IO.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harihanv/esp32-modbus-gateway/issues/1#issuecomment-951603506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEH5LEI4WZXPW3QWMILHBDUIZKG3ANCNFSM5GVZ6CGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

agisofttm commented 2 years ago

@hismastersvoice everything is working more than perfect with code and ArduinoRS485.h, but you need to install not Ordinary Library of Arduino - you need to install @harihanv library which is in other repository

Also @harihanv your code is running with RS485 chip which is capable of auto flow control, but doesn't work with cheap MAX485 boards, because they need control pin for Flow Control. You Wrote in the description about this and you say that you use PIN6 for this, but it's not working with MAX485 chips - did you have some time to think about it, and also - the code Is working for ESP32, is there a way to rewright this specific code for ESP8266 ? I'm willing to pay that as well

agisofttm commented 2 years ago

@harihanv there are some bugs also, but it's working unbelievable correct !!!

harihanv commented 2 years ago

Thanks for the update. Please let me know the bugs, we can fix them. Esp32 has recommended hw control auto for rs485.

I will try to put back the direction control code.

Regards, Harish

On Sat, 20 Nov, 2021, 2:31 am agisofttm, @.***> wrote:

@harihanv https://github.com/harihanv there are some bugs also, but it's working unbelievable correct !!!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/harihanv/esp32-modbus-gateway/issues/1#issuecomment-974469288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEH5LB3QJLV4Y6IKNS3FTLUM23KLANCNFSM5GVZ6CGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

agisofttm commented 2 years ago

Thanks for the update. Please let me know the bugs, we can fix them. Esp32 has recommended hw control auto for rs485. I will try to put back the direction control code. Regards, Harish

Bugs are on settings for TCP/UDP section and RS485 Settings - on TCP/UDP section you cannot fill UDP port, and on RS485 Settings section I'm pretty sure that you cannot control Baud Rate, Data bits, Parity and Stop Bits. I'm testing your code on GREE Versati II Thermopump which is working only on 9600/8/N/1, and should not work on other settings, but whatever I change it to something it's working as well.

maufc commented 2 years ago

It is working for me at 9600, 8-N-1. Web interface seems like is not reflecting the serial configuration. The IP parameters can't be modify and I am pretty sure that are working as DHCP only. If somebody continue with this great project I would suggest to include Ethernet interface as in Arduino version (just because a cable is more reliable than a wireless connection) and make it work for ESP8266 (just because I got many of these boards and I would like to use them ;-) Cheers!