Hello,
i have to add a lib package (libmodubus and fieldbuslib) to my project.
I haven't downloaded the package neither from github nor internet, i have it on a workmate pc.
I have zipped the package so i can add it to the Arduino IDE 2.0.x and i have did it.
The problem is when i compile it, i get the following error:
"H:\Documents\Arduino\libraries\Libmodbus\src\modbus-tcp.c:49:11: fatal error: netinet/ip.h: No such file or directory".
"# include <netinet/ip.h>"
I check the file where these header are and i didn't find the /ip.h.
The question is: how can i overcome this problem?
In other words, what have i to do get the /ip.h header ?
I am using ESP32S3
Which Arduino? And what library are you talking about?
I suspect it's THIS one, where I can't see any reference to Arduino, that library is declared to be "for Linux, Mac OS, FreeBSD and Windows".
In fact, it seems "netinet/ip.h" is part of THIS code from FreeBSD, and I don't know if it can be used with Arduino.
If you need to work with Modbus, why don't you use a standard Arduino library, like THIS for example?
Yes, because you need also that "netinet" library.
You're right, if you're using ESP32 you can't/don't (but you haven't specified your board before ).
So, even if I never userd ESP32 with modbus, in this case I think you can have a quick search for an ESP32 Modbus library. For example, see and try THIS ESP32 specific library
As I didn't know either how you connect to Modbus or what IDE you want/need to use, my previous link was just an example. So googling for "ESP32 modbus arduino ide" could help you more than me.
I need a Modbus library package that is compatible with the Fieldbus library package.
When i compile This with Fieldbus in Arduino IDE i get an error which says:
netinet/ip.h not found.
I searched on the net and i found a ip.h and downloaded but then i got other problems.
So now i will be looking for some library which would be compatible with Fieldbus lib package.