RWTH - Mindstorms NXT Toolbox

BT_OpenHandle

Opens a Bluetooth connection using settings from the given configuration file

Contents

Syntax

handle = BT_OpenHandle(inifilename)

handle = BT_OpenHandle(inifilename, 'check')

Description

handle = BT_OpenHandle(inifilename) opens a Bluetooth connection (PC: serial handle struct, Linux: file handle) based on the settings of the given configuration file determined by the filename inifilename.

handle is a serial handle struct if the computer system is a PC and a file handle if it is a Linux system.

handle = BT_OpenHandle(inifilename, 'check') will test the new Bluetooth connection by sending a simple keep alive packet. This is recommended, as it detects errors with the Bluetooth connection outside MATLAB right away.

Example

   BT_MakeConfigFile();

   bt_handle = BT_OpenHandle('bluetooth.ini', 'check');

See also

BT_MakeConfigFile, BT_CloseHandle, BT_CloseAllHandles, NXT_SendKeepAlive

Signature


Back to RWTH - Mindstorms NXT Toolbox