title: Sending hexadecimal data to devices (Converting NSString to hexadecimal data)
body: <p>I'm trying to send hexadecimal data via WiFi. </p>
  
  <p>The code is something like this: </p>
  
  <pre><code>NSString *abc = @"0x1b 0x50";
  NSData *data = [[[NSData alloc] initWithData:[abc dataUsingEncoding:NSASCIIStringEncoding]]autorelease];
  [outputStream write:[data bytes] maxLength:[data length]]];
  </code></pre>
  
  <p>Instead of sending the hexadecimal data, it's sending it in text format. 
  I tried with <code>NSUTF8StringEncoding</code>, but it's the same. I'm using it with the <code>NSStream</code> class. </p>