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.

GATT_WriteLongCharValue issue

Other Parts Discussed in Thread: CC2560

Hello,

I'm attempting to send more data than the 20 byte GATT_NOTIFY or GATT_INDICATION functions allow.  To do this, I've read that the GATT_WriteLongCharValue should handle this problem.  But, every time I call the function I get a return of 0x16 (blePending) even when I haven't sent any data.  Since I can't debug the GATT functions, I'm kind of left in the dark of what is happeing.

Any help or another solution would help tremendously.  I am attempting to send a 16-bit measurement every 20 mSec.  With the overhead I'm attempting to buffer the data.  Right now at right on the edge.  Any type of distance causes me to miss data or my buffer to overrun.  I'm starting to think BLE is not a solution for me and that I need full on Bluetooth.  Is there a 8051 version for Bluetooth 2.1?

Thanks,

Shawn

  • When you get the blePending status response, have you previously started a GATT sub-procedure that you have not completed? The GATT_WriteLongCharValue should work OK.

    Also, "long" characteristics are more than 20-bytes. If your value is 16-bits (2 bytes) you can use notifications without any problem.

    BLE should work for sending data once every 20ms. If you end up needing to use BT 2.1 BR/EDR, we do not have a BT 2.1 8051-based solution, but you may want to consider using the CC2560 with an MSP430 MCU: http://focus.ti.com/docs/prod/folders/print/cc2560-pan1315.html

  •    Willis thanks for the response.  I have not started a GATT sub procedure before I call the GATT_WriteLongCharValue, but it always responds with blePending.  I'm not sure why it does this.  Are there any examples of using the GATT_WriteLongCharValue?  Basically, I've swapped out my GATT_Notify call for the GATT_WriteLongCharValue command.  I can run the code with the Notify and have no issues, just when I switch over to the WriteLong.

    Also, my measurement data is 2 bytes, and I've used the GATT_Notify command.  My issue is, is that at distances ( +20 ft) I start missing the commands.  I've switched over to using the GATT_Indicate command to insure I receive the data and have found that the total time to send and receive the responses is approximately 200 mSec.  I buffer my data and put 10 measurements in the indication packet, but at distances I have issues because the 20 measurements is approximately 200 mSec, the same it takes to receive the indication response.  I believe I'm parsing and responding quickly enough in my pc application.  I generally see that once I have gotten the Indication packet from the device that I send a ATT_HandleValueCfm message within 50 mSec.  It then takes almost another 150 mSec for the dongle to indicate it has received the ATT_HandleValueCfm. 

    If I can't find a solution I will have to switch over to the MSP430.  I have already purchased the IAR IDE for the 8051 and don't really want to throw another $3000 down for the MSP430 tools.  I'm really considering going to a module at this point.

    thanks,

    shawn