Skip to content

Commit c0ded72

Browse files
committed
fix TLS shell provisioning
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
1 parent 2013d26 commit c0ded72

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/nrfcloud_utils/device_credentials_installer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import re
99
import os
1010
import sys
11+
import uuid
1112
import semver
1213
import coloredlogs, logging
1314
from nrfcloud_utils import create_device_credentials, ca_certs, modem_credentials_parser
@@ -213,6 +214,9 @@ def main(in_args):
213214
logger.error(f"cmd_type '{CMD_TYPE_TLS_SHELL}' currently requires --local_cert or --local_cert_file")
214215
sys.exit(1)
215216

217+
if args.cmd_type == CMD_TYPE_TLS_SHELL and id_len == 0:
218+
args.id_str = str(uuid.uuid4())
219+
216220
cmd_type_has_at = args.cmd_type in (CMD_TYPE_AT, CMD_TYPE_AT_SHELL, CMD_TYPE_AUTO)
217221

218222
serial_interface = Comms(
@@ -237,11 +241,11 @@ def main(in_args):
237241
cred_if.set_shell_mode(True)
238242
elif args.rtt:
239243
cred_if.write_raw('at at_cmd_mode start')
240-
241-
has_shell = cred_if.shell
244+
has_shell = cred_if.shell
242245

243246
if args.cmd_type == CMD_TYPE_TLS_SHELL:
244247
cred_if = TLSCredShellInterface(serial_interface)
248+
has_shell = True
245249

246250
# prepare modem so we can interact with security keys
247251
if (cmd_type_has_at):

0 commit comments

Comments
 (0)