steps to be followed before spp_over_ble_init() function.

Can anyone suggest what steps to be followed before spp_over_ble_init() ??

I have followed following sequence, i am getting expected events from module till it goes into TCU mode after that i am not getting response for "ble_api_init();" function there is no any response on this function. please correct me if i am following wrong sequence and if not please suggest the way to get SPPOverBLE profile in use in my project. Please look into code snippet.

    GpioDataRegs.GPADAT.bit.GPIOA15 = 0;                //this is hardware reset
    GpioDataRegs.GPADAT.bit.GPIOA15 = 1;
    ret=hci_api_reset();                                                    //hci reset
//    bd_addr[5] = 0x00;bd_addr[4] = 0x11;bd_addr[3] = 0x22;bd_addr[2] = // //0x33;bd_addr[1] = 0x44;//    bd_addr[0] = 0x55;
    /* byte order is reversed to what HCI controller expects */
    bd_addr[5] = 0x00;
    bd_addr[4] = 0x13;
    bd_addr[3] = 0x43;
    bd_addr[2] = 0x00;
    bd_addr[1] = 0x84;
    bd_addr[0] = 0xcd;
    ret=ble_api_init(*version_val);//not implementing as of now

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • I am using PAN1762. not getting any response on tcu_mng_init_req();

  •     hci_api_set_i2_enable(0x01,0x01);

    Where did you get that sequence from? For PAN1762 this call is not necessary and should not be used.


    Your are not checking the return codes of the function calls. Please add checks here and see if something went wrong.

    Also there are some timing constraints. The switch to TCU mode takes some time where PAN1762 is unresponsive. In all of the sample application there is a delay after this function call of at least 30ms.


    This is a low-level function which you should not call directly.

    Only call official BLE API functions.

  • Michael Hunold said:
    Where did you get that sequence from?

     from bluetooth_sdk_4_3_0.pdf document.

    we are referring host mode code given in SDK

    Michael Hunold said:
    Your are not checking the return codes of the function calls. Please add checks here and see if something went wrong.

    not implemented as we are using debugger for checking.

     i have removed "hci_api_set_i2_enable(0x01,0x01);" API already and I am getting proper response for "ble_api_init()"  now. after this I have to call "spp_over_ble_profile_init();" directly??... or i have to follow some more sequence in between ble_api_init() to spp_over_ble_profile_init()??... i am getting error on "ret=spp_over_ble_profile_init();", which i am calling after ble_api_init(); ,"LE_API_ERROR", in response we are getting "0x08 0x00 0x00 0xD3 0xA7 0x01 0x00 0xA6" bytes.

    So can you suggest which steps needs to be followed after that for SPPoverBLE?
    Any further inputs will be helpful

Like Follow
  • Status Answered
  • 4 mths agoLast active
  • 3Replies
  • 43Views
  • 3 Following