Hello,
I am using MSP-EXP430F5438 and PAN1323ETU. I want to send data through bluetooth and I am using code composer studio. I want to enter pin code "0000" automatically to connect PAN1323 to my PC. But I get message on Tera Term as : Usage: PINCodeResponse [PIN Code]. I have called the function PinCodeResponse in the case atPINCodeRequest. The edited PinCodeResponse function is as follows:
static int PINCodeResponse(ParameterList_t *TempParam)
{
int Result;
int ret_val;
PIN_Code_t PINCode;
GAP_Authentication_Information_t GAP_Authentication_Information;
/* First, check that valid Bluetooth Stack ID exists. */
if(BluetoothStackID)
{
/* First, check to see if there is an on-going Pairing operation */
/* active. */
if(!COMPARE_BD_ADDR(CurrentRemoteBD_ADDR, NullADDR))
{
/* Make sure that all of the parameters required for this */
/* function appear to be at least semi-valid. */
if((TempParam) && (TempParam->NumberofParameters > 0) && (TempParam->Params[0].strParam) && (BTPS_StringLength(TempParam->Params[0].strParam) > 0) && (BTPS_StringLength(TempParam->Params[0].strParam) <= sizeof(PIN_Code_t)))
{
/* Parameters appear to be valid, go ahead and convert the */
/* input parameter into a PIN Code. */
/* Initialize the PIN code. */
ASSIGN_PIN_CODE(PINCode, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
// BTPS_MemCopy(&PINCode, TempParam->Params[0].strParam, BTPS_StringLength(TempParam->Params[0].strParam));
/* Populate the response structure. */
GAP_Authentication_Information.GAP_Authentication_Type = atPINCode;
GAP_Authentication_Information.Authentication_Data_Length = 4; //(Byte_t)(BTPS_StringLength(TempParam->Params[0].strParam));
GAP_Authentication_Information.Authentication_Data.PIN_Code = PINCode;
/* Submit the Authentication Response. */
Result = GAP_Authentication_Response(BluetoothStackID, CurrentRemoteBD_ADDR, &GAP_Authentication_Information);
/* Check the return value for the submitted command for */
/* success. */
I would like to know calling parameters of this function and how the pin code is entered programmatically? Me and my team are participating in Texas Instrument's Analog Design Contest 2012-2013 and this is a part of our project. We have a deadline on 26th January. So any help is appreciated.