I’ve written a number of apps that use the TCPSocket connect to send plain text to third party servers and it works great. However, I now have an application where I want to send some HEX data (01 4E 30 54 49 09 30 30 30 46 09 30 30 30 43 32 41 04) and just putting that in the write method doesnt work.
So what do I need to do instead of TCPSocket1.Write(“01 4E 30 54 49 09 30 30 30 46 09 30 30 30 43 32 41 04”) ?
Hex is text or rather it it is numbers represented by teh code points that teh numbers reprinted as text would be.
What I am saying is that you are sending binary no matter what, be they code points that could be interested as text (and Hex numbers are numbers represented as text in a certain way) or binary representations of numbers directly as in the IEEE standards.
I need to send a HEX string, not the data that the HEX string represents.
When I put the hex string into the HEX field in packet sender (a standalone app i downloaded and run on my mac), and send it, the hardware responds to the comand as I would want it to. All I know, is that I am sending it as HEX and not as ASCII. If I switch to ASCII in packet sender, it doesnt work. So I know I need to send it as HEX.
As for the HEX string itself, it is structured as follows: