C# Class LitDev.LDBlueTooth

Show file Open project: litdev1/LitDev

Public Methods

Method Description
Connect ( ) : Primitive

Advanced feature. Connect an external device and service to the bluetooth USB stick. You must first Initialise, then set the device, service and encoding.

GetDevices ( ) : Primitive

Get a list of discovered bluetooth devices.

GetEncodings ( ) : Primitive

Advanced feature. Get a list of available encodings.

GetServices ( ) : Primitive

Advanced feature. Get a list of available service protocols.

Initialise ( ) : Primitive

Initialise a bluetooth USB stick and detect discoverable external devices. As devices come into or out of range the devices list is updated.

ReceiveData ( ) : Primitive

Advanced feature. Receive (fetch) data from a bluetooth device. The device must be Initialised and Connected. The encoding should also be set.

ReceiveFile ( Primitive fileName ) : Primitive

Receive (fetch) a file from an attached external bluetooth device. You must first Initialise, then set the device.

SendData ( Primitive data ) : Primitive

Advanced feature. Send data to a bluetooth device. The device must be Initialised and Connected. The encoding should also be set.

SendFile ( Primitive fileName ) : Primitive

Send a file to an attached external bluetooth device. You must first Initialise, then set the device.

initialise ( ) : bool

Private Methods

Method Description
GetBluetoothDeviceInfo ( string name ) : BluetoothDeviceInfo
GetBluetoothServiceItem ( string name ) : BluetoothServiceItem
inRangeEvent ( object sender, BluetoothWin32RadioInRangeEventArgs e ) : void
outOfRangeEvent ( object sender, BluetoothWin32RadioOutOfRangeEventArgs e ) : void
setDevices ( ) : void
setServices ( ) : void

Method Details

Connect() public static method

Advanced feature. Connect an external device and service to the bluetooth USB stick. You must first Initialise, then set the device, service and encoding.
public static Connect ( ) : Primitive
return Primitive

GetDevices() public static method

Get a list of discovered bluetooth devices.
public static GetDevices ( ) : Primitive
return Primitive

GetEncodings() public static method

Advanced feature. Get a list of available encodings.
public static GetEncodings ( ) : Primitive
return Primitive

GetServices() public static method

Advanced feature. Get a list of available service protocols.
public static GetServices ( ) : Primitive
return Primitive

Initialise() public static method

Initialise a bluetooth USB stick and detect discoverable external devices. As devices come into or out of range the devices list is updated.
public static Initialise ( ) : Primitive
return Primitive

ReceiveData() public static method

Advanced feature. Receive (fetch) data from a bluetooth device. The device must be Initialised and Connected. The encoding should also be set.
public static ReceiveData ( ) : Primitive
return Primitive

ReceiveFile() public static method

Receive (fetch) a file from an attached external bluetooth device. You must first Initialise, then set the device.
public static ReceiveFile ( Primitive fileName ) : Primitive
fileName Primitive The location to save the received file.
return Primitive

SendData() public static method

Advanced feature. Send data to a bluetooth device. The device must be Initialised and Connected. The encoding should also be set.
public static SendData ( Primitive data ) : Primitive
data Primitive A string of characters to send.
return Primitive

SendFile() public static method

Send a file to an attached external bluetooth device. You must first Initialise, then set the device.
public static SendFile ( Primitive fileName ) : Primitive
fileName Primitive The file to send.
return Primitive

initialise() public static method

public static initialise ( ) : bool
return bool