Skip to content

Commit a2a694d

Browse files
committed
rpc_wrappers: lte_at_cmd: echo provided command
Echo the provided command when the response is received. AT commands can include the `$` character for vendor specific extensions, which can cause shell substitution problems (wrap like this 'AT$CMD' to disable shell expansion). Printing the command sent makes these errors more obvious. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent d08997c commit a2a694d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/infuse_iot/rpc_wrappers/lte_at_cmd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def handle_response(self, return_code, response):
3434
response_bytes = bytes(response.rsp)
3535
if len(response_bytes):
3636
decoded = bytes(response.rsp).decode("utf-8").strip()
37+
print(f"> {self.args.cmd}")
3738
print(decoded)
3839
# Notification that command failed
3940
if return_code != 0:

0 commit comments

Comments
 (0)