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.

cc2541: How to OTA without using notifications?

Part Number: CC2541
Other Parts Discussed in Thread: CC2541

I am updating the cc2541 using an Android phone. There are a lot of instances where we cannot be notified if the device we connected to is notifying, therefore, we need to change all the messages going to notify to be instead accessible through reading. The following is what I did, please tell me if I am doing anything incorrectly!

1. I have added variables to oadReadAttrCB to put memcpy(pValue, pAttr->pValue, 20)

2. I have initialized a global variable so the functions oadImgIdentfiyWrite and oadImgBlockWrite writes to change the global variable rather than do the notify stuff. So I am putting this value also inside the memcpy(pValue, reply_msg, 20)

However, when I read I just receive blanks.

What I think: In SimpleGATTprofile.c there is an if statement in function SimpleGATTprofile.c that checks if((notifyApp != 0xFF)...) that seems to notify the device when the read statement is generated, should I implement the same thing in my OadWriteAttrCB(...)? if so how do I do this because there is no variable called profileChange in oad_target.h and I cannot find out where it is being used.

  • Hi,

    I don't understand why you cannot be notified, you device should receive all notification. But you should be able to also read any characteristic
    values that has read properties. We don't recommend reading since it is slower operation than the optimized notifications used for OAD. The notifyApp just passes the data to the application layer.

    Best wishes