>String'Output (Channel,"����getstatus"); In the definition of 'Output, ARM 13.13.2(21) says "S'Output writes the value of Item to Stream, including any bounds or discriminants." So you are probably sending 4 bytes containing the integer 1 (the lower bound of the string you are sending), then the integer 13 (the upper bound), followed the 13 bytes you think you are sending. Similarly 'Input expects to read the bounds, then the data. Using 'Write instead of 'Output will probably solve the sending problem, but S'Read is a procedure, not a function, since YOU will have to supply the bounds, which presumably you can get from the recv (or whatever gnat.sockets uses for datagram input).