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-CC2640R2-SDK: SIMPLELINK-CC2640R2-SDK 2.40 - RTLS Agent Demo Not Working

Part Number: SIMPLELINK-CC2640R2-SDK
Other Parts Discussed in Thread: LAUNCHXL-CC26X2R1, LAUNCHXL-CC2640R2, CC2652R

Hello,

I have followed the README.html instructions for the rtls_agent demo included in the simplelink_cc2640r2_sdk_2_40_00_32. I am running Python3.7.2 on Windows 10 and have made sure to install the below Python modules as directed by the requirements.txt file. I have (3) LAUNCHXL-CC26X2R1 boards programmed to Passive, Master, and Slave images for the RTLS demo.

When I run the websocket_server program, either from the executable, or from Python in a Command Prompt, I see the COM ports of my nodes, select the Master and Passive ports, press ENTER to 'Continue' and then the program crashes with the below output:

(.venv) C:\ti\simplelink_cc2640r2_sdk_2_40_00_32\tools\blestack\rtls_agent>python websocket_server.py


Traceback (most recent call last):
File "websocket_server.py", line 224, in <module>
wrapper(main)
File "C:\Python37\lib\curses\__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "websocket_server.py", line 176, in main
update_node_status(scr, my_nodes)
File "websocket_server.py", line 70, in update_node_status
caps = ', '.join([str(c) for c, e in node.capabilities.items() if e])
AttributeError: 'NoneType' object has no attribute 'items'

