TCP/UDP driver question

Morning all

I have some existing GPRS modems that currently send a string to TCP port, this runs on a bespoke system for a client. It occurs to me that I might be able to received this info in to Ignition. I’ve looked at the TCP driver and this seems to be what I want, but as I understand it I have to connect to the remote device and this may not be possible.

With these modems the IP address is variable so rather than listern to the remote post I want to listen to the local port, I’ve tried to set the driver up using the localhost, 127.0.0.1 and the PC’s IP but although it says connected the wrapper log says cannot connect and I see the port as closed.

I’ve tried the UDP driver but still the port remains closed,

Port forwarding is OK and fire wall is off, any pointers?

Chris

You will want to use the UDP driver to accomplish this. The IP address will be a physical address, not localhost. Make sure that you do not have the multicast option enabled unless you are actually trying to listen for multicast messages (usually you want this option unchecked). If multicast is unchecked then the device should go to a connected state because it is just using the IP address as the local address to bind to.

Thanks Dave

I’ll try that in the morning, should I use 127.0.0.1 or the actual IP address of the PC

Is there anything else I should look out for?

Chris

You’ll want to use the actual IP address. It should also be noted that your device has to be able to broadcast UDP for this driver to work. I’m assuming your device does, but just wanted to clarify that if your device only uses the TCP protocol and doesn’t support UDT then this driver won’t work for you.

Thanks again Dave,

Will the driver open the port?
I did not see this earlier today but I may have had the IP address wrong. I’ll try in the morning

Chris

Yes, the driver will open a socket that listens on the specified port.

Dave

according to wireshark data is TCP, a shame as it would have been a simple solution.

So now I have to figure out how to read a cell on in Excel and respond when it changes, I sometimes feel my learning curve is vertical.

Chris

You should check the settings on the device itself and see if there is an option to broadcast UDP. It may be something that you can turn on and if so a rather simple solution.

Dave

The device is a bespoke programmed modem, I can change the “send to” IP address and Port by SMS but nothing else without visiting all the sites (50+) and then we would have to rewrite the code, java I think but not one of my projects.

We’re looking at selling the customer Ignition for some site monitoring and it would have been useful to incorporate this to assist the decision

I’m looking to see if I can get a port listener to parse to OPC or SQL

Chris

Gotcha. I think you might be able to find a scripting option to read an excel file or a text file to monitor for changes, but it’s not going to be very elegant. You could have a gateway timer script that would read the file every so often and then write whatever value it finds to a tag.

I don’t know if you have any Java developers handy or a budget to pay for custom development, but something like this would be pretty easy to develop using our module SDK.

Kevin

We are actually recruiting at present for a java/SQL and maybe python person, so ill put this on the back burner for now,

Thanks for the advice

Chris