Using tcpClient in X++ To Communicate With Equipment

We are attempting to retrieve data from a piece of equipment connected to our network. This equipment happens to be a wireless scale with an IP address assigned to it. We have no problem connecting to the scale via Hypertrm yet cannot receive anything using X++ code. When connected via Hypertrm, the scale prompts for a user ID and password. Once ‘logged in’, you must enter some commands to get the scale to output the weight which is just a real number. We are calling methods connect() then requestLine() and cannot even get the initial ‘login:’ prompt must less log in and retrieve the weight. I’ve tried sending IOStreamW.Write() with different values (Cr, CrLf, spaces) right before the IOStreamR.ReadLine() to try to coax it into sending something with no success. Please see the code below and thanks in advance for any help:

class declaration:
System.Net.Sockets.TcpClient tcpClient;
System.Net.Sockets.NetworkStream tcpStream;
System.IO.StreamWriter IOStreamW;
System.IO.StreamReader IOStreamR;
real weight;
str line;
str ipAddress;

void connect()
{
;
tcpClient.Connect(ipAddress, 23);
tcpStream = tcpClient.GetStream();
IOStreamW = new System.IO.StreamWriter(tcpStream);
IOStreamR = new System.IO.StreamReader(tcpStream);
}

str requestLine()
{
;
if (tcpStream.get_CanWrite() && tcpStream.get_CanRead())
{
line = IOStreamR.ReadLine();
}
return line;
}