# Communication issue on raspberry Pi with S7 PLC

**URL:** <https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998>\
**Category:** General\
**Created:** [11 March 2020 21:45 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998 "2020-03-11T21:45:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenzim1992](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Kenzim1992](https://discourse.nodered.org/u/Kenzim1992)\
**Post date:** [11 March 2020 21:45 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/1 "2020-03-11T21:45:07Z")

</div>

Hello everybody

I have the following problems:

I have installed Node Red on my Windows Cumouter and created the program here  
I connected the controller, set the S7 Node and MQTT parameters and everything worked at once  
Now further I have the identical code running on my Raspberry Pi but I get no connection with the s7-300

Ip address of the s7 is 192.168.0.1  
eth0 from the pi has 192.168.0.50/24  
Wlan from Pi has 192,168,43,81/24

Does anyone have any experience with this mistake?

I have looked at the Port with the command 'netstat' once. Is this Node Red running three times on 1880? Ist this the Failure? When yes how can i stop this?

When I compare the ports on my PC I don't see port 1880! :-S

The latest version of Rasbian is installed on the Raspberry Pi "Rasbian Buster 2020-02-13"

I hope You can Help me.

 ![IMG_20200311_223008](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d64fdb3508e0e57ac1b9f7f9383a79832c8ac63d.jpeg)  
[flows (5).json](https://discourse.nodered.org/uploads/short-url/wMzBTYK1GouV4rM5c5yBvAZPC8N.json) (20.1 KB)

---

<div class="post-metadata">

**Author:** ![machadotiago](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/machadotiago/32/23776_2.png) [@machadotiago](https://discourse.nodered.org/u/machadotiago)\
**Post date:** [19 March 2020 13:31 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/2 "2020-03-19T13:31:28Z")

</div>

Hi,  
sorry for my late response. It seems to be a network issue. Did you try pinging the PLC from your RPI?

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [19 March 2020 13:34 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/3 "2020-03-19T13:34:13Z")

</div>

Check also if you for some reason have several NR running, use command 'ps aux' in Linux

---

<div class="post-metadata">

**Author:** ![Kenzim1992](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Kenzim1992](https://discourse.nodered.org/u/Kenzim1992)\
**Post date:** [16 April 2020 17:22 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/4 "2020-04-16T17:22:51Z")

</div>

Hi folks

Thanks for your help. Didn't solve the problem but I was able to work around it with a simple switch (Netgear Prosafe GS10s).

Now I have the same problem again with a RFID portal reader. As long as I connect through a switch everything works fine.  
If I connect directly and do a static IP I can't ping over eth0. No PLC no portal reader.

I have tried various IP setup and cables and everything else. Everything did not work.

Do you have any idea?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [16 April 2020 19:53 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/5 "2020-04-16T19:53:06Z")

</div>

If you are trying connect 1:1 then a) both ends need to be configured with static addresses within the same segment. But not the same address. And b) you may need a crossover Ethernet cable as basic devices don’t do auto-crossover.

---

<div class="post-metadata">

**Author:** ![Kenzim1992](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Kenzim1992](https://discourse.nodered.org/u/Kenzim1992)\
**Post date:** [16 April 2020 20:01 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/6 "2020-04-16T20:01:51Z")

</div>

Hi dceejay

Thank you for the quick answer. The IP are RPI=192.168.0.249/24 und Portalreader=192.168.0.250/24

I`ll try with the crossover cable. Didn't think that a switch would do the crossover automatically 🤫 🙉

Could it be that the RPI 3+ did this on its own? In an old application with the RPI3+ and a PLC it worked without a switch with a standard ethernet cable. I use the same cable now on the Pi 4.

Thank you in advanced 👍 👍

---

<div class="post-metadata">

**Author:** ![Kenzim1992](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Kenzim1992](https://discourse.nodered.org/u/Kenzim1992)\
**Post date:** [22 April 2020 14:19 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/7 "2020-04-22T14:19:12Z")

</div>

Hi dceejay

I have tried using a crossover adapter and I still have the same problem.

Ip address of the Portalreader is 192.168.0.250/24  
eth0 from the pi has 192.168.0.36/24  
Wlan from Pi has 192.168.0.42/24

The wlan network and the lan network wer the Eth0 form the pi is connected ist the same.

Ip Scann = there are no conflicts.

Is there a Setting in the Pi i forgot?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 June 2020 14:19 UTC](https://discourse.nodered.org/t/communication-issue-on-raspberry-pi-with-s7-plc/22998/8 "2020-06-21T14:19:18Z")

</div>

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