btNameSet (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-200, NX-400, NX-900

Firmware version:

1.10.00

 


 

This function will set the name to show to other devices when discoverable.

By default, the name is "RTCU" followed by the serial number.

 

Input:

name : STRING

The wanted name. If longer than 248 characters, it will be truncated.

 

Returns: INT

1

-

_BT_OK


Success

0

-

_BT_ERR_NOT_SUPPORTED


The API is not supported.

-1

-

_BT_ERR_NOT_OPEN


The adapter is not powered(see btPower).

-5

-

_BT_ERR_NO_ADAP


Could not find adapter.

 

 

Declaration:

FUNCTION btNameSet : INT;
VAR_INPUT
  name   : STRING;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
  // Set name to "Master"
  btNameSet(name := "Master");
 
BEGIN
 ...
END;
 
END_PROGRAM;