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.

CC2540

Other Parts Discussed in Thread: CC2540, CC2541

Hello all

I would like to send the Ascii message "Hello" from my CC2540 doungle to PC terminal

1. where can i find a sample code for this task?

2. where should i put my code?

3. which HCI function should i use to send this message.

Thanks

Noam

  • BLE is not a protocol that can stream data natively. You can send a string of up to 20 chars at a time via write / notify which would be sufficient to send hello. If you wanted to send more data as a stream you have to build a streaming protocol using two characteristics; one to send data to the peripheral another to receive data from the peripheral. Refer to the ble serial bridge to see how this is done: http://processors.wiki.ti.com/index.php/SerialBLEbridge

  • Thanks for the answer.

    I see that the sample code refers to CC2541.

    Can i use the same code for CC2540?

    Thanks

    Noam.

  • There are usually more than one configuration for the TI projects for CC2541/CC2540 but it comes down to who wrote the code. Unfortunately no one here will write your code for you for free so if the config isnt there you will have to set it up yourself

  • Thanks

    Of course no body will write the code for me :)

    May i ask if there are big difference between the code of cc2540 and cc2541?

    if there are, what should i change in the cc2541 code for making it fit to cc2540?

    thanks again

    Noam

  • Hi Noam,

    I would suggest you to have a look at HostTestApp. There are project files for both CC2540 and CC2541. You can use BTool to connect to HostTestApp. It use HCI commands.