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