Inherits from NSObject
Declared in BTSerialConnection.h

Overview

BTSerialConnection is simple API for writing and receiving data from serial devices.

Messages are automatically received from the connected device in the background, simplifying the asynchronous receive process. Received messages or data is delivered through delegate methods, and can be redirected to the appropriate thread or operation queue as needed by an application.

Messages are received by implementing at least one of the BTSerialConnectionDelegate messages.

Tasks

Instance Methods

closeConnection

Closes an existing connection

- (BOOL)closeConnection

Discussion

Closes an existing connection

Declared In

BTSerialConnection.h

openConnection

Opens a connection to the configured serial device

- (BOOL)openConnection

Discussion

Opens a connection to the configured serial device

Declared In

BTSerialConnection.h

writeData:

Write a block of data to the serial device.

- (BOOL)writeData:(NSData *)data

Parameters

data

rawr

Return Value

YES is returned if the data is successfully written to the device, NO if an error occurs

Discussion

Write a block of data to the serial device.

Declared In

BTSerialConnection.h

writeMessage:

Write a string to the serial device.

- (BOOL)writeMessage:(NSString *)message

Parameters

message

NSString to be sent to the device. Message will be converted to NSData with NSASCIIStringEncoding.

Discussion

Write a string to the serial device.

Declared In

BTSerialConnection.h