Provisioning Device Certificate for AWS on Thingy91

Hi! 

I am in the process of trying to install the Asset Tracker on my Thingy91. I have got it to work with nrfCloud and I am now trying to configure it to use the AWS backend. I am having some trouble with it working and my suspicion is that it is due to me not provisioning the certificates correctly on my device.

Here is what works: 

  1. Thingy91 with nrfCloud 
  2. My nRF9160 DK with AWS (should indicate that the configuration is probably correct for the FW I am putting on the devices) 

When I try to use my Thingy91, it is unable to connect and the following error(s) are sent over the serial terminal 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
[00:00:35.701,660] <inf> event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
[00:00:35.708,770] <wrn> aws_iot: connection_poll_start failed, error: -119
[00:00:35.716,339] <err> aws_iot_integration: aws_iot_connect, error: -119
[00:00:35.723,846] <err> cloud_module: cloud_connect failed, error: -119
[00:00:35.731,201] <wrn> cloud_module: Cloud connection establishment in progress
[00:00:35.739,349] <wrn> cloud_module: New connection attempt in 64 seconds if not successful
[00:01:39.748,687] <inf> event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
[00:01:39.755,798] <wrn> aws_iot: connection_poll_start failed, error: -119
[00:01:39.763,458] <err> aws_iot_integration: aws_iot_connect, error: -119
[00:01:39.770,965] <err> cloud_module: cloud_connect failed, error: -119
[00:01:39.778,289] <wrn> cloud_module: Cloud connection establishment in progress
[00:01:39.786,407] <wrn> cloud_module: New connection attempt in 128 seconds if not successful
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I believe that the issue is in how I am configuring the certificates on my Thingy91 device. More generally I would say, I am not exactly sure of how to think of the device connections between my computer (M1 Macbook, running nRF Connect SDK v1.8 w/Visual Studio Code) and the Thingy91 device when programming it. Based on my understanding, I need to use an external debugger when I program/debug the device. Thus, I connect my DK to my computer via microUSB then connect the Thingy91 to the DK with the 2x5 debug cable. If I plug in the Thingy directly, I am unable to see it in my 'Connected Devices' Pane in VSCode and I believe this is expected behavior as the Thingy does not have a debugger built in. Thus, I follow the setup described above with the DK acting as an intermediary between my computer and the Thingy. 

Here are the main questions I have 

  1. When programming the Thingy with the setup described above, is it normal to still see the connected device recognized as nrf9160 DK in VS Code? 
  2. How would I access the UART terminal on the Thingy with the above setup? When I try to connect to VCOM0/VCOM2, it seems that it is displaying information from the module on the DK instead of the Thingy. Do I need an additional microUSB cable to talk to the Thingy directly via UART while it is getting program/debug connections through the DK?

With the above confusion, I believe I have the wrong procedure for programming the required CA certificates for AWS when following this step of the guide: 

https://nordicsemiconductor.github.io/asset-tracker-cloud-docs/v1.8.x/docs/aws/GettingStarted/DeviceCredentials.html

 node cli create-and-provision-device-cert

If I plug in the Thingy91 directly to my computer via microUSB, I get a JLink error (which I believe is expected as there is no debugger currently between my laptop and the Thingy). I did try to use a setup with the DK in the middle but I believe that process is simply updating the CA certificate on the DK rather than the Thingy. In order for it it work, I had to add the --dk option along with specifying the port the device was connected to. Again, I am not sure here which one I selected but it seems that the AT command worked correctly (based on --debug output) if I selected the port corresponding to VCOM0. I should note here that I never got a message with the IMEI of the device (which seems should be printed when looking at the source script for this device). 

Overall, I just want some clarification on the best way to program + debug + interact with my Thingy91 and flash the CA certificate for AWS. If what I described here seems correct, are there any other issues that may cause the error I saw? 

Thank you very much!