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.

LAUNCHXL-CC26X2R1: cannot flash OAD with new simplelink connect app

Guru 18595 points
Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: UNIFLASH, CC2652R, SYSCONFIG

Hi there!

I am testing this new Simplelink Connect app with my cc26x2r launchpad.

  • Version of the app is 1.3.4.
  • My device is iphone12.
  • The code "receiving" the update is "project_zero" vanilla, no code modifications, from your SDK v7.10.

I was able to open the app, find the peripheral, connect, flash one of the included "simple_peripheral" codes that the app dropdown offers. Cool! Green heart

However, problems appear when I try to flash one code generated by CCS instead of these included in the dropdown. The code I try to flash is the same "project_zero" vanilla. I don't mind, just for the sake of the test.

I open project zero source code with Code Composer Studio v11.2 and I build and run the example from the IDE. No Uniflash tool involved. I did not need Uniflash in the previous test which worked fine.

I do NO code modifications. I just add these lines to the project properties last step so the tool generates a MCUboot-enabled OAD image.

Src:

dev.ti.com/.../imgtool.html

These 2 were already there:

${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out

${COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR}/tools/common/oad/oad_image_tool --verbose ccs ${PROJECT_LOC} 7 -hex1 ${ConfigName}/${ProjName}.hex -k ${COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR}/tools/common/oad/private.pem -o ${ConfigName}/${ProjName}_oad

These 2 I added them:

${CG_TOOL_ROOT}/bin/tiarmobjcopy ${ProjName}.out --output-target binary ${ProjName}.bin --remove-section=.ccfg

${COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR}/tools/common/mcuboot/imgtool sign --header-size 0x100 --align 4 --slot-size 0x4C000 --version 1.0.0 --pad-header --key ${COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR}/source/third_party/mcuboot/root-ec-p256.pem ${ProjName}.bin ${ProjName}.bin

When I try to "update fw" with the app, it complains about "Bad TLV magic". And since I am a very good boy, I also have an opened serial terminal and I can clearly see an "OAD Error: 9" there.

So, what am I doing wrong in this second case?

Please let me know. I am open to perform any needed test.

Thanks to all Right facing fistLeft facing fist

  • Small update Slight smile

    Turns out I was flashing the file ended in _oad (please see colors above).

    Now I added some "aa_" prefix to differentiate both files and the "bad TLV" or "MCU altert" messages do not appear :)

    However, the FW update does never go beyond 0%.

    The "OAD: Error 9" message is still appearing on my serial terminal screen.

    I suspect more naming errors, so please check if those lines in "build steps" are OK.

    Maybe I only need the 2 last ones?

    Maybe I need to make the 2 last ones work using the file already ending in _oad from the first 2 lines?

    Will keep testing, please tell me anything stupid I might be doing.

    Have a nice day

  • Another possibility... is is possible I need to add the predefined symbol

    MCUBOOT_ENABLE

    for project_zero ?

    I don't think this is the culprit, since "OAD error 9" prevents the whole thing to ever start downloading to the launchpad but please let me know :)

  • Hi kazola,

    Did you flash the bim off chip hex then the project zero bin file? If not please do so using Uniflash. After flashing if you see project zero advertising then you are set for OAD.

    Your OAD bin file needs to be saved at your smartphone downloads folders.

    I tested using CC1352R1 launchpad. The SimpleLink Connect App fails OAD. However, the SimpleLink Starter App OAD works.

    SimpleLink Connect App supports OAD for CC23xx from what I have read. So now people would need to use separate apps for testing OAD. This is sort of annoying.

    -kel

  • Hi  long time no see!

    I am confused with what you suggest here.

    It is not that the board does not boot after OAD. In this case, I would agree about your solution involving Uniflash.

    Instead, the problem is the cc26x2r DOES NOT even start receiving MY .bin file generated by CCS. However, the cc26x2r DOES start receiving a .bin file from the ones in the app's firmware images dropdown.

    Thus, I don't think the Simplelink Connect app is the problem (it is also clearly stated cc26x2r is supported by it and in fact it is offered in the device dropdown of the app and in fact it works with images from the dropdown). 

    The problem is the board outputs an OAD error 9 (OAD_INCOMPATIBLE_IMAGE) for .bni files from CCS. So, we should know how the images in the app dropdown are generated and copy such "post build steps" in project zero for cc26x2r.

    I hope I was able to present my problem better!

  • Hi kazola,

    I will detail my procedure with pictures. I will test this time using CC26x2R Launchpad. I am using SDKv7.10, CCSv12.3 and android phone with SimpleLink Starter App. The SimpleLink Connect App only supports OAD for CC23XX. You can read it in the app.

    Using CCSv12.3 I import project zero to my workspace and build it. The project zero OAD bin file is located at my folder below. You also need to save the project zero OAD bin file at your android phone downloads folder. I do not have an Iphone for testing.

    C:\ti\ccsv123workspace\CC2652R_Launchpadv710\project_zero_CC26X2R1_LAUNCHXL_tirtos7_ticlang\Release

    The bim off chip oad hex file is located at SDKv7.10 folder below.

    C:\ti\simplelink_cc13xx_cc26xx_sdk_7_10_02_23\examples\nortos\CC26X2R1_LAUNCHXL\bim\hexfiles\bim_offchip\Release

    Actually, I failed to program the bim off chip hex and project zero OAD bin file using Uniflash. There must be some needed setting.

    So, using SmartRF Flash Programmer 2 version 1.8.0. Program first the bim off chip hex file. After that program the project zero OAD bin file. Set the Actions options. Select the pic to enlarge it.

    Open the SimpleLink Starter App. You should see Project Zero. Select it.

    Select TI OAD Service.

    Select Custom FW.

    Select the project zero OAD bin file. 

    The OAD should start. It will take a few minutes to finish.

    -kel

  • Hi Markel,

    I agree with Simplelink Starter app, I made it work some time ago. Thanks!

    The newer app Simplelink Connect app worked yesterday with cc26x2r using the dropdowns in the app for this device. I would prefer working with this one.

    Also in the app website says:

    The SimpleLink Connect Mobile app is an example Bluetooth® Low Energy application for mobile devices that works with CC13xx and CC26xx devices running in the SimpleLink Low OPower F2 SDK and CC23XX devices running the SimpleLink Low Power F3 SDK

    So the question remains. How do I generate my own images that I can download via OAD to cc26x2r using the Simplelink Connect app?

  • So the question remains. How do I generate my own images that I can download via OAD to cc26x2r using the Simplelink Connect app?

    You just build your OAD example application. For example after build the project zero the OAD bin file can be located at the CCS project "Release" folder. Mine is located at "C:\ti\ccsv123workspace\CC2652R_Launchpadv710\project_zero_CC26X2R1_LAUNCHXL_tirtos7_ticlang\Release".

    The newer app Simplelink Connect app worked yesterday with cc26x2r using the dropdowns in the app for this device. I would prefer working with this one.

    Yes, you can connect the CC26x2R Launchpad project zero to SimpleLink Connect App. But, the OAD does not work. I have tried it many times. It also has bugs. It looks nicer though.

    -kel

  • Ok.

    1. Do you know if there are plans to make this work for cc26x2r?
    2. Also do you know where we can find the latest source code for simplelink starter app for iphone and android?

    Thanks!

  • Hi,

    Unfortunately, the SimpleLink Starter app is not open-source and we do not have the code publicly available. However, the SimpleLink connect app is fully open source and we have the code available for reference here: https://github.com/TexasInstruments/simplelink-connect

    Can you share the issues you are facing with the SimpleLink connect app? I would be more than happy to try to hep resolve them and pass along the feedback to the development team.

    Best Regards,

    Jan

  • Hi Jan,

    The issues are depicted in this thread.

    Basically, I can use Simplelink Connect App to send my cc26x2r a firmware update image from the app dropdown. However, if instead of selecting one of the examples in the app dropdown I try to use one firmware image generated by me, the progress bar never goes beyond 0%. 

    Markel says cc26x2r is not supported but the app and website says it is. Also, I tried it yesterday and as I say, it worked for examples from the app dropdown.

    I suspect this may be related with the new MCUBoot way to generate images and so on.

    My images worked long ago with Simplelink Starter App but I was told this source code is not available so I need to use Simplelink Connect App.

    Please ask me anything not clear, I am open to work with anyone to test.

    Have a nice day.

  • Hi,

    Got it. Thank you for summarizing the behavior you are observing. OAD error code 9 maps to OAD_INCOMPATIBLE_IMAGE which is described as Image signing failure, boundary mismatch. Could you try using btool to send the CCS image over the air? Btool contains some additional debug information that may be helpful.

    Best Regards,

    Jan

  • Hi!

    This seems like an interesting suggestion, let me a couple days to find another launchpad and I will use this BTool thing to try it and get back here with the whole output.

  • Hi,

    No problem! Let us know when you have an update. :)

    Best Regards,

    Jan

  • Hi Jan,

    All the codes and settings are vanilla, I changed nothing.

    I flashed one cc26x2r launchpad with hosttest app and opened btool.

    Loaded a project_zero image SDK v7.1 generated by CCS using Uniflash, name ending in _oad.bin. Let's call this image "A".

    The other cc26x2r launchpad (let's call it "target") was running also project_zero, and attached to a serial terminal. I don't really mind the codes being the same at this point, I just want to prove a point Slight smile

    When you send the image "A" over the air to the target launchpad, it works. Please see screenshot.

    When you send the image "A" over the air using the Simplelink Connect App, I get "OAD: error 9" on my target launchpad serial terminal.

    Again, in this latter case, if you use not an image generated by CCS but one of the offered by the dropdown in the app, it also works.

    So, the original question remains, how can we send an image file generated by CCS using the Simplelink Connect app to a cc26x2r launchpad?

    Thanks a lot for your time.

  • Hi,

    Got it. Thank you for sharing the results! I mainly wanted to verify that your CCS setup was able to generate a working OAD image that could be reliable sent over other means besides the connect app. This may be a bug that needs to be addressed by the dev team. Can you share the iOS version you are using? Also, do you have an android device to test with? It would be helpful to see if the behavior is OS independent.

    Best Regards,

    Jan 

  • Hi Jan,

    Android does exactly the same thing, I tried this morning Slight smile Will not send an image generated by CCS, will send one from the app's dropdown.

    My guess is something in the signing of the images generated by CCS.

    I could not try this time with Android Starter app. It worked some time ago. But nowadays, the detected peripheral list appears and disappears every 1 second and is impossible to choose an entry. I guess a bug in the latest version.

  • Hi Jan,

    This did not work out.

    This option of that thread is no longer visible or available in the current GUI of the app.

    That thread works with version 1.2.2.

    Downloading the app now gives you v1.3.4.

    That option is not there.

    It goes from "Skip tutorial at start" to "Sort RSSI".

    Can TI test on your side that images generated by CCS cannot be sent to cc26x2r using Simplelink Connect App but images from the dropdown work?

  • Hi,

    Got it. Thank you for checking! To confirm, you are able to start the OAD process, but it fails? I looked into this and it seems we have run into similar behavior before and would like to confirm if this is the same issue or a different one. Can you send screenshots of the OAD page before attempting an OAD and after on the android device? I would like to forward this to the dev team.

    Best Regards,

    Jan

  • I attach "before" and "after" pics.

    In "after" please notice the error on both sides. Bad TLV on phone, Error OAD 9 on laptop.

    Before

    After

  • Hi,

    Thank you for these images. I have filed a ticket with the dev team. I am hopeful they can look into this somewhat soon and get a fix out. I truly apologize for the inconvenience this may be causing during your development.

    Best Regards,

    Jan

  • Hi Jan,

    Thanks. I am open to chat with anyone from the dev team or zoom or anything.

  • Hi,

    Understood. I appreciate your flexibility here. I will reach out to dev team to see if they need any additional information.

    Best Regards,

    Jan

  • Hi Jan,

    It's been 10 days, is there a solution to this?

    The issue is there is no Simplelink Starter app source code available.

    And the Simplelink Connect app currently does not work for cc26x2r. It only works with your example images.

    I can work with any of your team members to solve this Slight smile

    Please let me know.

    Thanks.

  • Hi kazola,

    Any particular reason why the SimpleLink Starter App is not okay for your work?

    If I remember correctly there is an online repository for TI BLE Enhanced OAD. I just can't find it in the internet at the moment. But, you need an app developer to implement it.

    -kel

  • Hi Markel,

    The Simplelink Starter app source code is not available. Nor you can change the logotype or customize it to your brand and so on.

    Also, I would like to be able to use the newer one, because the code is available and it is shown to work with cc26x2r. The only problem with it, it only accepts the stock example images included in the app. I guess it is just a matter of signing them. I wish someone besides me could give me their point of view or experience with it and maybe we could fix it.

  • Hi kazola,

    At my previous work the app developer implemented the TI BLE Enhanced OAD. If I remember correctly there is an online repository with TI BLE Enhanced OAD code in it, not the SimpleLink Starter App code. The link was shared in the forum I just could not find it at the moment.

    -kel

  • Hi Kazola,

    I filed the ticket shortly before i posted my last reply, so I expect the dev team to add it to their queue an address it during their next sprint. With regards to the Starter app, we do not release full source code but, as Markel mentioned (Thanks Markel! :) ) there is some helpful reference code available that may be helpful. The following E2E thread discusses this a bit:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/766648/simplelink-starter-app-source-code

    Best Regards,

    Jan

  • Hi  and Jan (don't know how to add the @ in Jan). Many thanks again for your time and inputs!

    I would really like to understand what is going on here first. I talked with one guy at a TI module manufacturer selling hundreds (or thousands) of units and asked him to do the same test and exactly the same results happened.

    Let's face it. OAD has been solved for years by other competitors but under our beloved Simplelink platform, either it does not work, or only for dummy images like in my case, or it has problems, or you cannot find the example source code, or it is not standard, or TI does not support questions about developing apps based on such source code, or etc, etc.

    Probably this is just a matter of a couple configuration or code lines for cc26x2r. The app says the chip is supported, the app can send its own images to it. I don't really want to (again) spend hours, days, weeks, or even months, working on some code from an unmantained repository for a custom solution because we could not solve something that probably just requires reaching the right guy.

    I hope we can solve this together :)

  • Hi kazola,

    As far as my experience with TI wireless MCU, they only support the hardware or MCU and not the Android or IOS App. They provide sample Android or IOS App code as reference. But, the engineers here in the forum are most likely not the app developer who made SimpleLink Starter App or SimpleLink Starter App. Maybe, they hired a company to make the SimpleLink Starter App or SimpleLink Connect App. 

    Regarding SimpleLink Starter App I actually only use it for OAD. The SimpleLink Connect App is new and I just used it helping you and then uninstalled it because I found some issues with it. But, The OAD works I tested it many times with SimpleLink Starter App and Btool.

    At my previous product development, I am responsible for initial prototype which involves hardware and firmware. Then I work with a app developer company who works closely with me to for example implement the OAD. So, If you are doing the same then you need to work with an app developer company. If you are US based, I can recommend a company. Of course they need to be paid for the work. If you want cheaper options then maybe I can find you an app developer here in Asia or Philippines where I am.

    -kel

    -edited

  • Hi Kazola,

    I apologize for any frustration that may have arisen from the mobile application offerings. As Markel mentioned, these mobile apps are provided to assist in testing and as a starting point for development. My guess at what's happening is that there is some sort of bug on the mobile app side or something related to the application signature must be changed to allow the images to work as expected. I have filed a ticket for this to get addressed by the dev team, but I am still waiting to hear back. I will ping the team to see if they have any thoughts to share.

    Best Regards,

    Jan

  • Thanks Jan! I will wait

    I attach a screenshot with a suggestion coming from the module manufacturer guy

    Again, feel free to put me in contact with any tech support people so we can test this and post results here.

    What we tried some weeks ago was in this page:

    https://dev.ti.com/tirex/content/simplelink_cc13xx_cc26xx_sdk_7_10_00_98/docs/ble5stack/ble_user_guide/html/oad-mcuboot/imgtool.html

    Maybe the whole thing only needs a tweak there.

  • Hi,

    Thank you for the info. I am still waiting to hear back from the dev team. Unfortunately, they are on holiday this week so we likely we will not hear back until early next week. In the meantime, I found the following thread that discusses Bad TVL Magic error.

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1290287/launchxl-cc26x2r1-simplelink-connect-app-error-while-trying-to-update-firmware-application-using-oad

    I think you had shared this previously, but can you confirm expected BIM is the one used?

    Best Regards,

    Jan

  • Hi Jan,

    That thread is not that useful because (as far as I know) that guy is using the "persistent app" which only is used for doing on-chip OAD to do off-chip OAD.

    So yes, he has the same problem as me but he has an additional problem. Again, as far as I know.

    Also, the bim only affects once you try to boot the board with the sent OAD image. This guy cannot even send the image, like me.

  • Hi,

    Got it. Thank you for checking the thread. I will ping the development team once more. Hopefully I am able to get talk to them sometime early next week and continue this debug. At this point, I definitely think there is something missing on the mobile app side.

    Best Regards,

    Jan

  • Hi Jan,

    Is there any advance on this?

    At this point, it is not even about technical support. We identified the bug and told TI everything that can be checked.

    It is more of a communication issue. Is there someone at TI who knows anything about this topic? Again, I can work with them. I don't think it's going to be that hard with the right person. Does TI even know who such person is?

    It is getting more and more difficult for me to justify my TI preference to my bosses.

    Thanks for your work and have a nice day.

  • Hi,

    Thank you for reaching out. I apologize for the development issues you have faced with the SimpleLink Connect application. The ticket has been added to the queue for the dev team to address. That said, there is a planned released coming in the very near future that I would like to see if it has the same behavior. There will also be an update to the SLA SimpleLink Connect module that will include additional information about custom OAD images which may be helpful. I will get back to you as soon as possible to try to see if we can resolve this with the newer version.

    Best Regards,

    Jan

  • Hi Jan,

    As always, thanks for your work.

    Please pass this information to devs. I have been doing some research this morning.

    To begin with, the Simplelink Connect app reads an image generated with CCS as "mcuboot". Instead, the images loaded by the default dropdown in the "app" are identified as "bim".

    Also, when trying to upload the CCS-generated images, the debug session shows this info.

    Where all the information obtained from the ID message seems wrong, for example idPld->bimVer.

    I don't know, but seems that Simplelink Connect app does a poor job managing CCS-generated bin files.

    Again, please let me know if there is a more direct way to solve this, such as an e-mail. We recently bought 3K of modules based on CC26x2R and we would like to have some direct feedback on this. Just in case that newer version adds some stuff but does not resolve this, we can try to speak to the dev to make sure it is.

    Thanks and have a nice day.

  • Hi,

    I completely understand. I have discussed this further with the dev team and they have reproduced the issue and have a potential fix. I took time to reproduce the behavior on my side:

    I reproduced it by building an unmodified project zero, flashing project zero & BIM off chip release onto the device. Afterwards, using the latest mobile app, I attempted to perform OAD using the same .bin file generated when I built the unmodified project zero and ran into the Bad TLV Magic error.

    The dev team provided me with an experimental build which contains the potential workaround and I was able to fully perform OAD using the exact same images and procedure:

    The dev team will work to include this fix in the following release. I truly apologize for the delay in getting this resolved, but it seems the potential fix that the dev team has implemented does seem to resolve the behavior you have reported.

    Best Regards,

    Jan

  • Hi Jan!

    This is promising work, thanks!

    I guess next SDK release is in a couple months, maybe June 2024?

    If it is just a matter of overwriting a couple files, feel free to contact me and I can also be part of the testing and mark this thread as "resolved".

    Meanwhile I will leave it open in case related issues or opinions appear. Or when the release appear, we can indicate it here.

    Thanks a lot Jan. This will help us much once is working.

    Have a good day.

  • Hi,

    This will be released separately from the SDK, so I expect it to go live on the app stores in a couple of weeks. I will try to see if I can provide a better estimate.

    Best Regards,

    Jan

  • Hi,

    I think even the SimpleLink Starter App has issue....

    I have tried renamed the device to Project Zero123 and then do the FW update in SimpleLink Starter App

    0871.project_zero123_CC26X2R1_LAUNCHXL_tirtos7_ticlang_oad.zip

    1) I use uniflash to load the bim_onchip and the original project_zero images. 

    2) Use the latest iphone  SimpleLink Starter App to scan and connect the project zero device

    3) Select FW update and load the project_zero123_CC26X2R1_LAUNCHXL_tirtos7_ticlang_oad image from local

    4) The OAD said it is completed 

    5) Reboot the device, it is still the Project Zero instead of Project Zero123!!!!!

    Seems it doesn't updated the FW at all....

       

  • This is NOT the same issue

    Also I think you are misunderstanding something.

    The name of the device is NOT the same as the project's.

    If you want to change the name of the device and see it changed, open sysconfig, change the name WITHIN the "BLE" section and do the firmware upgrade over-the-air Slight smile

    Good luck.

  • This is what I did to change the device name and yes, it was done in the sysconfig.

    I expect the device name to be changed to Project Zero123 after the OTA, but it did not

  • Ok

    Although it is not the same issue because Simplelink Connect cannot even send the first OAD packet.

    Let's see if these guys come up with a solution soon!

  • yea @kazola, both the Simplelink Connect and Starter OAD have failed to do the update...hopefully there is a solution soon

  • Hi Terence,

    This issue seems unrelated to the issue that Kazola has discovered. That said, it is definitely not expected. Can you open a new E2E thread so we can get to the bottom of this behavior?

    Kazola,

    I was unable to obtain a more clear estimate from the dev team as they need to go through some release procedure first. The estimate right now is a couple of weeks from now.

    Best Regards,

    Jan

  • Hi @Jan,

    Any updates on this? 2 weeks have passed Slight smile

    Please let us know.

  • Hi,

    The new version of the SimpleLink Connect app has been made public on the app store. The version is 1.3.5 and includes some additional features (stress testing, additional profiloe specific screens, etc).

    Can you test it and see if the issue has been resolved on your side as well?

    Best Regards,

    Jan