So I am trying to realize the following Setup with a Raspberry Pi 3 B+ (latest Stretch Lite):
Modbus TCP/IP Device with a static IP Adress connected to the Raspi Pi via Ethernet.
Raspberry Pi Communicates to the Modbus Device.
Raspberry Pi functions as a Wifi Webserver to display a couple of PHP Websites.
The Webserver makes the Modbus device accessible over Wifi, with its static IP Adress.
The Modbus Communication is already up and running, using the libmodmus package (great package, props to the developer)
The PHP Webserver is also working flawlessly, using dnsmasq and hostapd.
To realize the accessible Modbus device, I plan to use a eth0 to wlan0 bridge, and try to get this running without the Webserver, and then try to combine both functionalities into the Raspi.
Two Problems are in my way in the moment:
Most Manuals online are outdated, using /etc/network/interfaces, while stretch wants most things to be handled over the /etc/dhcpcd/dhcpcd.conf file.
f.e. I tried using the Raspberry Wifi AP/Bridge, but had no success creating the bridge.
Even if I get the Bridge to work, I need DHCPCD to handle the Webserver and connected devices, so it can't be shut off to let /network/interfaces handle the bridge.
I hope i displayed my problem well and somebody can help me. If any additional information is needed, just let me know and I will provide it.
My Setup should look like the following:
wifi ┌──────bridge───────────┐ Modbus TCP/IP
(various <.~.~.~> │(wlan0) br0 (eth0) │ <--------------> Device
devices) <.~.~.~> |(wlan0) ap0 (webserver)|
IP: DHCP IP: static
Any Device Connected to the Wifi Should be able to contact the static IP of the Modbus device, as well as the Webserver
The Raspberry should be able to contact the Modbus device too
Every solution on StackExcahnge or other websites didint work for me, they either:
disabled the webserver
didnt properly bridge
disabled Raspberrys Communication with the Modbus device