C Language Development Kit/Functions/SetBltPin

From OptiWiki

Jump to: navigation, search
Description This function stores the bluetooth pincode in flash memory.
Syntax
void SetBltPin(const char * pincode);
Arguments
const char * pincode
the pincode needed for authentication.
Returns None
Remarks The bluetooth pincode can also be set from the system menu. GetBltPin()

retrieves the bluetooth address. If on the device that the OPL9724 or OPL9712 connects to no authentication is needed then no pincode needs to be set. The maximum size for the pincode is 16 characters.

Example
#include "lib.h"
#include <stdio.h>
 
void main( void )
{
    cursor( NOWRAP );
    for(;;)
    {
        printf("\fChange pincode\n%s\nto\n123456", GetBltPin());
        resetkey();
        while( !kbhit() )
            idle();
        SetBltPin("123456");
 
        printf("\fBlt pincode:\n%s", GetBltPin() );
        resetkey();
        while( !kbhit() )
            idle();
    }
}


Views
Personal tools