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.

UART over Bluetooth®︎ Low Energy demo

Other Parts Discussed in Thread: CC2340R5

Dear Sir, 

We got samples for CC2340R5 and our team is working on the eval boards, while searching we found there is a demonstration video for UART over Bluetooth® Low Energy demo (Link: https://www.ti.com/videolist/foldersGallery?bkg=gray&gpn=39095&familyid=2043)  but no source code is provided for reference.

After discovering this we have connected with the TI team but they conveyed to us that the example source code will be provided with next SDK release, presently SDK 6.41_eng is out but still missing the example code for transparent UART implementation over BLE .

Previous discussion link. ( https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1197057/uart-over-bluetooth-low-energy-demo )

Kindly share the source code so that we can better understand the working & implementation. Please let me know if you need more information from my side.

Thanks & Regards,

Harinder Singh

  • Hi Harinder,

    The uart over ble example is in the newest sdk release (6.41) under the name Data_stream. We also have the simple link academy for this example inside secure resources CC23XX_SIMPLELINK_ACADEMY_PREVIEW_v3.0.0.zip 

    Try running through the example and if you have any questions please reach out.

    Thanks,

    Rogelio

  • Dear Sir,

    Thanks for your quick response!

    I am not able to get zip file CC23XX_SIMPLELINK_ACADEMY_PREVIEW_v3.0.0.zip that you have mentioned above. Can you please share the file or link.

    The latest SDK which I have is 6.41_eng it contains the data_stream project but not able to find transparent UART functionality when I am running the example project, Adding the Project location details in the SDK below.

    ...\ti\simplelink_cc23xx_sdk_6_41_00_09_eng\examples\rtos\LP_EM_CC2340R5\ble5stack\data_stream

    Please refer to the previous thread which I have attached in the initial post. What I am asking for is transparent UART terminal over BLE.

    Attaching the screenshots of serial output & Mobile app when running data_strem example project.

    Serial Output

    Mobile App:

    Sir, is the correct example code which I am referring for the transparent UART over BLE or I need to do any modifications in the present code structure to make it work as per my requirement.

    Thanks & Regards,

    Harinder Singh

  • Hi Harinder,

    Unfortunately I cannot distribute anything that's in the Secure Resources such as the SLAs. You  will need to request access to the MSR which you can do here. 

    https://www.ti.com/wireless-connectivity/bluetooth/cc2340.html

    The Data Stream Example is the example that the cc2340 is using showcased in the video, this example receives some data over BLE, displays it on a terminal through UART, and then echos the data back over through BLE.

    To your point I agree that this example is not the best to explain how to receive UART from the terminal and then send that over BLE. A good example for that would be the serial socket examples that are in github.

    https://github.com/TexasInstruments/ble_examples/tree/simplelink_cc13x2_26x2_sdk-5.10/examples/rtos/CC26X2R1_LAUNCHXL/ble5apps

    Note that these projects are for the cc26X2 not for the cc2340R5 but, some knowledge can definitely be reused.

    For now the Data Stream Example would have to be modified in order to achieve what I believe you are lookin for but it would be the best example to start development from.

    Kind Regards,

    Rogelio 

  • Dear Sir, 

    Greetings of the Day!

    I am totally agree with you that we can modify the examples to achieve the required results but if you see the previous discussion thread. ( https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1197057/uart-over-bluetooth-low-energy-demo ) , They have already given me the HEX file of the Transparent UART example implementation. As the example is already there why can't you share it with us. It will save our time & help us to better understand the implementation process as CC2340R5 already a new product and its SDK is still under development.

    All the other manufactures provides the Transparent UART BLE example as standard reference app. to fasten up the development time.

    Sir, still I will follow your suggestion & try to raise my request for the MSR. When I click on the link that you have provided, lands to the CC2340R5 portal. But I don't get it where is the section to apply for MSR. I can share my company details, can you please help us with it.

    Thanks & Regards,

    Harinder Singh 

  • Hi Harinder,

    I understand the situation now. The good news is it seems that Clement has already ported the simple_serial example to the cc2340 device, however, the sdk that was used to build did not have pairing support. The new SDK 6.41 does support pairing however, the release of simple_serial is still in the works. We will need to rebuild the example with the new sdk and provide you the binary again. I currently dont have the source code, I will try to find it and build it for you by today, but worst case scenario I can get it by next week.

    Now for access to the MSR you will need to press the request details button in the link I provided above.

    Once approved you will have access in the secure resources tab

    Side question: How did you get access to the SDK without access to the Secure Resources?

    Kind Regards,

    Rogelio

  • Dear Sir, 

    Greetings of the Day!

    As per your suggestions, I got the Access of the following!

    Does these are the latest MSR that you were referring to for the Transparent Uart over BLE? if yes, which example or resource I should refer to.

    Thanks & Regards,

    Harinder Singh

  • Hi Harinder,

    The Example would be inside CC2340RX-Preview.

    From there you can download the latest 6.41 sdk  and also get access the Simple Link Academy's for our examples.

    I recommend going over the Data_Stream example and use it as a basis to port the simple_serial example over to the cc2340 device, as this example will not be ported over by TI and instead is getting replaced by data_stream. We have migration guides in the user guide to help you with this process.

    Kind Regards,

    Rogelio

  • Dear Sir,

    Greetings of the day!

    Thanks for your suggestions, I will try porting the simple_serial example to CC2340R5.

    Well I have tried Data stream example from the latest SDK 6.41 for testing but it doesn't serve the purpose.

    One thing is very clear to me, that to implement Transparent BLE - UART Link, we will need two characteristic, one for transmitting and one for receiving (as seen from the peer).

    • RX Characteristic 
    • TX Characteristic

    But I want to understand how the UART interrupt will work so that BLE UART works close to real time. In my present implementation what I am doing is running two parallel threads one for BLE stack  (*Simple peripheral example as base) & Other for UART interface handling, which basically capturing the UART received data into circular RX buffer, when I received "\r" I update a flag & I send the data to notification variable.

    The problem is it doesn't work in Realtime, there is some delay & It also consume more memory as I have to buffer the received data which again limits my implantation to number of characters that I can Receive over UART as its depends upon buffer size.

    Is there any other way of doing it, which solves these issues.

    1. No limitation of characters that can send from UART. The Hex file provided by the TI team for CC2340 Serial BLE testing works in a way that, user can send, n number of bytes but all this serial data is transmitted over BLE in the packets of 21 bytes(*characters) but in my case there is a limitation of no. of bytes that can be handles over UART interface as I am storing the received bytes into buffer, which is a overhead.

    2. Real time Transmission

    3. I don't want the user to send "\r" to transmit the data, can't be its like that, whenever there is something whether its a single character or a string over UART it gets just transmitted.

    Let me know your views on it.

    Thanks & Regards,

    Harinder Singh

      

  • Hi Harinder,

    You are completely correct that to implement a UART to BLE link you will need an RX characteristic and a TX characteristic. The issues you are facing are solved in the simple_serial_socket projects we have available on the BLE Examples github. That version of the example is for the previous generation of devices, but the logic and most of the code should be reuseable for the CC23XX SDK.

    https://github.com/TexasInstruments/ble_examples/tree/simplelink_cc13x2_26x2_sdk-5.10/examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/simple_serial_socket_client

    https://github.com/TexasInstruments/ble_examples/tree/simplelink_cc13x2_26x2_sdk-5.10/examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/simple_serial_socket_server

    Best Regards,

    Jan