I have two devices running Node-RED. I'm trying to send data from one to another using Node-RED. For that here's what I've done :
the first device:
So the first one should just send the String "Testing" to the 2nd with IP 100.
On the second here's what I've done:
The problem is I'm not receiving anything, despite port and IP address checks.
Does anybody has a hint about how to solve this ?
It looks like you have configured both TCP (in and out) nodes to "connect" to the other.
This is wrong, you want to have the TCP-in node (on 192.168.178.10) configured to "Listen on" port 80 and then have the TCP-out node (on 192.168.178.100) configured to "Connect to" port 80 on 192.168.178.100.
Related
How does TCP segment knows what port number the segment needs to be sent to.
If I understand what you are asking correctly, then things are very simple. The port number of the recipient as well as the port number of the sending host are written as part of the TCP header at the very beginning. Have you ever seen a TCP header before? Take a look at the following picture. The first thing that any TCP header begins with are the source and destination ports of the sending and receiving sides.
If what you are asking is how does the destination port number get there in the first place, then the answer to that question is that the sending host places it there. What that means is that the sending host must know in advance what port the receiving process is listening on. For example, in the case of the Web, your browser knows that all web servers that use nonsecure HTTP listen on port 80. So, it automatically fills in the destination port field with a value of 80. And that's roughly what goes on behind the scenes, so to speak.
Am trying to connect a device to my PC via ethernet. while attempting to connect its showing "connection timed out". why do this happen...i need to rule out this problem to carry forward my project.
am trying to connect via ethernet.
please help
Do you mean trying to connect using Point To Point Protocol over Ethernet (PPPoE)? Did you assign the IP addresses for both ends? In order to connect two devices, both sides have to speak the same language (protocol) and should be configured properly.
I have an old netgear router and I don't remember the gateway for it, whenever I connect to it over ethernet no gateway is specified. Is there any way to find the ip so that I can connect to it?
(I don't know what router type it is, its serial is 1JX167B007721)
Update
So it was just the ethernet port on my laptop that was messed up. When I plugged the router to my old desktop it worked and gave me the default gateway (192.168.0.1)
The proper way to do this would be to iterate through all possible (common) ip addresses and ping them. The easiest way to do this would be to use batch and just run through the ping command.
Most of the time it'll be 192.168.1.1 . To start fresh make sure you do a complete reset on it. Hopefully there is a reset button on it, holding that for a few seconds should perform the clean reset.
I wrote a java program of TCP/IP Client which is supposed to read data from TCPIP server device.
Problem is when I give the IP and Port of the Device, java gives error of "Connection Time out". Obviously this is problem of not connecting to that Device.
I want to know if there is way to know where the problem is? Whether that TCPIP server device is not reachable (if no, then how to check it )
whether Its the router / network issue that TCPIP Client and Server has to be on same network or use same router to communicate. OR Just IP:Port is enough.
How on my computer may I know that TCPIP server device is turned on and streaming??
P.S. That TCPIP Server device can also be connected with blutooth connection. can i read streaming through blutooth in Java?? if yes what/How should I do it?
I want to know if there is way to know where the problem is? Whether
that TCPIP server device is not reachable (if no, then how to check it
)
Use telnet from the client - it will try to connect to the remote server at the port that you specify. For example telnet google.com 80 attempts to reach google.com on port 80. You could also use an IP address in place of "google.com". If you are on a windows box, you might have to enable telnet first.
You can also use netstat on the server. It should say the ports that are currently open and the state that they are in. For example, your Java server program should be listening on the port, so the state should say LISTEN.
I have a server-process that listen to a specific port (say 60000), and my linux box has two ip-address (say ip1, and ip2).
Can I somehow start two processes in my linux box, such that Process1 can receive all packets sent to ip1:60000 and Process2 can receive all packets sent to ip2:60000.
Thanks,
Yes. You'll want to use the bind system call on the listening socket that specifies the listening IP address, instead of the (more usual) INADDR_ANY. [Reference 1]
Then, use one IP address in one process, and one IP address in the second process. Both will be able to share the same listening port.
References:
http://www.scottklement.com/rpg/socktut/bindapi.html