Any guidance on getting this demo working is greatly appreciated. Thank you!

  • Hi William,

    The error reporting is unfortunately a bit bad here. This error generated when the device on the com port did not respond to the IDENTIFY command over the serial port. (it's the capabilities object that doesn't exist and has no attribute 'items')

    This could be because you didn't choose the 'Application/User' com ports, because the launchpads are not properly flashed with the correct firmware, or perhaps you were unlucky and tried to open the slave's serial port (it does not support the uNPI serial interface).

    I'd perhaps recommend trying just 1 by 1 com port to try to identify which of the devices/com ports work, if any.

    If you want to get a bit nitty gritty you could also launch the websocket_server script/exe with --debuglog as a command line argument. This will output a text file with more low level information as well.

    Best regards,
    Aslak
  • Hi Aslak,

    Thank you for your reply. I had already tried using only one node, but I had not called --debuglog to get additional info.

    I connected only the MASTER node and attempted to connect its Application/User UART COM21 port, as shown below:

    The program said "Connecting to 1 node and identifying' before crashing the same way. Below is the debuglog output which highlights line 174 of code in websocket_server.py:

    • 174 : logging.info(node.identifier)

    Summary - I ruled out (1) not selecting 'Application/User' COM ports (unless there is an issue that it's a device running in Windows 10 on my Mac using Parallels) and (2) being unlucky and trying to open the slave's serial port. So that only leaves (3) not properly flashing the launchpad with the correct firmware. On that front, I imported and built the below project:

    • C:\ti\simplelink_cc2640r2_sdk_2_40_00_32\examples\rtos\CC2640R2_LAUNCHXL\blestack\rtls_master\tirtos\ccs

    Thoughts?

    --debuglog output

    [2019-02-13 22:50:55,605] selector_events.pyln  53 MainThread    DEBUG - Using selector: SelectSelector

    [2019-02-13 22:50:55,618] serialnode.py     ln  55 COM21         DEBUG - >>> UNPIMessage(originator=Ap type=SyncReq, subsystem=25, command=RTLS_CMD_IDENTIFY, data=)

    [2019-02-13 22:50:55,618] serialnode.py     ln  56 COM21         DEBUG - >>> FE:00:00:39:00:39

    [2019-02-13 22:50:55,620] base_events.py    ln 768 ThreadPoolExecutor-0_0    DEBUG - Get address info localhost:8766, type=<SocketKind.SOCK_STREAM: 1>, flags=<AddressInfo.AI_PASSIVE: 1>

    [2019-02-13 22:50:55,630] base_events.py    ln 778 ThreadPoolExecutor-0_0    DEBUG - Getting address info localhost:8766, type=<SocketKind.SOCK_STREAM: 1>, flags=<AddressInfo.AI_PASSIVE: 1> took 0.000ms: [(<AddressFamily.AF_INET6: 23>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('::1', 8766, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('127.0.0.1', 8766))]

    [2019-02-13 22:50:55,631] base_events.py    ln 1729 Thread-1      DEBUG - poll took 0.000 ms: 1 events

    [2019-02-13 22:50:55,633] base_events.py    ln 1403 Thread-1       INFO - <Server sockets=[<socket.socket fd=728, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8766)>, <socket.socket fd=740, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::1', 8766, 0, 0)>]> is serving

    [2019-02-13 22:50:57,607] websocket_server.pyln 174 MainThread     INFO - None

  • Hi William,

    It sure looks like no response is coming up the serial port from the device. I must admit a high level of ignorance when it comes to mac+parallels+win10, but from what I've heard, serial ports are relatively problematic. Anecdotally, a colleague has ended up deleting the root usb hub in device manager and restarting the windows instance some times for serial to work.

    On the other hand, the python script should run fine on macos directly, either via the interpreter or the binary in the macos version of the sdk installer. In fact our entire toolchain is supposed to work on macos, so feel free to give it at try and don't hesitate to let us know if it doesn't.

    Best regards,
    Aslak

  • Hi Aslak,

    I installed the simplelink_cc2640r2_sdk_2_40_00_32 on MacOS using the installer from TI. I then launched both the binary and websocket_server.py from the MacOS side and got a similar error (see --debuglog below)

    At this point, it would be helpful to know that I have the right image running on my MASTER node that I am trying to use in the rtls_agent demo. I imported and built the below project:

    C:\ti\simplelink_cc2640r2_sdk_2_40_00_32\examples\rtos\CC2640R2_LAUNCHXL\blestack\rtls_master\tirtos\ccs--debuglog on MacOSX

    Then I flashed the .hex image inside this project folder using Flash Programmer 2. When I performed the flashing, I selected the option to ERASE - ALL UNPROTECTED PAGES, and not 'Pages in image'. Is it possible that I deleted an important boot sector image or other image needed for the MASTER app to run properly? In that case, I would have a MASTER app not responding on the opened XDS110 COM port.

    Thanks,
    Bill

    --debuglog output on MacOS

    [2019-02-14 09:35:32,047] selector_events.pyln 64 MainThread DEBUG - Using selector: KqueueSelector
    [2019-02-14 09:35:32,051] serialnode.py ln 55 /dev/cu.usbmodemL110057N1 DEBUG - >>> UNPIMessage(originator=Ap type=SyncReq, subsystem=25, command=RTLS_CMD_IDENTIFY, data=)
    [2019-02-14 09:35:32,051] serialnode.py ln 56 /dev/cu.usbmodemL110057N1 DEBUG - >>> FE:00:00:39:00:39
    [2019-02-14 09:35:32,061] base_events.py ln 757 ThreadPoolExecutor-0_0 DEBUG - Get address info localhost:8766, type=<SocketKind.SOCK_STREAM: 1>, flags=<AddressInfo.AI_PASSIVE: 1>
    [2019-02-14 09:35:32,072] base_events.py ln 767 ThreadPoolExecutor-0_0 DEBUG - Getting address info localhost:8766, type=<SocketKind.SOCK_STREAM: 1>, flags=<AddressInfo.AI_PASSIVE: 1> took 10.588ms: [(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::1', 8766, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8766))]
    [2019-02-14 09:35:32,072] base_events.py ln 1718 Thread-1 DEBUG - poll took 9.661 ms: 1 events
    [2019-02-14 09:35:32,073] base_events.py ln 1392 Thread-1 INFO - <Server sockets=[<socket.socket fd=15, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 8766)>, <socket.socket fd=16, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('::1', 8766, 0, 0)>]> is serving
    [2019-02-14 09:35:34,048] websocket_server.pyln 174 MainThread INFO - None
  • Hi William,

    This is very strange. You did choose the correct project, and the output should also contain the necessary pages (really just CCFG in the last page + whatever the image itself is).

    You may also flash in the .out file, or use CCS to download to the device. That said, all options should be equal in this regard.

    I've attached an .out file that I just confirmed sends a response to the IDENTIFY request. Please give it a whirl. The project itself may be slightly modified or out of date, so it's probably only good for this test.

    Best regards,
    Aslak

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/rtls_5F00_master_5F00_cc2640r2lp_5F00_app.out

  • Hi Aslak,

    I installed the 'simplelink_cc2640r2_sdk_2_40_00_32' cleanly on a PC laptop and flashed your image onto my LaunchPad, only to get the same error. At that point I stepped back and realized that our conversation may have overlooked a key detail I mentioned in my original post that may not have been emphasized enough--I am using the LAUNCHXL-CC26X2R1 and not the LAUNCHXL-CC2640R2.

    So I downloaded the latest CC2652R SDK and don't see any rtls_agent demo offered. Is there an equivalent rtls_agent for CC2652R or you think I can modify the simplelink_cc2640r2_sdk_2_40_00_32 Master/Passive/Slave projects to run on the LAUNCHXL-CC26X2R1 LaunchPads (i.e. rebuild project with .ccxml updated accordingly. I think this probably explains our gap to this point but I am still looking to get the demo working with the HW I have. Thank you.


    Best,

    Bill
  • You cannot run CC2640R2 SDK examples on LAUNCHXL-CC26X2R1.
  • Hi Bill,

    Yes that is a hurdle.

    It's as YiKai says, the projects are not compatible. The ROM content is different, some of the peripherals are different and the core processors are different. The AoA/ToF code for the radio core is not at all compatible between the devices.

    The next release of the CC26x2 SDK is slated to contain rtls projects however, releasing end of Q1 or early Q2 per the plan. In the meantime, the LAUNCHXL-CC2640R2 is your best bet.

    Best regards,
    Aslak
  • Hi Aslak,

    Understood. I ordered (3) LAUNCHXL-CC2640R2 to setup the demo as supported now until the updated CC26x2 SDK is released.

    Thank you for your support.

    Best Regards,

    Bill