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.

BLE data transmission speed is higer using Notification mode than using GATT_WriteCharValue().



Hello:

    I have two boards,they transm uart data to each other through BLE.The profile have two characters,one for transming data from client to server using GATT_WriteCharValue(),one for transming data from server to client using Notification.

    It looks like that using GATT_WriteCharValue to transm data from client to server is much slower.

    How does it happen or how can i improve transmmision speed?

   ( In addtion,all BLE communication paramaters are already set to thire minimum value according apple's bluetooth developer guide.)

  • Hi Image,

    Yes, that's because you can only send GATT_WriteCharValue packet every other connection event. The reason is that it requires application acknowledgement from the peer device.

    1. Connection event 1: GATT Client -> GATT_WriteCharValue 
    2. GATT Server receives the packet and prepares a response in the application
    3. Connection event 2: GATT Server sends acknowledgement
    4. GATT Client process the acknowledgement
    5. Connection event 3: GATT Client -> GATT_WriteCharValue 

    Use GATT_Notification to speed things up as no application ACK is required. Note that the packet is still ACK'ed on Link Layer level so the packet will be retransmitted if lost.

    Best Regards

    Joakim

     

    Best Regards

    Joakim

  • Thank you very much,Joakim.

    I also have tried to use GATT_WriteNoRsp(),but speed has not been improved significantly.

    I do not know the detail about this function,but as it's name it looks like no responsed data(ACK?),is it right?

    I need get those detail information for deeply understanding,just like you,How can i get it?

  • GATT_WriteNoRsp should work just fine. How many packets are you able to queue up before connection event? Have you tried Overlapped Processing?

    image everk said:
    I need get those detail information for deeply understanding,just like you,How can i get it?

    Core Specification :) found at Bluetooth.org.

    Best Regards

    Joakim

  • No packet is queued up.

    When everything is ok,i press a key in central,then it invoke GATT_WriteNoRsp() and toggle the value of simpleBLEProcedureInProgress(i also toggle a led),finally i toggle simpleBLEProcedureInProgress & led again in simpleBLECentralProcessGATTMsg().

    So when i press the key,i can see how long transmmision takes through led.

    It's still slow when using GATT_WriteNoRsp().

    I have tried to change the character's declaration value to GATT_PROP_WRITE_NO_RSP,but it have no effect.

  • I speed up the communication by change the connection paramaters,but it's no good for low energy,i will not ask for this.

    But when i first use the function GATT_WriteNoRsp(),it get a error return.Finally i get help from this forum,and set req.cmd to 1,then it works.

    I have read some details about BLE and it's Applications,but get nothing about this point.Can you give me some advice?

  • Hi Joakim Lindh,

    You said "Note that the packet is still ACK'ed on Link Layer level so the packet will be retransmitted if lost."
    But I have a problem: packets are lost when Notifying with 20B per frame. The details are here:
    e2e.ti.com/.../1631850
    If it's as described " packet will be retransmitted if lost", packets lost should not happen. What are the possible cause of my problem? Could you please help?
    Thank you.
    Frank
  • Frank,
    If a packet has been queued up (i.e. response to GATT Notification call is SUCCESS) , it will be re-transmitted until it's acknowledged on the receiving side. There might be limitations in iOS and the Packet Sniffer can definitively miss packets.

    Best Regards
  • Joakim Lindh,
    Got it. Thank you very much.
    Best Regards