CC2652RB: Data transfer via BLE

Part Number: CC2652RB

Hi Team,

Asking your expertise on our customer's query. Posting on their behalf:

I am following BLE custom profile creation tutorial from the simple link academy tutorial. I am able to update the initial value of myVar on button press. However now my goal is to increase the data length transmitted through BLE on button press. That means I want to transfer the whole content of the text file stored in sd card attached to the TI CC2652 LP on button press till the end of file marker is reached.
So this can be achieved by two steps as I believe:
My first goal is to transmit an ADC value read from a GPIO pin on the launchpad on button press. Secondly, I will transmit a string of length 35 float number after a button is pressed on the launchpad. Third, I will transfer the whole file reading it character by character.
Would this work? Please let me know if you have some better solution in mind.

Thanks in advance!


Kind Regards,

Jejomar

  • Hello Jejomar,

    I believe your proposed solution should work. You may find the following examples on our GitHub helpful.

    Throughput Peripheral

    Throughput Central

    Simple Serial Socket Server

    Simple Serial Socket Client

    The Throughput example shows how to create an application where throughput is maximized for data transfer. The Simple Serial example show show to transfer a stream of data through BLE. In this case, a UART data stream, but the example could be used as a starting point for your application.

    Regards,

    Jan

  • Hi Jan,

    Many thanks for your response. Can you also help us look into the BLE stack code from simplelink academy (attached below)? In this code, our customer have tried to integrate ADC code with project_Zero code. But its not working as we are expecting the adc value to be transmitted via adc. We would just like to know how to replace myVar (variable in the Project zero custom BLE profile tutorial and also in the attached file) by adc raw value.


    Kind Regards,

    Jejomar


    project_zero_ADC_code.txt

  • Hello Jan,

    They've also looked at the examples you've shared but while importing the downloaded project from github link, they are getting following error: "Project import failed, as its meta-data can not be interpreted". Can you let us know why this error is coming up?
    They are following the following procedure:
    Download zip folder: "ble_examples-simplelink_cc13x2_26x2_sdk-4.10" from github.
    Extract all contents to a location. Then import "simple_serial_socket_server" project using Project -> Import CCS project.

    They were also able to import the simpleserialsocket server example code. However, they are facing errors on building it. Attaching the build errors snippets.

      


    Kind Regards,

    Jejomar

  • Hi Jejomar,

    Why your customer not able to post at E2E forum? Where does your customer want to transfer the entire file stored in SD card via Bluetooth, to smart phone or PC?

    I will just provide some inputs regarding your customer's query. Doing any projects and being successful with it is just a matter of proper procedure. Just focus on the 2 items below first.

    1. Use simple peripheral as base for any project or product development.
    2. Send ADC value via a custom Bluetooth Service.

    -kel

  • Hello Jejomar,

    The screenshots are very low resolution. I cannot read the errors provided. Can they provide the exact steps they followed to get the error message as well as a more high resolution image? I agree with Markel. The throughput and Simple Serial examples would be great references, but the simplest way may be to start with simple_peripheral and slowly add the features desired one by one. Markel mentioned two excellent starting points.

    Regards,

    Jan

  • Hello Markel and Jan,

    Many thanks for your inputs. Due to time-constraints, our customer won't be able to explore much of the simple peripheral examples as they've already invested their time on the project zero custom profile, as it was they've focused on within the simplelink academy.

    If you could further help us, what part of the simple peripheral example would you recommend to start let suppose the first task is to attach an ADC variable to the code and transmit the adc value to smartphone (GATT Client)? Can you help us on the beginning steps for customizing this part of simple peripheral code to transmit ADC value?

    Many thanks for your support.


    Kind Regards,

    Jejomar

  • Hello Jejomar,

    I recommend looking at the adcbufcontinous example project present in the SDK as well as the adcsinglechannel project. Both of these projects implement ADC measurements and should provide a good starting point for setting up the ADC measurement portion of your project. Once ADC measurements are being made successfully, you should be able to use notifications to send data to the smartphone. The throughput project linked above sends data continuously from the peripheral to the central through the use of notifications. I believe that project would be very helpful. Is the customer able to download and import the throughput project?

    Regards,

    Jan

  • Hi Jejomar,

    I have read the project zero adc code of your customer. The reading of adc is at a separate task. Not sure the multi task implementation works. Using one of the adc example programs, just integrate the adc code to Project Zero task. Then test the adc code if it works by simply connecting a potentiometer.to the analog input.

    Also make sure the customer is using SDK for CC2652RB.

    -kel

  • Hello Jan,

    Many thanks for your valuable inputs. I have made the ADC measurement successfully using both adcbufcontinous and adcsinglechannel project. I am able to download and import the throughput project but when I'm trying to build and load the project, I'm not able to do it. I have imported the throughput peripheral project by following process below:

    I have downloaded the throughput peripheral project code from GITHUB and then extracted the folder and imported it by file-> open projects and import options. But through both the options the project is not getting build. Also the project doesn't show up RTSC in the workspace. Can you guide me on how to import and build the project successfully?


    Kind Regards,

    Jejomar

  • Hello Kel,

    Many thanks for reading into our projectzero adc code. I am also following the same approach to integrate the working adc example code to project zero code but I am not able to understand as to what steps should I take to integrate. Currently i am trying to assign the adc variable to the counter variable in project zero custom code (variable named "myVar" in the code). But when i am doing that there is no ADC read.


    Kind Regards,

    Jejomar

  • Hi Jejomar,

    There should be adcsinglechannel example program in the SDK. Connect a potentiometer to DIO23. Then run the adcsinglechannel example program. Understand how the reading of ADC works and store to a variable adcValue0. Understand how to initialize the ADC. Understand how to read the ADC.

    How to integrate adcsinglechannel to Project Zero:

    1. adcsinglechannel initialization integrate to Project Zero init.

    2. adcsinglechannel read adc integrate to a clock routine. Use Util_ConstructClock().

    -kel

  • Hi Jejomar,

    Can you verify if the following steps are able to successfully import the project?

    First, download the example pack and unzip the archive. Afterwards, do the following.

    1. Import a CCS Project

    2.The import menu will open. Ensure you the "Select search-directory" option is selected

    3. Click on browse, and navigate to the location where the example pack was extracted. Select the project you would like to import.The window should now look like this.

    3a. At this stage, you may get an error. If so, then it is probably the following screen. If so ignore it and press OK.

    3b. Afterwards, you should see the following screen. Press cancel.

    4. You should see the project in your project explorer as shown below:

     \

    5. Right click on the project and select properties

    6. The properties screen should open up as shown below:

    7. Navigate to the middle Products tab and ensure that the 4.10 SDK is selected. If not then, change it to 4.10.

    8. Navigate to the right Products tab and do the same as in step 7. Afterwards, press Apply & Close.

    9. Save the project and build. You should see the following build completed message

    This process should work and can be used to import any project in the example pack. If you run into any issues while following these steps, then please let me know and we will get to the bottom of this.

    Regards,

    Jan

  • Hi Jan,

    Many thanks for the guiding procedures. I have tried these steps but I am getting a different error. The project is not coming up in project explorer. Please refer to the image below.




    Kind Regards,

    Jejomar

  • Hello Jejomar,

    What step of the process is that error occurring? Are you able to perform all of the steps leading to the error properly and the menus/windows look similar to the ones provided in the screenshots above?

    Regards,

    Jan

  • Hi Jan,

    I am getting the error after performing step 3. After that, I'm unable to perform the remaining steps from step 4 as the project is not coming up in the workspace as shown in step 4.


    Kind Regards,

    Jejomar

  • Hi Jejomar,

    This seems very strange. Can you provide us with which version of CCS you are using? I have also attached the zipped up throughout_peripheral project. Can you try importing it and letting me know if you still get the same error? If this doesn't work, then I suggest updating to the latest CCS version and trying again (or if you are already on the latest CCS, then re-installing it).

    Regards,

    Jan

    throughput_peripheral.zip

  • Hi Jan,

    Thanks for the continuous support. I am now successfully able to import and build the project. However upon building the project, we are facing following error. Can you help us further debug this?




    Kind Regards,

    Jejomar

  • Do you download and install TI SimpleLink CC13x2 / CC26x2 SDK simplelink_cc13x2_26x2_sdk_4_10_00_78 in c:\ti of your PC and copy all files/folders under https://github.com/ti-simplelink/ble_examples/tree/simplelink_cc13x2_26x2_sdk-4.10 to your c:\ti\simplelink_cc13x2_26x2_sdk_4_10_00_78 folder? I did those steps and I can import throughput_peripheral from C:\ti\simplelink_cc13x2_26x2_sdk_4_10_00_78\examples\rtos\CC26X2R1_LAUNCHXL\ble5apps in my CCS to build it without problem.

  • Hi Jejomar,

    No worries! As Yikai mentioned, can you ensure that you have the 4.10 SDK version installed? One of the warnings states that the required SDK version is not installed. Can you try installing the 4.10 version and verifying? Can you also try following the procedure that YiKai mentions on importing the project as well? Also, what version of CCS are you running? Can you try updating CCS to a newer version, just in case?

    Regards,

    Jan

  • Hello Jan and Yikai,

    Many thanks for your response. We've shared your responses to our customer and we have received their feedback as follows:

    I have tried two times by reinstalling 4.10 SDK, still its not working for me. As suggested by Yikai, the 4.10 in the resource explorer contains examples only for CC13xx, not directly for CC26xx. I am using CCS 10.3 version.

    I have tried Yikai's suggestion but they are not working for me somehow. Coming back to your way, can guide us how to check whether simplelink 4.10 version is installed? Asking this as I have completed the installation but it does not show up in CCS. (See below image)



    Also in the above method of import, I am not getting rightmost product tab as in step 8. I am getting only one product tab.


    Kind Regards,

    Jejomar

  • After you install simplelink_cc13x2_26x2_sdk_4_10_00_78, you should see simplelink_cc13x2_26x2_sdk_4_10_00_78 folder under c:\ti

  • Hi Jejomar,

    To clarify the SDK for the CC2652 is the SimpleLink CC13X2 26X2 SDK. Ensure this is the one that is installed. You may download an older release here: https://www.ti.com/tool/download/SIMPLELINK-CC13X2-26X2-SDK#previous-versions as well as in TI Resource Explorer. Can you verify if this is the SDK installed and you are able to see the sdk in the file location that Yikai specified?

    Regards,

    Jan

  • Hi Jan,

    I am now able to install and download the required SDK after reinstalling the CCS and it is visible in the C:\ti folder. But it is still not showing up in the Resource Explorer, can you guide us on how to import the particular example? I am also not able to view the examples of SDK 4.10.78. Can you tell me what should be my next step as per Yikai's suggestion ?

    Also when i am working on importing the GITHUB example of throughput peripheral as mentioned by you in the above 8 steps and I am able to see the SDK 4.10.0.78. However when I'm selecting and building the project I am encountering the following error:






    Kind Regards,

    Jejomar

  • Why don't you just import the project from your c"\ti ...." folder?

  • Hi Jejomar,

    As Yikai mentioned, you do not have to use resource explorer to make use of the SDK. You can import a project directly from the TI SDK folder. I am not getting the error you showed. Did you extract the contents of the ble_examples zip into a separate folder? Are you able to see the throughput_peripheral.h file in the project within CCS?

    Best Regards,

    Jan

  • Hello Jan,

    Can you guide us on the procedures for importing the project through TI SDK folder? Asking this as when I import the project from SDK folder, I'm facing the error "Metadata cannot be interpreted".

    Yes, I have extracted the contents of the ble_examples zip into a separate folder and then copied the contents to the installed TI SDK 4.10 folder as suggested by Yikai above.
    I am able to see the throughput_peripheral.h file in the project within CCS as shown below.




    Kind Regards,

    Jejomar

  • Hi Jejomar,

    It is possible something may have gone wrong during the installation. Can you uninstall CCS and all of its modules, restart your computer  and follow the following instructions?

    1. Download the latest Code Composer Studio

    2. Once downloaded, extract the contents of the downloaded zip and run the ccs_setup.exe as administrator

    3. Proceed through the instructions and select Custom Installation for the installation type.

    4. Select the SimpleLink CC13xx and CC26xx Wireless MCUs and any other desired components.

    5. Continue through installation and leave everything as default.

    6. Once installation is finished. Download and install (as administrator) the CC13x2 and CC26x2 SDK 4.10.

    7. Once the installation is complete. Launch CCS and navigate to Windows > Preferences 

    8. Afterwards, navigate to the Code Composer Studio > Products tab and press Refresh.

    9. Some products should be discovered. Add them and accept the prompt to restart CCS.

    10. Afterwards the Discovered Products section should look as follows:

    11. Press Apply & Close

    Afterwards, follow the steps shown earlier to import the project into the workspace. By following both sets of instructions I was able to successfully build the throughout_peripheral project as shown below [Note: I had to change the SDK version in the project properties as mentioned in the earlier set of instructions]:

    Let me know if there are any issues.

    Best Regards,

    Jan

  • Hello Jan,

    Many thanks for the detailed procedures. We've shared these with the customer but due to some constraints they're unable to proceed on their end.

    Please give us some time for now. I'll get back to you once I have received their feedback.



    Kind Regards,

    Jejomar

  • Hi Jejomar,

    Thanks for the update. Let us know, if there are any issues!

    Best Regards,

    Jan