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.

OAD and CC2540 mini DK

Other Parts Discussed in Thread: CC2540, BLE-STACK

Hello All,

I am referring to http://processors.wiki.ti.com/images/8/82/OAD_for_CC254x.pdf  and in this doc it tells that the OAD Manager application has to be placed on a separate CC254xEM on a SmartRF05. Since we dont have that platform and we have CC2540 mini DK and associated dongles, is there a way I can program the OAD manager to the BLE dongle/miniDK and program the another mini DK over the air? Please suggest!

Thanks!

  • Hi Nagaraj,

    Yes, you can actually do OAD with CC2540 usb dongle and CC254x mini DK.

    On the PC side, you can use BLE Device Monitor, please download it and follow the guide here: http://processors.wiki.ti.com/index.php/BLE_Device_Monitor_User_Guide

    Configure the mini DK by following http://processors.wiki.ti.com/images/8/82/OAD_for_CC254x.pdf , and then use BLE Device Monitor with BLE dongle doing the OAD.

  • Hi Nagaraj,

    As Yan says, you can program the dongle with the HostTestApp firmware and use BLE Device Monitor to program.

    If you want to use OAD manager on either a dongle or the keyfob that is also possible, but you will need to make new Build configuration for those targets.

    1. Project -> Edit Configurations -> New -> Give it a name reflecting the new target board, base it on the existing one -> Ok.

    2a. For keyfob: Copy precompiler settings from e.g. SimpleBLEPeripheral's keyfob build config or from KeyfobDemo. LCD=FALSE, define MINIDK etc. Change the defines used in HandleKeys to reflect that you are using different keys.

    2b. For the dongle: See how HostTestApp does different builds for 2540USB and 2540EM (having two different Target boards, and excluding the one that is not used in this config) and copy this. This involves adding Groups and Files to the HAL/Target folder in the file view in IAR to support the USB target.

    There are more small things you may need to do to make the code compile and work on different targets, but I guess you can figure them out as you go along.

    Best regards,
    Aslak 

  • Hi Nagaraj,

    and also pay attention, if you are using the latest version 1.3.2 BLE stack, please make sure the DEFAULT_ENABLE_UPDATE_REQUEST option is set to FALSE.

    Otherwise the OAD  will not work with BLE Device Monitor.

    Anyway, sensorTag iOS app works fine no matter DEFAULT_ENABLE_UPDATE_REQUEST  is TRUE or FALSE in the project.

  • Thanks Yan and Aslak for your answers.. I will update you guys on my findings soon.

    Best regards,

  • Hey fellow members,

    Any updates on this topic?

    I've done this steps but the BLE Device Monitor starts programming the new firmware until 100% but when 100% is reached it stays in the same state without enabling the DONE button below. So I need to cancel the download.

    I tried even setting DEFAULT_ENABLE_UPDATE_REQUEST to FALSE (as specified) and now when 100% is reached I get a message: Command Status: 40 FD86 [len=0];

    Any suggestions?

    Best regards,

  • I second the above question.  I am getting the same error running the TestHostApp Project on the USB Dongle.  I try OAD-ing an Image B using the BLE Device Monitor to a KeyFob.  But as its OAD-ing, I get bombarded with  Command Status: 40 FD86 [len=0]; until the application eventually crashes.  Please advise

  • Hi Kevin and Matias,

    Either of you got this working? I am getting back to this task after long gap.. please advise..

    Thanks!
  • Hi nagaraj,

    I has been a while since I'd fixed this issue.  However I recall that the issue pertained to the either the peripheral or the central trying to change the connection parameters constantly.  The error you see is the Stack sending Connection Parameter Update requests constantly.   The BLE Device Central expects fast connection parameters for OAD.  Make sure there are no connection parameter updates pending before you start OAD, and that the current Connection Parameters are set to fast  <~48msec interval.   Hope this helps bud,

    Best Regards,

    K

  • Thanks Kevin for the response.

    I am actually very confused at this point with the whole OAD concept.

    I followed the developers guide to OAD.

    All I need to have is a way of flashing a new application on the air. As I mentioned before I have only Dongles and mini DKs and dont have the full development kit.

    I apologize for my ignorance!

    I am fully confused about the Img A and Img B concepts. I dont want to be having 2 applications on my sensor and run one of them. I just want to have one Application and want to be running that all the time. Once in a while I will need to reflash the application with a revision.

    So, can some one please tell me if I need to fully follow the OAD guide or is there any other simpler explanation somewhere else?

    If I understand right, the developer guide is asking to have BIM, Img A and Img B all on the sensor and then it also explains how to send Img B on the air. Which is confusing me thoroughly! Can somebody please help me out?

    Best regards,
  • Ok, so now I understand that there has to be Img A and Img B.

    In the OAD developer's guide (section 8.2) there is a mention that :

    "The other advantage of having a permanently resident Image-A which only implements the BLE-stack and OAD Target Profile is that the final customer’s Image-B does not have to include the OAD Target Profile at all, saving flash size, and where the Image-A can
    occupy both the INTVECs page and lock bits page, saving even more flash size. Finally, Image-A may be able to be built
    with a minimal subset of the BLE stack functionality which is required only to execute the OAD of new Image-B updates,
    thus further maximizing the space for Image B. "

    So, can anyone please guide me what is the way of getting this combination right? I mean to say a minimally occupying Img A which runs only OAD target profile and ImgB which doesnt have OAD target profile at all! I will be grateful for any advise.

    Thanks!
  • Right now, I am able to perform OAD with the bin files that already come with the BLE device monitor. But when I use my firmware, I get stuck with 100% program ! The Device monitor never seems to come out of this and the Done button never comes up! Exactly as what Kevin reported earlier.

    Kevin, I made the changes you suggested but its not helping! Can you please let me know if there were any other things which you did to resolve the issue?

    Thanks so much!
  • Supposedly the problem was because of wrong way of generating .bin files and using IAR to dump the Image codes in flash. I used sim2bin.exe which comes with the stack to get .bin file and the flash programmer to dump the Images in flash, and I was able to resolve this issue.

    Thanks everybody!
  • Dear all,
    I'm new to BLE topic and now testing whether OAD works.
    I plan to burn CC2541DK_BIM_SensorTagOadImgA provided in the BLE stack onto SensorTag through flash programmer, and put the .bin image-B through OAD using ios app.

    Using IAR workbench, i tried to follow the OAD developer's guide (section 11 step 3) but it just doesn't work.
    The guide says "Build but do not download" but i cannot find that option.
    I've maked the project many times but still cannot generate .bin file, there're only .sim file.
    i've also tried to follow the lead of stackoverflow.com/.../how-to-modify-the-ti-sensortag-firmware-to-advertise-indefinitely but can't get it work either.

    Anyone knows what may be wrong in the process.

    Thanks!
  • Hi Edward, 

    1. To build and not download, just right click on the project in IAR and click 'rebuild all'.

    2. Unfortunately, even I was not able to get .bin file from the above process, hence, as I said in my last post, use the cmd prompt program cc254x_sim2bin.exe located in Dir\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540.

     Ex usage: cc254x_sim2bin.exe xxx.sim yyy.bin 

    3. I also found that using the flash programmer to load Img A and Img B are the best ways! For BIM file use the option "erase and program" and for Img A and Img B, use Append and verify. 

    Hope this helps!

  • This is SO HELPFUL!!!!!!
    Sorry that i didn't notice there is second page of reply and did't see your comment.
    I'll try to make it work once I got the sensortag back tomorrow.
    Grateful for your help!