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.

SIMPLELINK-CC13X2-26X2-SDK: How to add and display any logs in BTool

Part Number: SIMPLELINK-CC13X2-26X2-SDK

Tool/software:

8.30 of “SimpleLink SDK cc13xx_cc26xx” and CC26x2R-Launchpad.

Writing host_test to Launchpad and using BTool.

I see logs on BTool, is it possible to display any message on that log display?

For example, I would like to have the RSSI value displayed on the BTool log screen every second.

  • Hello Yasukane,

    You can use the HCI_ReadRssiCmd() command to display RSSI messages.

    If you want to get the rssi values every period of time, I would suggest to look at the TX dump in BTool and transmit it through serial port using a script (using python for example).

    ...

    import serial
    import time
    
    # === CONFIGURE UART ===
    UART_PORT = "COM105"  # Adjust based on your system (e.g., COM3 on Windows)
    BAUD_RATE = 9600 # High baud rate for fast communication
    
    # Open UART connection
    uart = serial.Serial(UART_PORT, BAUD_RATE)
    
    def send_hci_command(command_hex):
        """Send an HCI command to the CC23xx over UART."""
        command_bytes = bytes.fromhex(command_hex)
        uart.write(command_bytes)
        time.sleep(1)
        response = uart.read(uart.in_waiting)
        print(f"HCI Response: {response.hex()}")
    
    # === SETUP HCI TEST ===
    def test_hci_ble():
        print("Testing HCI Commands")
    
        send_hci_command("01 3d 20 00")
    
    # === MAIN EXECUTION ===
    test_hci_ble()

    BR,

    David

  • Hello David.

    Thank you for your reply.

    What I want to do is “display in the BTool log window the information I want to display... not only RSSI.”

    I think what you suggested is how to display it on the terminal where I run the Python script, not on BTool.

    Is it possible to modify the SDK sample “host_test” to display any information on BTool?

    Best regards.

  • Hello Yasukane,

    You could display other HCI return (RX) values, however you would have to trigger HCI individual commands manually from BTool every time. That is why if you want to automate this process or create a logic around it I was suggesting to use the TX dump and another script file.

    BR,

    David.

  • Hello, David.

    Thank you for your reply.

    You mentioned “you would have to trigger HCI individual commands manually from BTool every time”, is it possible to trigger HCI commands periodically in the SDK's sample software “host_test” to display the results in the BTool log window?
    (This overlaps with my previous question "Is it possible to modify the SDK sample “host_test” to display any information on BTool?".)

    Best regards.

  • Hello Yasukane,

    May I ask what is the use case so I can provide a better suggestion?

    You could trigger HCI commands from any example and then transmit them back through UART to the PC (in any application such as BTool).

    BR,

    David.

  • Hello David,

    Thank you kindly.

    Here is what I am thinking we could do.

    (1) Display RSSI value as a signed decimal number in a constant cycle

    e.g. RSSI : -54 ← Display this in 1 second cycles

    (2) Display the accumulated number of CRC errors in a fixed cycle.

    (3) Display of the time taken from sending from Central until the response is returned from the peripheral

    (If possible, I would like to display the time from sending to receiving even for “Empty Packet”)

    (4) Display the set value of the connection interval in a fixed cycle.

    Is it possible to do the above on BTool?

    Best regards.

  • Hello Yasukane,

    Thanks for the replay. I would suggest to implement this using the basic_ble SDK example (configuring both central and peripheral roles for each device). Then you can use the display module to print all of these metrics.

    I would suggest taking a look at our set of training material (SLAs): https://dev.ti.com/tirex/explore/node?node=A__AfP13Df4ApG6kvcTvGPrVg__SIMPLELINK-ACADEMY-CC23XX__gsUPh5j__LATEST

    Let me know what do you think and we can take it from there.

    BR,

    David.

  • Hello,

    Thanks for the reply.


    I understood that the display module is used to display the “basic_ble”.

    From the README of “basic_ble” and your explanation, I think you use a terminal application such as TeraTerm to display it, but is it possible to display it with BTool?

    (Another person in charge wants to use BTool and is asking this question)

    Best regards.

  • Hello Yasykane,

    I believe BTool expects a certain packet format to then parse the HCI response, so basically not being used as a normal serial terminal.

    What you could probably do if BTool is a must (which I dont fully understand yet why), is to hard-code the TX input values (simulating those coming from BTool) into the host_test_app project in some sort of while loop/ state machine.

    BR,

    David.

  • Hello David,

    I understood very well.
    Thank you for answering so many questions.

    Best regards.