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.

CC2640 OAD doesn't work as expected

Other Parts Discussed in Thread: CC2650

I followed the "Out of box demo" of On-Chip OAD in the OAD user guide (for BLE stack 2.2.1).
 
1. I did the merge of the BIM + OAD Target App + Stack  to one hex.
2. The device advertised and the connection from the "BLE Device monitor" was succeeded
3. I changed the GAP parameters to FAST and mentioned in the demo instructions
4. I built the Img_B hex file of my application (based on simpleperipheral) 
5. I downloaded the HEX using OAD download in the "BLE Device monitor"  (no OAD meta data was detected the Device monitor added OAD meta data)
6. The file was donwloaded 
7, the device advertised as Img_B!
BUT, my custom profile didn't appear -  only the OAD profiles
 
I can see in the code that FEATURE_OAD_ONCHIP definition (which is defined in the Flashonly_OAD_ImgB configuration) disables all the functionality of the SimplePeripheral BLE profile...
I tried to remove the FEATURE_OAD_ONCHIP define. now My profile is displayed but the OAD service showed with 0000 uuid and generating error in the BLE device monintor tool.
Please advise
  • Hi Haim,

    How did you remove the FEATURE_OAD_ONCHIP definition? It is used in both simple_peripheral.c and oad.c. If you manually remove the #ifndef FEATURE_OAD_ONCHIP from simple_peripheral.c, you should be able to see the profiles.
  • Hi Rachel

    I tried to change all FEATURE_OAD_ONCHIP defines in the simple_peripheral.c to something else and compiled it (I left the define of FEATURE_OAD_ONCHIP  in configuration)

    I still get the same error :

  • Please help , this issue is very urgent.
  • Hi Haim,

    I've attempted to reproduce your set up - and was able to see the custom simple gatt profile/service just fine. (Chars 1 - 5)


    My only guess is that you're violating the space allocated to image_b, which is limited to 10 pages. Unless you make the stack smaller, or the application fit into the space, you'll get issues. (You should be getting linking errors though)

    Here's what I did:

    1. Loaded up oad_target_app in IAR.

    2. Built the Stack Project

    3. Applied (IMGA) Host Image Workaround (Fix on ble wiki, known issues, was accidently killing stack entry point)

    Right Click on Project -> Options -> Linker -> Checksum tab, untick 'Fill unused code memory'

    4. Built the IMG_A host image

    5. Built BIM

    6. Used merge.bat (note, oad_image_tool.py will not work until next release)

    7. Flashed onto CC2650LP, and connected via BLE Device Monitor

    8. Built simple_peripheral IMG_B configuration (to test)

    9. OADed to CC2650LP

    Didn't use fast mode, used 1 blk/connection

    10. Connected to reset IMG_B with BLE Device Monitor, and invalided image by writing to OADReset Characteristic of the OAD Reset Service.

    11. Removed 'FEATURE_OAD_ONCHIP' Preprocessor Define from IMG_B simple_peripheral

    12. Changed all references of #if FEATURE_OAD_ONCHIP -> #if !defined(FEATURE_OAD_ONCHIP)

    13. Built new image and OADed to CC2650 Target.

    Connected and verified all characteristics were there. Can you give us specific steps to reproduce the issue you are facing?


    Regards,

    Rebel

  • Hi Rebel,

    I tried to follow your guidelines after a fresh installation of the BLE SDK.

    I need some clarifications

    4. Built the IMG_A host image

    you mean cc2650lp_app?


    11. Removed 'FEATURE_OAD_ONCHIP' Preprocessor Define from IMG_B simple_peripheral

    I removed form the compiler options

    12. Changed all references of #if FEATURE_OAD_ONCHIP -> #if !defined(FEATURE_OAD_ONCHIP)

    I didn't find any "#if FEATURE_OAD_ONCHIP" exactly..  can you be more specific?

     

    Thanks !! 

     

  • 4. Yes-  I meant the cc2650lp_app of the oad_target project.

    11. Yes, that's exactly what you're supposed to do.

    12. Looks like you only have once reference in oad.c line 657, that's the same line I had to change as well

    Regards,

    Rebel