# Establishing communication between IOT2040(Node-Red) and S7-1200 using Putty

**URL:** <https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397>\
**Category:** General\
**Created:** [30 March 2021 11:57 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397 "2021-03-30T11:57:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashwin](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Ashwin](https://discourse.nodered.org/u/Ashwin)\
**Post date:** [30 March 2021 11:57 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397/1 "2021-03-30T11:57:54Z")

</div>

//NODE RED V0.20.7  
//NODE JS V14.16.0  
//IOT2040 Module - 6ES7 647-0AA00-1YA2  
//Putty RELEASE 0.7

While downloading S7 library into IOT2040 when we enter the command **npm install node-red-contrib-s7** in Putty, following error is seen-

npm ERR! code EAI\_AGAIN  
npm ERR! errno EAI\_AGAIN  
npm ERR! request to [https://registry.npmjs.org/node-red-contrib-s7](https://registry.npmjs.org/node-red-contrib-s7) failed, reason: getaddrinfo EAI\_AGAIN [proxy.company.com:8080](http://proxy.company.com:8080)

npm ERR! A complete log of this run can be found in:  
npm ERR! /home/root/.npm/\_logs/2021-03-30T11\_36\_16\_150Z-debug.log

Kindly help us to resolve the issue,  
Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 March 2021 12:06 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397/2 "2021-03-30T12:06:10Z")

</div>

**EAI\_AGAIN** means the DNS server replied that it cannot currently full fill the request

The device requires internet connection to download / install extra nodes.

Can you ping 8.8.8.8 from inside the putty session?

Can you curl something from the internet? e.g what do you get if you run `curl https://flows.nodered.org/node/node-red-contrib-s7` (inside the putty session to the IOT box)?

PS, out of curiosity, how have you got NODE JS V14.16.0 running on an IOT2040 ?  
PS2: node-red V0.20.7 is seriously out o date. If you really have nodejs V14 you can run node-red V1.2.9 (current release)

---

<div class="post-metadata">

**Author:** ![Ashwin](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Ashwin](https://discourse.nodered.org/u/Ashwin)\
**Post date:** [30 March 2021 12:25 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397/3 "2021-03-30T12:25:44Z")

</div>

Thanks for your reply,

1. We ping 8.8.8.8 from inside the putty session we are getting response.

2. When we type **curl [node-red-contrib-s7 (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-s7)** the response is  
**Could not resolve host: [flows.nodered.org](http://flows.nodered.org)**

Refer the Screenshot attached.

Regarding the PS Node JS version is of localhost so it is not concerned here in IOT2040.

Thanks,  
Awaiting for your reply.

 ![PUTTY](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4cc921d2cb25d6843b14c0be6625b44b1893c2ce.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 March 2021 13:11 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397/4 "2021-03-30T13:11:34Z")

</div>

so it is definitely a DNS issue - the box can access external resources but cant perform DNS lookups.

PS, this issue has been on the forum several times. A quick search lead me to a post that links to [this siemens post](https://support.industry.siemens.com/tf/ww/en/posts/dns-setup-with-fixed-ip/162724/)

Have you tried that?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 March 2021 13:33 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397/5 "2021-03-30T13:33:59Z")

</div>

> [@Ashwin](#):
>
> Regarding the PS Node JS version is of localhost so it is not concerned here in IOT2040

In which case it is of zero relevance (putty commands are executed on the remote box and the localhost NODEJS version is completely irrelevant)  
But thanks for clarifying - siemens dont seem to be supporting their hardware beyond nodejs 8 (or is it v10 - i forget?).

---

<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:** [29 May 2021 13:34 UTC](https://discourse.nodered.org/t/establishing-communication-between-iot2040-node-red-and-s7-1200-using-putty/43397/6 "2021-05-29T13:34:35Z")

</div>

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