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.

[FAQ] CC1352P7: Sidewalk Sid Demo Walkthrough hints

Part Number: CC1352P7
Other Parts Discussed in Thread: CCSTUDIO, , SYSCONFIG

All, 

Let this serve as a guide for getting Amazon Sidewalk SID demo up and running on the CC1352P7-1 Launchpad.  Took me around 12 hours to get where I am comfortable building and running the demo, but if you follow this guide when you get stuck, you can probably drop that to a couple to 3 hours factoring in creating your AWS account, installing python, Boto3, FreeRTOS, SDK's etc.  There are a LOT of moving pieces to this demo.

***Important note:  A corporate VPN / Network will likely have protections in place to block Traffic from CCS to the cloud causing compile failures, hangs, slowdowns of compiling and generally cost you hours of your life.  Recommend using a hotspot or home network that doesn't have aggressive IT protections***

Bought a Gen 4 Echo

Bought a LP-CC1352P7-1

Using Win 10 64 bit

Using CCStudio (I am using 12.6.0.00008)

Downloaded several SDK's including the one used in the video of the demo:  SDK_6_41... and SDK_7_10_00xxx cited in the sidewalk page on TI and finally the current newest:  simplelink_cc13xx_cc26xx_sdk_7_10_02_23.  Recommend you start with the newest.  The big downside to the SDK_7_xx versions of the Sid_demo is they don't automatically make the aws_credentials directory or associated .yaml file.  Follow step 11 below to create them.

1) Got an AWS account here:  https://aws.amazon.com/  then made a new group, then made a new user, exported my keys to a CSV file and saved them locally in my downloads folder.

2) Got GCC on my install of CCS under Help -> Install_GCC_ARM...you may or may not have to do this depending on if you installed it initially.

3) Imported the sid_demo from C:\ti\simplelink_cc13xx_cc26xx_sdk_7_10_00_98\examples\rtos\LP_CC1352P7_1\ti_sidewalk [I used that SDK as it is the one referenced by the Sidewalk section of the TI website - but not the newest] [Blake: In retrospect, start with the newest available]

4) Found a "cookbook" locally on my machine here in the SDK:  file:///C:/ti/simplelink_cc13xx_cc26xx_sdk_7_10_00_98/docs/ti_sidewalk/html/quickstart-guide/sidewalk-quick-start.html  to use in addition to the readme in the project

5) Downloaded the correct version of FreeRTOS here:  https://github.com/FreeRTOS/FreeRTOS/releases/tag/202104.00  unzipped it in the root directory.

6) Made a directory pointer variable to FreeRTOS in CCS:   C:\FreeRTOSv202104.00 as per the instructions in the quickstart (section 3).  (note my FreeRTOS had unzipped incorrectly so I needed to move it from C:\FreeRTOSv202104.00\FreeRTOSv202104.00 to C:\FreeRTOSv202104.00)

7) Installed Python 3.12  from https://www.python.org/

8) Installed AWS command line  https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html  (allows windows CMD AWS xxxx)

9) install Boto3:  https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#configuration  (errors galore in the install BUT it seems to work...not certain I needed this step)

10) Open a windows CMD window and ran AWS config which generated config. and credentials. in a .aws directory under c:\users\myname\   I had to copy my exported Keys from my Amazon user name to create these files.  You can use the files below to manually make them or check what you have.

11) Noted aws_credentials.yaml and its directory was never generated as was promised in one of the guides (but is made automatically using obsolete SDK_6_xxx).  Manually made it for my SDK_7_xxx derived demos (and a project directory of the same name) from some examples in the e2e forum posts.

12) Made sure my sysconfig / sidewalk looked like this:

13) Error after Error flagged in the Makefile.  .hex never generated correctly.  I tried making infinite changes in variables in the config / credential / aws_credentials.yaml and the sysconfig sidewalk file. Errors just moved around but never went away.  Clearly there were issues with the Amazon python based tools parsing / finding the files and data.  [Blake:  Actually - it is likely that my corporate VPN was interfering with the makefile calling the amazon scripts and their communication with AWS services (I think).  Using my home network or my hotspot cured the compile issues]

14) 8 hours later - in desperation - switched to SDK 7_10_02_23 (which was the newest at the current time and not the one referenced in the sidewalk section of TI's website).  It behaved differently than 7_10_0_98.   [Blake:  It turns out I think this was due to my VPN blocking connection of Amazon scripts]

15) Thinking erroneously the SDK_7_xxx demos were broken - I went to the marketing video - Zoomed into the text and noticed that it was done with SDK 6_41_00_07.  Found this SDK here in a page that maintains old versions:  https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK  [Blake:  While this ultimately worked - however it should not be necessary with a clean internet connection]

16) Pulled in the same project from the Version 6_41 SDK into a new Workspace, changed the Freertos variable as noted above.  Noted the aws_credentials.yaml file and directory were created which had not happened with the newer SDKs!  Ahha!  Upon build - the project seemed to compile better but with 1 make file issue.  By better I mean the Amazon python files seemed to be communicating with the AWS mothership which I could see by the console echos.  Built a second time and it worked and the AWS file launched in my browser and I was greeted by the user/password query window.  I never had to change my proxy settings which is fortunate because I suspect this would have inserted significant unknowns as it is poorly documented why or how to make these changes. [Blake:  However this success was likely that I moved from my office to my house where my home network allowed a more open internet connection]

