Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody, iam a beginner in Talend ESB.
I want to establish a TCP/IP connection to a Server. It's an RFID reader.
I have to send the reader an XML message via TCP / IP to a Host: "141.79.224.86" and a Port: 10001.
The XML message is called HostGreetings.
(<frame><cmd><id>1</id><hostGreetings><readerType>SIMATIC_RF680R</readerType><supportedVersions><version>V2.0</version><version>V2.1</version><version>V2.2</version></supportedVersions></hostGreetings></cmd></frame>)
After sending I have to get an answer. But that doesnt work.
My process is as follows:
In the first step i send the whole code via tFileDelimited to the tSocketOutput (Client). This is working.
The answer i can see only about wireshark i get one. But in Talend it does not show me.
Thats the mistake i get.
Does anybody know what i'm doing wrong?
Thanks in advance!!!!
Kind regards
Ao
Thank you all for the help. I will deal with it a little bit further. Then i will ask my questions.
Thanks a lot!
No problem. Try to follow the steps that I mentioned and it should make it easier. If you are working on a computer science degree at the moment the biggest thing you should focus on when trying to learn something new is to break it down into small steps. A bit like the merge sort algorithm...."divide and conquer" 🙂
The tSocketOutput isn't sending packets to a random port though. You set the port you want it to send to.
Can you please tell us, what is the device you are using. Maybe you are trying to go with wrong way and there exists another easier way.
I understand what you mean. The outgoing ports are dynamically/randomly assigned. The destination port is set in the Talend component. In Linux you can use
net.ipv4.ip_local_port_range
to limit the port numbers used as a source ports, but the minimum is 1000 ports (I think).
In Java there is a bind() method which is able to do this, but it looks it is not implemented in either tSocketInput nor tSocketOutput.
Please paste here the device you are using. Maybe there is a different way.
Regards
Lojdr
One idea...
In Linux, you can create a socket file. It is a TCP/UDP connection where client endpoint acts as a file on file system.
After you will be able to communicate via this file using tFileInputRaw and tFileOutputRaw... But please, consider this as an idea. Maybe it is a stupid idea.
Hello,
now I have programmed the socket programming via Java. The problem via tSocketInput and tSocketOutput has now been bridged.