Hi everybody,
i'm new in Espressif forum.
My order was: "ESP32: include a Modbus TCP server application over Etehrnet and WiFi"
My Platform for Arduino "ESP32-EVB" is: PlatFormIO ( newest: Home 2.0.0 ), and VisualStudioCode
platform.io:
[env:xxxxxxx]
platform = espressif32
board = esp32-evb
framework = arduino
board_build.partitions = default.csv
...
What i'm doing (after reading some examples) inside PlatFormIO:
1. append the new library "ArduinoModbus"
... compiling: he said missing "ArduinoRS485" ...
2. so i append the new library "ArduinoRS485"
3. i'm appending "lib_ldf_mode = deep+" in my platform.io, because installed libs are in:
"...\.platformio\lib\ArduinoModbus_ID5816"
"...\.platformio\lib\ArduinoRS485_ID5814"
My source modification is only 2 includes:
TEST1:
#include <ArduinoRS485.h> // ArduinoModbus depends on the ArduinoRS485 library
#include <ArduinoModbus.h>
the compiler said:
....
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp: In member function 'virtual void RS485Class::begin(long unsigned int)':
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp:33:29: warning: large integer implicitly truncated to unsigned type [-Woverflow]
begin(baudrate, SERIAL_8N1);
^
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp: At global scope:
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp:169:18: error: 'SERIAL_PORT_HARDWARE' was not declared in this scope
RS485Class RS485(SERIAL_PORT_HARDWARE, RS485_DEFAULT_TX_PIN, RS845_DEFAULT_DE_PIN, RS845_DEFAULT_RE_PIN);
^
In file included from D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp:20:0:
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.h:35:30: error: 'A6' was not declared in this scope
#define RS845_DEFAULT_DE_PIN A6
^
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp:169:62: note: in expansion of macro 'RS845_DEFAULT_DE_PIN'
RS485Class RS485(SERIAL_PORT_HARDWARE, RS485_DEFAULT_TX_PIN, RS845_DEFAULT_DE_PIN, RS845_DEFAULT_RE_PIN);
^
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.h:36:30: error: 'A5' was not declared in this scope
#define RS845_DEFAULT_RE_PIN A5
^
D:\orcad\spb_data\.platformio\lib\ArduinoRS485_ID5814\src\RS485.cpp:169:84: note: in expansion of macro 'RS845_DEFAULT_RE_PIN'
RS485Class RS485(SERIAL_PORT_HARDWARE, RS485_DEFAULT_TX_PIN, RS845_DEFAULT_DE_PIN, RS845_DEFAULT_RE_PIN);
^
Searching google for 'SERIAL_PORT_HARDWARE', found a: #define SERIAL_PORT_HARDWARE Serial1
but that makes no sense !!
TEST2:
i install the example: "5902/esp32ModbusTCP"
and again, only including the 3 #include files out of the example in my "Modbus_KE.cpp header":
#include <Arduino.h>
#include <WiFi.h>
#include <ModbusTCP.h>
=> error "ModbusTCP.h" not found ( and really it is NOT on my PC ! )
Everytime i'm installing another lib inside platformio ( PIO Home -> libraries )
i will get different errors.
I think there are some libs missmatched in the deep ?
Is there any way to solve this ???
Please help
By the way:
I need a ModbusServer example that uses also Ethernet and WiFi on a ESP32-EVB board ( or hardware: ESP32-WROOM-32 ).
It reads inside ESP32 board 10 Hz CAN-values and transmit it over Modbus-protocol Ethernet and/or Wifi to an external PC.
Greetings Wolfgang
Modbus TCP Server
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 96 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.