#include <stdio.h>
#include <Winsock2.h>
#include "API-WiMinet.h"
// *****************************************************************************
// Design Notes:
// -----------------------------------------------------------------------------
int main( int argc, char* argv[] )
{
char iRetVal;
char iEnable;
// COM port interface
//iRetVal = OpenWiMinetShell( "COM6",115200, 0X01 );
// Ethernet interface
iRetVal = OpenWiMinetShell( "192.168.0.240",12580, 0X01 );
// Validate the shell open interface
if ( !iRetVal )
{
printf( "Open shell failed!rn" );
return 0X00;
}
// Set the wiminet beacon status
iRetVal = SetWiMinetBeacon( 0X00, 0X00, 0X01 );
// Validate the operation status
if ( !iRetVal )
{
printf( "Error: SetWiMinetBeaconrn" );
}
// Get the wiminet beacon status
iRetVal = GetWiMinetBeacon( 0X00, 0X00, &iEnable );
// Validate the operation status
if ( !iRetVal )
{
printf( "Error: GetWiMinetBeaconrn" );
}
// Current wiminet beacon active status
printf( "WiMinet.Beacon Active Status=%drnrn", iEnable );
// Stop the shell
StopWiMinetShell( 0X00 );
// Exit this main program
return 0X01;
}