Use ETH0 and WLAN on a Raspi at the same time

Hello.

Used LINUX on my Raspi: RASBIAN LINUX 11

I am now merging my project to my Raspi. My project is to control my pump via a webbrowser.The pump i controled via NODE-RED and MODBUS.

PUMP <----> MODBUS (NODE RED) <-----> MQTT Server (vm LINUX) <---> NODE RED DASHBOARD (vm LINUX)

Now i want to merge the MODBUS (NODE RED) workload to a raspi that further will publishe the data to MQTT via WLAN.

In the past, my pump was connected to my network (via THCP) and i used this IP to connect my PC via NODE RED modbus to the pump.

Now my pump is connected via LAN to my Raspi. I configured my pump in a way that it will use now a preconfigured IP (192.168.....)

So my problem right now ( i think): I somehow need to tell my ETH0 port to use the 192..network, so that i can use my node-red-modbus node, and use the WLAN on my RASPI in a normal way to publish the data

It took me hours to even "see" the problem. I still dont know if i forumlated the problem correct.

Maybe someone has an idea or can point me in the right direction

Thank you

Hola Manuel_o

If your Raspberry Pi ethernet and wifi have IPs in different ranges, eg 192.168.1.42 and 10.0.0.7 then I think you need to set the Pi up to bridge the networks.

Look in the Raspberry Pi documentation and forums for "bridging".

This is an operating system/networking issue rather than Node-red.

Alternatively, maybe it will work if you use a cloud based MQTT server such as hivemq

Do you mean the pump is connected to one end of an ethernet cable and the other end is connected to the pi and you don't have a router or anything else connected to that?

Do you not have access to the original LAN which is connected to a router where the pi is?

If my questions don't make sense then please paste a diagram showing the networks and cabling and routers that there are.

1 Like

On your Pi you need to set up a static IP (assuming it's just your PI and the pump connected to that network) - eg see Pi networking - Configuring Networking on The Raspberry Pi

Then you should be able to ping the pump from the Pi...

Likewise you probably need to set the WLAN interface to DHCP as it then gets given an address from the Wireless AP / router you connect to... then the Pi should be able to ping wherever the wifi connects to.

If Node-RED is running on the Pi it shouldn't need to set up routing from one side to the other as it should be able to see both anyway, and that way the pump can't see the wifi (and vice versa) which is probably a good thing for safety/security.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.