Closed jaredwolff closed 11 months ago
28a3fca7da5cfb3b72f1a874b3b7fa62f713ab3d
bbae6f8419ed52acd74784ed7e876a0f24e75f8b
circuitdojo_feather_nrf9160_ns
❯ cat /etc/os-release NAME="Pop!_OS" VERSION="22.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 22.04 LTS" VERSION_ID="22.04" HOME_URL="https://pop.system76.com" SUPPORT_URL="https://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=jammy UBUNTU_CODENAME=jammy LOGO=distributor-logo-pop-os
I'm trying to use the offloaded socket/TLS through the modem firmware on the nRF9160. I get a successful connection but when the client goes to receive data the connection fails:
[00:00:07.388,732] <inf> modem: Disconnected [00:00:07.388,763] <inf> modem: LTE cell changed: Cell ID: 13379857, Tracking area: 1544 [00:00:10.768,463] <inf> modem: Network registration status: Connected - roaming [00:00:10.768,768] <inf> golioth_system: Starting connect [00:00:10.769,714] <inf> modem: Sleep PSM [00:00:15.767,028] <inf> app: Connected to Golioth! [00:00:15.767,089] <inf> app: Sending hello! 0 [00:00:15.767,700] <inf> golioth_system: Client connected! [00:00:16.067,169] <err> golioth_system: Failed to receive: -95
The error message -95 corresponds to the error code EOPNOTSUPP, which stands for "Operation not supported".
While looking into the depths of the API documentation, it looks like ZSOCK_MSG_TRUNC is not supported by nrfxlib
The Golioth client connect and receive data without issue when using offloaded sockets/TLS.
Set
CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_NET_SOCKETS_POSIX_NAMES=y
In config. Do not modify CONFIG_NET_SOCKETS_TLS_PRIORITY since we want the offloaded sockets.
CONFIG_NET_SOCKETS_TLS_PRIORITY
Set the supported cipher suite:
CONFIG_GOLIOTH_CIPHERSUITES="TLS_PSK_WITH_AES_128_CBC_SHA256"
Load PSK to the device using AT%CMNG AT command.
AT%CMNG
Then try connecting.
Removing the usage of `ZSOCK_MSG_TRUNC` allows the offloaded socket/(D)TLS connection to work.
Now connecting OK with the ZSOCK_MSG_TRUNC flag removed.
ZSOCK_MSG_TRUNC
Zephyr Commit hash
28a3fca7da5cfb3b72f1a874b3b7fa62f713ab3d
Golioth SDK Commit Hash
bbae6f8419ed52acd74784ed7e876a0f24e75f8b
Hardware Target
circuitdojo_feather_nrf9160_ns
What host OS are you using?
Current Behavior
I'm trying to use the offloaded socket/TLS through the modem firmware on the nRF9160. I get a successful connection but when the client goes to receive data the connection fails:
The error message -95 corresponds to the error code EOPNOTSUPP, which stands for "Operation not supported".
While looking into the depths of the API documentation, it looks like ZSOCK_MSG_TRUNC is not supported by nrfxlib
Expected Behavior
The Golioth client connect and receive data without issue when using offloaded sockets/TLS.
Steps To Reproduce
Set
In config. Do not modify
CONFIG_NET_SOCKETS_TLS_PRIORITY
since we want the offloaded sockets.Set the supported cipher suite:
Load PSK to the device using
AT%CMNG
AT command.Then try connecting.
Logs, console output, or any kind of debug information