I just purchased a Ethernet Communications Module Lantronix XPort and trying to get the status of the contact connection with coding. When I open the socket and do a read I get nothing back. Do I need to send something first?
When I try the same code on port 9999, I do get the setup prompts back, so I know I am talking to the board. But on port 10001, there is nothing. Since I am doing ethernet, do the serial settings matter?
I am testing this in Java, if you have sample code that could help me that would be great.
What have you installed the Lantronix XPort module in? A relay board?
Yes. I and it is powered up. I have 48 port contact switch. Is there a way to test it via telnet or something? I am on Mac.
Ok, it sounds to me like you probably have a ZSCAN48ProXR board with the Lantronix module installed.
You will need to open a TCP socket connection to the Lantronix module over port 2101 and send input read commands which are documented in this guide:
Also take a look at this guide which explains how to use netcat from the terminal to open a connection and send commands(guides says Linux but it also works on Mac OS):
OK I have that setup and running. I can access port 9999 with the software NetCat. I get nothing back on port 2101. I have read on the web that some use port 10001 for this interface. How can I know I have the right port? I don’t know if this is applicable but the Channel 1 connection setting on the xport website of the card say endpoint 10001.
Does the Channel 1 settings even matter to me?
I did a port scan and 2102 is not open.
nc -z 192.168.1.2 2100-10010
Connection to 192.168.1.2 port 9999 [tcp/distinct] succeeded!
Connection to 192.168.1.2 port 10001 [tcp/scp-config] succeeded!
When I turn on Verbose this is what i get for 2102
nc -v 192.168.1.2 2101
nc: connectx to 192.168.1.2 port 2101 (tcp) failed: Connection refused
Did you purchase this Lantronix XPort module from us or from another vendor?