SysSocket
Standard CODESYS system library — raw TCP/UDP sockets. Already part of CODESYS, nothing to install.
nXPico W’s WiFi/lwIP network stack is reachable from ST through three routes:
SysSocket
Standard CODESYS system library — raw TCP/UDP sockets. Already part of CODESYS, nothing to install.
X.509 device identity
Firmware functions — generate the device key pair and certificate, read them back. Full reference →
MQTT / MQTTS
Firmware functions — publish/subscribe client, plain TCP or TLS with client-certificate authentication. Full reference →
| nXPicoX509 | nXPicoMQTT | |
|---|---|---|
| What it gives you | Device identity: EC key pair and certificate generated on the board | MQTT client, plain TCP or TLS |
| Functions | 8 | 8 |
| nXPico | — | — |
| nXPico W | yes | yes |
| nXPico M | yes | no — the modem carries MQTT, see nXPico M › Modem |
| Needs the other one | no | for any TLS: the trust anchor is stored only if the device identity exists |
| File | precompiled | precompiled |
Both are declaration-only: the code lives in the firmware, so installing them adds nothing to your application’s memory footprint. A board whose firmware does not carry a function rejects the download with an explicit error — it never fails quietly at runtime.
The X.509 and MQTT functions are implemented in the runtime, not in IEC code: these libraries declare them for you.
nXPicoX509 / nXPicoMQTT.All firmware functions share the runtime’s error codes:
| Value | Name | Meaning |
|---|---|---|
0 | ERR_OK | done |
1 | ERR_FAILED | generic failure (usually: resource missing) |
2 | ERR_PARAMETER | invalid parameter |
3 | ERR_NOTINITIALIZED | a prerequisite is missing |
10 | ERR_PENDING | request accepted, result comes later |
11 | ERR_NUMPENDING | too many pending requests, retry |
15 | ERR_BUFFERSIZE | buffer too small, or data too large |
17 | ERR_NOMEMORY | queue full or out of memory |
10 is not an error: it means the request was taken up and the outcome must be checked with the matching status function.