title: Sending a hex string to a remote via netcat
body: <p>I've got some binary commands (which I'm representing as hex) that I need to send to a remote device (it's an embedded data collection device) and observe the reply. </p>
  
  <p>It's easy to connect to it with netcat </p>
  
  <pre><code>nc -v 192.168.200.34 19000
  </code></pre>
  
  <p>and it sits there happy as a clam. </p>
  
  <p>The hex string I need to type in terminal and then send is something like: </p>
  
  <blockquote>
    <p>02:45:31:38:03:34:43:0d:0a</p>
  </blockquote>
  
  <p>Where 02 is STX, 03 is ETX and so on.</p>
  
  <p>But when I type this into my netcat window (with or without spaces , with or without the colons) netcat transmits it as ascii. </p>
  
  <p>All the literature is happy to tell me how to capture a hexdump from the remote device, but not how to transmit binary/hex data to the remote device. </p>
  
  <p>Is this an easy thing to do, or am I missing something? </p>