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.

[CC2650/40]: SPP Profile for BLE Communication

Other Parts Discussed in Thread: CC2650

Hello TI,

I am newbie and using CC2650/40 development board for my application. I am following CC2650 SPP profile which works like:

[PC(UART)----------uart-----------> Dev Board (CC2650/server) ---------ble----------->  Phone (Client)];

As I understand so far is, it enables notification when server needs to write to client.

1. I am modifying it as per my requirement. I want to set the notification default to enable. Is it possible to set it by default? If yes, How can I set it default? Please suggest.

2. Also I can write 20 byte data from Client to Server well, but I am unable to send full 20 byte packet from Server to Client (through UART interface screen. It just send only one byte means as I just type any letter on uart screen, it send its ASCII/hex/decimal to immediately.  Its not allowing me to send even more than a byte. What are the required changes I need to do. Please suggest.

Thanks n Regards

  

  • Hsa,

    Hsa S said:
    1. I am modifying it as per my requirement. I want to set the notification default to enable. Is it possible to set it by default? If yes, How can I set it default? Please suggest.

    having notifications enabled will affect your device's power consumption. Enabling it by default doesn't conform to spec as you already discovered this post. As Tim suggested, you'd call GATT_Notification().

    Hsa S said:
    2. Also I can write 20 byte data from Client to Server well, but I am unable to send full 20 byte packet from Server to Client (through UART interface screen. It just send only one byte means as I just type any letter on uart screen, it send its ASCII/hex/decimal to immediately.  Its not allowing me to send even more than a byte. What are the required changes I need to do. Please suggest.

    I'm not sure what you mean with the "UART interface screen". Are you emulating a UART to BLE bridge (given you are referencing SPP from Bluetooth Classic)?

  • Hello Tom,
    Thanks for your reply~
    1. Yeah, I referred that post. But could you please tell me where I should call GATT_Notification in 'SPPBLEProfile', a bit code sample.
    2. Yes, I am emulating UART to BLE bridge; www.ti.com/.../TIDC-SPPBLE-SW-RD from here
    I want to send 20 byte data packet vice versa (Server to Client / Client to Server);
    Please suggest the required modification. Its a bit urgent.
    Thanks n Regards
  • Please use the debugger to step through GATTServApp_ProcessCharCfg. You will see how the client char config value (cccValue) is checked and will be able to customize the SPPBLE service for your application. Since I don't have details on your specific implementation, this is the best advice I can offer.

    Best wishes
  • Hello JXS,
    Thanks for your reply~
    well, I follow your suggestion but I just want to send 20 byte data to client from server using SPPBLE profile for CC26xx. The profile is working well for sending 20 bytes from Client to Server but not for Server to Client. Please suggest.

    Also Can I directly use GATT_Notification directly in the case when the connection made? GAPROLE_CONNECTED.

    Thanks n Regards
  • How are you determining that the server isn't sending 20 bytes? Are you capturing this via a sniffer or are you just setting breakpoints in the code?

    What type of UART input are you generating on the BLE server side? Are you manually typing characters or are you pasting an array of 20 bytes into the UART terminal? Typing it manually will be pretty slow, so you'd probably see a single notification for every byte rather than 20 bytes at a time.

  • Hello Tom,

    Thanks. I am observing it via setting breakpoints in the code.

    My UART inputs are some text, alphabets, numbers manually typed. It seems, once I type any text 'ABC' , it immediately send A ( Value:A; Hex: 0x41) but not B and C. I think, I can only see a single notification for each byte......Is there any response delay or something else?

    I tried with pasting 20 byte at a time into terminal. It seems, it sending all 20 bytes but I can see only last 4 bytes (17-20) on phone screen (equivalent Hex value). why so?

    Please clear my doubt.....

    Thanks n Regards

  • Hi Champs,

    my customer also want to do question 2, could anyone give me a solution ? Where should we modify to enable server sent multiple data to client ? thanks!

    Question
    Also I can write 20 byte data from Client to Server well, but I am unable to send full 20 byte packet from Server to Client (through UART interface screen. It just send only one byte means as I just type any letter on uart screen, it send its ASCII/hex/decimal to immediately. Its not allowing me to send even more than a byte. What are the required changes I need to do.