17) So I was able get the terminal connected:  Teraterm, 921600, 8,1,n,n.  Note I found my comm port in Windows Control Panel -> Device Manager -> Ports:

 ...continued below due to size constraint per post

  • Hi Blake,

    Let me try out again with the 7.10.02.23 today, and I will send the step by step guide if something differs now.

    The 6.41 SDK was indeed a spin of the 6.40 SDK that included Sidewalk, and is not a good starting point today.

    Regards,

    Arthur

  • Hi Blake,

    On 7.10.02.23, tt mostly worked out of the box (bare some proxy issues), except when it came to set up the aws_credentials.yaml as you have noticed.

    The strange thing is that the file itself is present under C:\ti\simplelink_cc13xx_cc26xx_sdk_7_10_02_23\source\ti\ti_sidewalk\apps\ti\common\aws_config

    so I will file a bug on that behavior.

    But in the end, all I had to do was click the "Debug" button to get the whole thing running.

    Regards,

    Arthur

  • 17b) apparently my post was getting too big...continuing - here is what the Teraterm serial console looks like when working.  It throws red errors when your board can't connect:

    A common error is it only gets loaded with the Sidewalk file but not the credentials file

    18) Getting ahead of myself, when the console looks like this, things are working.  Note the automatic link it should open in your browser.  You can cut and paste it if not:

    19) I had to manually load the integrated file (Sidewalk code + Credentials) to the board.  You do this by "run" (1)  and then "load" (2) then "select..." (3) to point to the file sid_demo_LP_CC1352P7_1_freertos_gcc_merged.hex and load it.  Note you need to reload this (do this step) any time you make a change to the program and recompile.

    19) Hopefully the AWS program opens in your browser automatically (sometimes it hangs).  I have had it hang for many minutes and appear dead - and then the program will ask for the user and password you entered into the Sysconfig and magically start working!  If it doesn't open automatically, you should be able to manually launch the page it by cutting and pasting the link from your built ti_sidewalk_config.yaml in the debug -> syscfg directory.  If there is no link there and it says 'null' it hasn't built correctly.

    20) Note from my TI network nothing worked.  There is a note about configuring proxy's but I elected to use my hotspot on my phone instead.  If it hangs here - likely the network is blocking connection and you need a less protected network:

    This worked.

    21) Here is what happens when you connect.  Note you can turn on/off leds, breath on the lower part of the launchpad (looking like an idiot) and the temp changes, or push BTN1 or BTN2 and the Engaged / Disengaged button will change color.  Note after loading the launchpad with the correct program, you can then power it from a wall transformer and disconnect it from your PC (of course losing the serial port).

    22) If you can't connect through sidewalk, make sure you reset your board (button by the USB connector) and give it ~60 seconds to connect.  Make sure your Alexa is connected "Alexa, are you connected".  Make sure your LP-CC1352 is talking frequently on the serial connection and not giving just a few red error messages.

    Look for the app to say "online":

    when you have your Sysconfig set like this:  

    the App shows FSK:

    Note - a cute trick is to change your sysconfig web user password and login  when you make a change as this will make sure your program is actually changing correctly as it will throw a new request for password and user name.  You will have to do the Step 19 above every time you make a program change.

    23) if you have sysconfig set like this:

    You will see BLE in your app.

  • HI Arthur,

    With my prior knowledge under my belt, I set out to use the 7_10_xx SDK to backup your results.

    Quick summary:

    1. Made a new workspace to not screw up my working SDK_6_41_00_17 based project
    2. Imported the Sid_Demo from SDK_7_10_02_23
    3. Made an aws_credential directory, copied aws_credentials.yaml from the SDK_6_41 working project
    4. Made the FREERTOS_INSTALL_DIR variable
    5. Build (no errrors! & It opened the browser to the application)
    6. Loaded the merged .hex file
    7. Hit reset on the board
    8. Amazon Echo and PC were connected to my phone wifi network
    9. Connected however I have a leftover application yielding some odd results visually but acceptable: 

    1. Why did I think SDK 7 based projects failing before?  Likely my TI network was causing connection issues.    
    2. Can you help me with "delete_stack".  Its syntax is coughing on my config and credentials files.  I assume the best way to do it is to copy them into my .aws directly with those other 2 files, but it keeps coughing on every combination that I run from a command window.  Also I can't find how to delete them online (that was a mentioned alternate method).

    Thanks for your help! 

  • Hi Blake,

    1. I had some issues with the proxy too. In CCS, you have to add it under here:

    2. You can delete the whole stack by running delete_stack, under that folder:

     C:\ti\simplelink_cc13xx_cc26xx_sdk_7_10_02_23\tools\sidewalk\web_app\bin

     the syntax is:

    delete_stack -c “PATH TO PROJECT”/sid_demo_LP_CC1352P7_1_freertos_gcc\Debug\syscfg\ti_sidewalk_config.yaml --credentials “PATH TO PROJECT”/sid_demo_LP_CC1352P7_1_freertos_gcc\aws_credentials\aws_credentials.yaml

     Regards,

    Arthur

  • Arthur and Blake, thanks for the great discussion and ideas about how we can improve our Sidewalk demo.

  • Hi Arthur, 

    This worked great!  I did of course have to use my "home" network as the TI network blocked it.

    For those engineers looking at what I did here is the minutia:

    The problem was that every time you build a new version of the program (I think based on new project import) it builds a new instance of the program and you get multiple windows of the GUI on the web only one of which works, so you need to have a way to clear out the old ones.  I followed Arthurs advice above for the delete_stack command buried in the SDK.

    First I opened a CMD window.  Then did a CD command to get to the .aws directory where I had my config and credentials files AND where I had copied the delete_stack command that is found in the SDK tools\sidewalk\web_app\bin directory (Arthur has the actual link above).  I then ran the command below:

    Note my workspace location is c:\user\a0272860\sww\

    Good luck to all!

    Blake