This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Use of BT_app_send() function in PAN1315 mindtree stack

Hi,

I'm desining an interface use the PAN1315 module, and now I have a question about the data send spi. Currently I'm changing the code from the temperature sensor application, and after successfully establish the bluetooth connection between the PAN1315 and a computer side bluetooth COM port, I simply change the data in appl_spp_data_buffer[] and then use the function sdk_menu_selection_handler(OP_PEER_DATASEND) to send data. However, everytime I call this function, it will send the data continuously, while what I want is just send the data one time. I notice there is a function build in the sdk.c, called BT_spp_send(),   but I don't know how to use this one. It seems the first parameter is called remote device index,but I don't know what is that......

Has anyone meet problems like this one before? Do you have some suggestions about how to send data just one time? Thanks so much.

SuiYu

  • SuiYu,

    You will need to work within the framework of FreeRTOS to send your data. From experience, BT_spp_send() cannot be freely called as you think. Please take a look at the following wiki that has an example on modifying the MT demo to send data by adding more tasks:

    http://processors.wiki.ti.com/index.php/CC256x_MT_UART_BRIDGE

    remote device index is a number of the device you're connected to. Since normally you're always connected to 1 device, this number can be 0.

    Regards,
    Gustavo

  • Hi Gustavo,

    Thanks for your suggestions, the file you gave me is really helpful.

    SuiYu