Is it possible to connect to more than one device using implicit messaging?
I am able to connect individually. However, if I try to connect to 2 devices at the same time I get a C# Socket Exception: "Only one usage of each socket address (protocol/network adapter/port) is normally permitted'.
Is this a known limitiation or am I doing something wrong?
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried changing the Originator UDP Port and the connection starts but times out. Is there another propery that I must change? I am using a Turck I/O Block TBEN.
Thank you for any help
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having this exact same problem but setting the port to anything other than 0x08AE results in the connection timing out. Is the port supposed to be set after ForwardOpen or only after RegisterSession? Do I maybe have to do something with windows firewall?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This was a few years ago so my memory is a bit fuzzy and I don't remember where I put that code. But I was never able to get the default code to work. What I learned though was that basically, some devices will always respond on the default UDP port regardless of claims; in my case it was a Turck FEN20. Proper Unicast UDP should allow port binding, which is why it's frustrating.
So I ended up writing a connection manager that was basically a dictionary of connection objects using the built-in connection ID as the key. So when a message was received, the connection ID could grab the proper .NET object and respond appropriately.
Hope this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having the same issue. I have two Turck Blocks and when I change the Originator Port the connection starts but times out pretty fast. Do you think you could find your code and show an example.
Many Thanks,
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry it took so long to respond but I did finally get a chance to dig around for that project and upload it to GitHub. I tested it before I left the office today and it is working with a couple of Turck devices on my desk.
Is it possible to connect to more than one device using implicit messaging?
I am able to connect individually. However, if I try to connect to 2 devices at the same time I get a C# Socket Exception: "Only one usage of each socket address (protocol/network adapter/port) is normally permitted'.
Is this a known limitiation or am I doing something wrong?
Thank you!
You must change the port number for the various devices.
Example:
eeipClient1.OriginatorUDPPort = 0x08AE;
eeipClient2.OriginatorUDPPort = 0x09AE;
Make sense?
Thanks
Hi Jurell,
I tried changing the Originator UDP Port and the connection starts but times out. Is there another propery that I must change? I am using a Turck I/O Block TBEN.
Thank you for any help
Jim
Thank you Jurrell. This solved my problem.
I'm having this exact same problem but setting the port to anything other than 0x08AE results in the connection timing out. Is the port supposed to be set after ForwardOpen or only after RegisterSession? Do I maybe have to do something with windows firewall?
Hey Ryan,
I think I'm having the same timeout issue with multiple devices, did you manage to find a solution?
Hey Bisl,
This was a few years ago so my memory is a bit fuzzy and I don't remember where I put that code. But I was never able to get the default code to work. What I learned though was that basically, some devices will always respond on the default UDP port regardless of claims; in my case it was a Turck FEN20. Proper Unicast UDP should allow port binding, which is why it's frustrating.
So I ended up writing a connection manager that was basically a dictionary of connection objects using the built-in connection ID as the key. So when a message was received, the connection ID could grab the proper .NET object and respond appropriately.
Hope this helps.
Hey Ryan,
I am having the same issue. I have two Turck Blocks and when I change the Originator Port the connection starts but times out pretty fast. Do you think you could find your code and show an example.
Many Thanks,
Jim
Sorry it took so long to respond but I did finally get a chance to dig around for that project and upload it to GitHub. I tested it before I left the office today and it is working with a couple of Turck devices on my desk.
Here's a link to my testing branch
Last edit: Ryan Campbell 2022-09-01
Last edit: Ryan Campbell 2022-09-01