Lego EV3 - sending direct commands over RFCOMM Channel (Objective-C, Xcode)
I have found solution. I create category NSString+NSStringHexToByte:

NSString+NSStringHexToBytes.h

#import &lt;Foundation/Foundation.h&gt;

@interface NSString (NSStringHexToBytes)
+ (NSData *)dataWithString:(NSString *)string;
@end


NSString+NSStringHexToBytes.m

#import "NSString+NSStringHexToBytes.h"

@implementation NSString (NSStringHexToBytes)

+ (NSData *)dataWithString:(NSString *)string
{
    string = [string stringByReplacingOccurrencesOfString:@"0x" withString:@""];

    NSCharacterSet *notAllowedCharacters = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefABCDEF1234567890"] invertedSet];
    string = [[string componentsSeparatedByCharactersInSet:notAllowedCharacters] componentsJoinedByString:@""];

    const char *cString = [string cStringUsingEncoding:NSASCIIStringEncoding];
    const char *idx = cString;
    unsigned char result[[string length] / 2];
    size_t count = 0;

    for(count = 0; count &lt; sizeof(result)/sizeof(result[0]); count++)
    {
        sscanf(idx, "%2hhx", &amp;result[count]);
        idx += 2 * sizeof(char);
    }

    return [[NSData alloc] initWithBytes:result length:sizeof(result)];
}


and now:

NSString* playTone= @"0f0000008000009401810282e80382e803";
NSData* data = [NSString dataWithString:playTone];
[self sendMessage:data toChannel:rfcommChannel];


where sendMessage is:

-(void)sendMessage:(NSData*)data toChannel:(IOBluetoothRFCOMMChannel*)rfcommChannel
{
    [rfcommChannel writeSync:(void*)data.bytes length:data.length];
}