Bluetooth® Sample Application Programmer's Reference: fun_bluetooth.c File Reference

Bluetooth

Bluetooth® Sample Application Programmer's Reference
fun_bluetooth.c File Reference
#include "sdk_tplus.h" #include "GL_GraphicLib.h"
#include "TlvTree.h"
#include "LinkLayer.h"
#include "GTL_Traces.h"
#include "sec_extend.h"
#include "IPA280.h"
#include "fun_demofeatures.h"
#include "Utilities.h"
#include "err_process.h"

Functions

int HWCNF_Bluetooth_SetSecMode (int secMode)
 
int HWCNF_Bluetooth_GetSecMode (int *secLevel)
 
static int FUN_BTStart (void)
 
static void FUN_BTStop (void)
 
static void FUN_DisplayMessage (char *buf, int dly)
 
static int FUN_BTSecModeGet (void)
 
static int FUN_BTNameGet (char *name)
 
static int FUN_BTPinCodeGenerate (char *pin_code)
 
static void FUN_BTSPMRestart (void)
 
static void FUN_BTPairingStart (int role, dbluetooth_search_result_s *pRemoteAddress)
 
static unsigned long FUN_BTPairedDevicesDisplay (char *title)
 
static int FUN_BTNameSet (char *name)
 
void FUN_BTPairingInfo (void)
 
void FUN_BTDevicePairing (void)
 
void FUN_BTPairingWait (void)
 
void FUN_BTPairedDeviceSelect (void)
 
void FUN_BTPairingStop (void)
 
void FUN_BTDeviceRename (void)
 
void FUN_BTWakeupSet (void)
 
void FUN_BTSecModeSet (void)
 

Macros

#define CHECK(CND, LBL)   {if(!(CND)){goto LBL;}}
 
#define MAX_AVAILABLE_DEVICES   64
 

Variables

static dbluetooth_search_results_s gSearchResultList
 
static dbluetooth_search_result_s gRemoteAddress
 
static
dbluetooth_available_devices_s 
gAvailableDevices
 
static int pinLen = 4
 
static Telium_File_t * hBluetooth = NULL
 
static Telium_File_t * hStdperif = NULL
 

Detailed Description

Contains all definitions of functions utilized for Bluetooth�.


INGENICO Technical Software Department

Copyright (c) 2012, Ingenico. 28-32 boulevard de Grenelle 75015 Paris, France. All rights reserved.

This source program is the property of INGENICO Company and may not be copied in any form or by any means, whether in part or in whole, except under license expressly granted by INGENICO company

All copies of this program, whether in part or in whole, and whether modified or not, must display this and all other

embedded copyright and ownership notices in full.

Project : Bluetooth� Sample Module : FUN - Demo Features Unit

Date
04/16/2013

Function Documentation

int HWCNF_Bluetooth_SetSecMode ( int  secMode)
int HWCNF_Bluetooth_GetSecMode ( int *  secLevel)
static int FUN_BTStart ( void  )
static

Open Bluetooth� handler

Returns
1 if Bluetooth� is enabled succesfully, 0 on error
static void FUN_BTStop ( void  )
static

Close Bluetooth� handler

static void FUN_DisplayMessage ( char *  buf,
int  dly 
)
static

Display a prompt on the terminal

static int FUN_BTSecModeGet ( void  )
static

Get the security mode used

Returns
  • 3 = legacy secure pairing
  • 4 = secure simple pairing.
static int FUN_BTNameGet ( char *  name)
static

Obtain Bluetooth� name

Returns
1 if Bluetooth� name was obtained succesfully, 0 on error
static int FUN_BTPinCodeGenerate ( char *  pin_code)
static

Generate pin code for Bluetooth� connectivity

Parameters
[out]pin_codegenerated pin code
Returns
1 if pin code was generated succesfully, 0 on error
static void FUN_BTSPMRestart ( void  )
static

Restart SPM service

static void FUN_BTPairingStart ( int  role,
dbluetooth_search_result_s *  pRemoteAddress 
)
static

Start Bluetooth� pairing

Parameters
[in]pRemoteAddresscontains information on the Bluetooth� device to be paired
static unsigned long FUN_BTPairedDevicesDisplay ( char *  title)
static
static int FUN_BTNameSet ( char *  name)
static

Save Bluetooth� name

Returns
1 if Bluetooth� name was saved succesfully, 0 on error

Macro Definition Documentation

#define CHECK (   CND,
  LBL 
)    {if(!(CND)){goto LBL;}}
#define MAX_AVAILABLE_DEVICES   64

Variable Documentation

dbluetooth_search_results_s gSearchResultList
static
dbluetooth_search_result_s gRemoteAddress
static
dbluetooth_available_devices_s gAvailableDevices
static
int pinLen = 4
static
Telium_File_t* hBluetooth = NULL
static
Telium_File_t* hStdperif = NULL
static

Ingenico