ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
sigfox.h File Reference

Sigfox modem AT-command codec (PROTOCORE_ENABLE_SIGFOX) - Wisol / Murata over UART. More...

#include "protocore_config.h"

Go to the source code of this file.

Classes

struct  SigfoxNs
 Dispatch table. Addressed by offset, so the layout is asserted below. More...

Functions

 EMBED_ENUM_BYTE (protocore_sigfox_result, SIGFOX_PENDING=0, SIGFOX_OK=1, SIGFOX_ERROR=2,)
 Classification of a Sigfox modem response line.
 PROTOCORE_NS_LAYOUT (SigfoxNs, build_uplink, parse_response)
uint16_t protocore_sigfox_build_uplink (const uint8_t *work, const uint8_t *payload, uint8_t len, char *out, uint16_t cap)
 Format an AT$SF=<hex>\r\n uplink command for payload into out (a .
protocore_sigfox_result protocore_sigfox_parse_response (const uint8_t *work, const char *buf, uint16_t len)
 Classify a modem reply (scans buf for "OK" / "ERROR").

Variables

PROTOCORE_NS SigfoxNs Sigfox PROTOCORE_UNUSED
 Module namespace.

Detailed Description

Sigfox modem AT-command codec (PROTOCORE_ENABLE_SIGFOX) - Wisol / Murata over UART.

The tiny-uplink half of a Sigfox-to-web bridge. A Wisol (SFM10R) / Murata Sigfox modem is driven by AT commands over a UART: protocore_sigfox_build_uplink() formats an AT$SF=<hex> command for a payload (the Sigfox network caps a message at 12 bytes and ~140 messages per day, so uplinks are rare and small), and protocore_sigfox_parse_response() classifies the modem's reply as OK, ERROR, or still pending (nothing conclusive yet). Pure text codec - you carry the bytes over your UART - so it is fully host-testable. This is uplink-only (the common Sigfox use); a device sends readings up, it is not addressed downlink.

work is bytes the CALLER holds. This module reads none of them: it carries nothing between calls, so there is no state to keep and nothing to wipe. The parameter is there so a caller drives every namespace the same way.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file sigfox.h.

Function Documentation

◆ EMBED_ENUM_BYTE()

EMBED_ENUM_BYTE ( protocore_sigfox_result ,
SIGFOX_PENDING = 0,
SIGFOX_OK = 1,
SIGFOX_ERROR = 2 )

Classification of a Sigfox modem response line.

◆ PROTOCORE_NS_LAYOUT()

PROTOCORE_NS_LAYOUT ( SigfoxNs ,
build_uplink ,
parse_response  )

◆ protocore_sigfox_build_uplink()

uint16_t protocore_sigfox_build_uplink ( const uint8_t * work,
const uint8_t * payload,
uint8_t len,
char * out,
uint16_t cap )

Format an AT$SF=<hex>\r\n uplink command for payload into out (a .

Parameters
workPROTOCORE_SIGFOX_BORROW bytes the caller took. Not held past the call.
payloadPayload
lenLen
outOut
capCap
Returns
The uint16_t.

◆ protocore_sigfox_parse_response()

protocore_sigfox_result protocore_sigfox_parse_response ( const uint8_t * work,
const char * buf,
uint16_t len )

Classify a modem reply (scans buf for "OK" / "ERROR").

Parameters
workPROTOCORE_SIGFOX_BORROW bytes the caller took. Not held past the call.
bufBuf
lenLen
Returns
The protocore_sigfox_result.

Variable Documentation

◆ PROTOCORE_UNUSED

PROTOCORE_NS SigfoxNs Sigfox PROTOCORE_UNUSED
Initial value:
= {.build_uplink = protocore_sigfox_build_uplink,
uint16_t protocore_sigfox_build_uplink(const uint8_t *work, const uint8_t *payload, uint8_t len, char *out, uint16_t cap)
Format an AT$SF=<hex>\r\n uplink command for payload into out (a .
protocore_sigfox_result protocore_sigfox_parse_response(const uint8_t *work, const char *buf, uint16_t len)
Classify a modem reply (scans buf for "OK" / "ERROR").

Module namespace.

Definition at line 71 of file sigfox.h.