espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.32k stars 1.56k forks source link

(ASCII, RTU, TCP) mode in Kconfig (GIT8266O-670) #1093

Open KamranArain opened 3 years ago

KamranArain commented 3 years ago

I am trying to use serial Modbus but can't find any thing in menuconfig. if I remove tcp from menuconfig it generates and error

ESP8266_RTOS_SDK/components/freemodbus/modbus/include/mbconfig.h:66:2: error: #error "None of Modbus communication mode is enabled. Please enable one of (ASCII, RTU, TCP) mode in Kconfig.

I also searched for CONFIG_FMB_COMM_MODE_RTU_EN but could not find it any where in whole project.

ESP-YJM commented 3 years ago

@KamranArain Now ESP8266 only support Modbus TCP mode.

KamranArain commented 3 years ago

can't I use these files freemodbus/modbus. There is RTU and ASCII file in freemodbus. There is some one who used older version v1.4.x for RTU oh5fsz/freemodbus I want to use newer version is there any help which I can use. I want to use serial RTU to get data from other board and push it over TCP local server. please help if there is any way to use RTU with this version I tried but it didn't worked with newer version.

KamranArain commented 3 years ago

I also set CONFIG_FMB_COMM_MODE_RTU_EN in sdkconfig.h and it allowed me to play with it but I didn't succeed.

ESP-YJM commented 3 years ago

@KamranArain Yes, freemodbus/modbus has RTU and ASCII, but we only adapte port level to support TCP mode.