Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: hello_nrf91_offloaded: document hexstring #733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

szczys
Copy link
Contributor

@szczys szczys commented Jan 22, 2025

Clarify how sending credentials to the nrf91 modem:

  • Add double quotes around PSK-ID and PSK
  • Add sample command to illustrate how to hex-encode an ASCII string

Copy link

github-actions bot commented Jan 22, 2025

Visit the preview URL for this PR (updated for commit 2f80462):

https://golioth-firmware-sdk-doxygen-dev--pr733-szczys-offload-ku5hkzll.web.app

(expires Fri, 31 Jan 2025 17:05:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

@@ -49,8 +49,16 @@ AT%CMNG=3,515765868,3
Execute following AT commands over serial to provision new credentials:

``` sh
AT%CMNG=0,515765868,4,my-psk-id
AT%CMNG=0,515765868,3,my-psk-encoded-as-hexstring
AT%CMNG=0,515765868,4,"my-psk-id"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szczys when issuing the AT commands via nrf_modem_at below should the PSK / PSK ID also be surrounded by ""?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my testing, yes they should be. Without them the modem returns ERROR. The Nordic AT command reference shows double quotes wrapping the credentials (page 45)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retested this and it does indeed work without double-quotes. I've removed them, thanks for raising the issue.

Comment on lines +56 to +57
Note: the PSK *must* be encoded as hexadecimal values. One way to
convert your ASCII-encoded PSK is to use the following Linux command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the confusion isn't so much that the PSK needs to be hex, as it is that the value displayed in the Console isn't hex.

Clarify how sending credentials to the nrf91 modem:
- Add double quotes around PSK-ID and PSK
- Add sample command to illustrate how to hex-encode an ASCII string

Signed-off-by: Mike Szczys <[email protected]>
@szczys szczys force-pushed the szczys/offload-socket-document-hexstring branch from 62cac32 to 2f80462 Compare January 24, 2025 17:04
Copy link

Code Coverage

Code Coverage

Package Line Rate Branch Rate Health
include.golioth 75% 50%
port.linux 60% 31%
port.utils 58% 46%
port.zephyr 58% 25%
src 68% 30%
Summary 66% (2715 / 4086) 30% (1123 / 3712)

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

see 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants