Zigbee SDK

zgb_initialize

It initializes the communication devices and makes ready status.

 

int zgb_initialize(
  
      int devIndex ,
       
);

 

Parameters

- devIndex  

It is the number of currently connected communication devices. (It may vary depending on each platform.)

For example, Windows distinguishes devices by COM port.

 

Return Values

- If the value is 1, it means success; if the value is 0, it means failure.

 

Example

It shows how to initialize in Windows environment using COM3 port.

#define DEFAULT_PORTNUM 3   // COM3
 
int result;
result =  dxl_initialize( DEFAULT_PORTNUM);
 
if( result == 1)
 {
    // Succeed to open Zig2Serial

  }

else if( result == 0 )

 {

    // Failed to open Zig2Serial

  }

 

Go back to the list