Hi guys I have a scale that is a TCP Client and sends the weight via TCP. I have set up the Generic TCP driver to act as a TCP Server but I am getting the following fault.
TcpServerDriver[CheckWeigher2] 17May2022 08:56:02 MessageHandler received message from unknown device /22.214.171.124:59416.
I have assistnet software that I can use as a TCP Server and I can receive the message OK in that software. I can also set up assisnet to be a client and I can send a message to the Generic TCP driver and receive it OK in Ignition. But directly to scale I get error.
Any help would be appreciated thanks.
What version of Ignition are you using and is this a 3rd party driver? We don’t have one that acts as a TCP server.
Kevin version is 8.1.16 and the Driver is Generic TCP Server, one from here chi-Ignition · GitHub
Just to add we could open a TCP socket connection to act as Server correct? Just I am not up to speed on achieving that.
You’re going to need to get help from @chi with this, it’s his driver. I don’t know anything about it.
From a quick browse of the source, though, it looks like the driver has settings to either accept all connections or you need to specify the host/IP of the clients that will connect.
Kevin yes tried both combinations same result.
Using Host/IP I can get some connection, I get a messagecount but not much data, should be 114 bytes, only shows a few random characters.
So the error
MessageHandler received message from unknown device... is gone now and the driver receives a message from your device, but not the data you are expecting?
Please post the message configuration.
By the way, if you are not connecting multiple devices or need the message buffering provided by the driver, a simple listening socket might be an easier solution for your use case. See this thread for an example.
Chi yes by connecting with Host/IP the error will go and I can get a couple of characters but not the 114 bytes of the message.
That sounds like your data isn’t really a string. The driver expects an ISO-8859-1 ascii string. If your data is not a string, try
Raw String instead.
You can also try to set the logger
Trace. That will write the received raw data bytes to the gateway log.
Chi thanks I have set Trace to check. Message is in HEX can this driver handle that? thanks Hazey
Without knowing the meaning of that 114 bytes your best chance is to configure an
Unsigned Byte array with 114 bytes length. Then you may try to guess the content(meaning of the single bytes.
It would be much easier to contact the device manufacturer and ask for a documentation of the data packet.