40#define MM_PACKED __attribute__((packed))
342 char country_code[3];
528struct mmagic_controller;
555#define MMAGIC_CONTROLLER_ARGS_INIT { 0 }
585#define CONTROL_STREAM 0
588#define MMAGIC_CONTROLLER_DEFAULT_RESPONSE_TIMEOUT_MS 1000
606 uint8_t submodule_id,
608 uint8_t subcommand_id,
609 const uint8_t *buffer,
610 size_t buffer_length);
630 uint8_t submodule_id,
632 uint8_t subcommand_id,
634 size_t buffer_length,
635 uint32_t timeout_ms);
649 uint32_t timeout_ms);
1099 struct mmagic_controller *controller,
1136 struct mmagic_controller *controller,
1173 struct mmagic_controller *controller,
1210 struct mmagic_controller *controller,
1215 var_val.
len = strlen(var);
1216 if (var_val.
len >
sizeof(var_val.
data) - 1)
1220 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
1221 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
1227 (uint8_t *)&var_val,
1255 struct mmagic_controller *controller,
1292 struct mmagic_controller *controller,
1297 var_val.
len = strlen(var);
1298 if (var_val.
len >
sizeof(var_val.
data) - 1)
1302 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
1303 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
1309 (uint8_t *)&var_val,
1337 struct mmagic_controller *controller,
1374 struct mmagic_controller *controller,
1411 struct mmagic_controller *controller,
1448 struct mmagic_controller *controller,
1485 struct mmagic_controller *controller,
1522 struct mmagic_controller *controller,
1559 struct mmagic_controller *controller,
1596 struct mmagic_controller *controller,
1633 struct mmagic_controller *controller,
1670 struct mmagic_controller *controller,
1707 struct mmagic_controller *controller,
1744 struct mmagic_controller *controller,
1781 struct mmagic_controller *controller,
1818 struct mmagic_controller *controller,
1855 struct mmagic_controller *controller,
1892 struct mmagic_controller *controller,
1929 struct mmagic_controller *controller,
1966 struct mmagic_controller *controller,
2003 struct mmagic_controller *controller,
2040 struct mmagic_controller *controller,
2078 struct mmagic_controller *controller,
2116 struct mmagic_controller *controller,
2153 struct mmagic_controller *controller,
2190 struct mmagic_controller *controller,
2231 struct mmagic_controller *controller,
2272 struct mmagic_controller *controller,
2312 struct mmagic_controller *controller,
2352 struct mmagic_controller *controller,
2390 struct mmagic_controller *controller,
2428 struct mmagic_controller *controller,
2467 struct mmagic_controller *controller,
2506 struct mmagic_controller *controller,
2545 struct mmagic_controller *controller,
2584 struct mmagic_controller *controller,
2625 struct mmagic_controller *controller,
2666 struct mmagic_controller *controller,
2671 var_val.
len = strlen(var);
2672 if (var_val.
len >
sizeof(var_val.
data) - 1)
2676 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2677 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2683 (uint8_t *)&var_val,
2715 struct mmagic_controller *controller,
2756 struct mmagic_controller *controller,
2761 var_val.
len = strlen(var);
2762 if (var_val.
len >
sizeof(var_val.
data) - 1)
2766 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2767 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2773 (uint8_t *)&var_val,
2805 struct mmagic_controller *controller,
2846 struct mmagic_controller *controller,
2851 var_val.
len = strlen(var);
2852 if (var_val.
len >
sizeof(var_val.
data) - 1)
2856 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2857 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2863 (uint8_t *)&var_val,
2895 struct mmagic_controller *controller,
2936 struct mmagic_controller *controller,
2941 var_val.
len = strlen(var);
2942 if (var_val.
len >
sizeof(var_val.
data) - 1)
2946 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2947 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2953 (uint8_t *)&var_val,
2984 struct mmagic_controller *controller,
3024 struct mmagic_controller *controller,
3062 struct mmagic_controller *controller,
3100 struct mmagic_controller *controller,
3139 struct mmagic_controller *controller,
3178 struct mmagic_controller *controller,
3212 struct mmagic_controller *controller)
3256 struct mmagic_controller *controller,
3264 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
3266 response_timeout_ms += cmd_args->
timeout;
3270 response_timeout_ms = UINT32_MAX;
3278 (uint8_t *)cmd_args,
3291 response_timeout_ms);
3303 struct mmagic_controller *controller)
3327 response_timeout_ms);
3360 struct mmagic_controller *controller,
3369 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
3371 response_timeout_ms += cmd_args->
timeout;
3375 response_timeout_ms = UINT32_MAX;
3383 (uint8_t *)cmd_args,
3394 (uint8_t *)rsp_args,
3396 response_timeout_ms);
3418 struct mmagic_controller *controller,
3441 (uint8_t *)rsp_args,
3443 response_timeout_ms);
3465 struct mmagic_controller *controller,
3488 (uint8_t *)rsp_args,
3490 response_timeout_ms);
3510 struct mmagic_controller *controller,
3522 (uint8_t *)cmd_args,
3535 response_timeout_ms);
3556 struct mmagic_controller *controller,
3568 (uint8_t *)cmd_args,
3581 response_timeout_ms);
3593 struct mmagic_controller *controller)
3617 response_timeout_ms);
3631 struct mmagic_controller *controller)
3655 response_timeout_ms);
3670 struct mmagic_controller *controller)
3694 response_timeout_ms);
3717 struct mmagic_controller *controller,
3729 (uint8_t *)cmd_args,
3742 response_timeout_ms);
3768 struct mmagic_controller *controller,
3780 (uint8_t *)cmd_args,
3793 response_timeout_ms);
3832 struct mmagic_controller *controller,
3844 (uint8_t *)cmd_args,
3857 response_timeout_ms);
3879 struct mmagic_controller *controller,
3902 (uint8_t *)rsp_args,
3904 response_timeout_ms);
3951 struct mmagic_controller *controller,
3995 struct mmagic_controller *controller,
4038 struct mmagic_controller *controller,
4066 struct mmagic_controller *controller,
4104 struct mmagic_controller *controller,
4142 struct mmagic_controller *controller,
4180 struct mmagic_controller *controller,
4218 struct mmagic_controller *controller,
4256 struct mmagic_controller *controller,
4295 struct mmagic_controller *controller,
4334 struct mmagic_controller *controller,
4373 struct mmagic_controller *controller,
4412 struct mmagic_controller *controller,
4451 struct mmagic_controller *controller,
4490 struct mmagic_controller *controller,
4529 struct mmagic_controller *controller,
4568 struct mmagic_controller *controller,
4606 struct mmagic_controller *controller,
4644 struct mmagic_controller *controller,
4682 struct mmagic_controller *controller,
4720 struct mmagic_controller *controller,
4758 struct mmagic_controller *controller,
4796 struct mmagic_controller *controller,
4830 struct mmagic_controller *controller)
4875 struct mmagic_controller *controller,
4893 (uint8_t *)rsp_args,
4895 response_timeout_ms);
4925 response_timeout_ms);
4952 struct mmagic_controller *controller,
4964 (uint8_t *)cmd_args,
4977 response_timeout_ms);
4989 struct mmagic_controller *controller)
5013 response_timeout_ms);
5046 struct mmagic_controller *controller,
5058 (uint8_t *)cmd_args,
5071 response_timeout_ms);
5083 struct mmagic_controller *controller)
5107 response_timeout_ms);
5151 struct mmagic_controller *controller,
5178 struct mmagic_controller *controller,
5215 struct mmagic_controller *controller,
5252 struct mmagic_controller *controller,
5289 struct mmagic_controller *controller,
5327 struct mmagic_controller *controller,
5365 struct mmagic_controller *controller,
5399 struct mmagic_controller *controller)
5444 struct mmagic_controller *controller,
5462 (uint8_t *)rsp_args,
5464 response_timeout_ms);
5492 struct mmagic_controller *controller,
5530 struct mmagic_controller *controller,
5567 struct mmagic_controller *controller,
5604 struct mmagic_controller *controller,
5642 struct mmagic_controller *controller,
5680 struct mmagic_controller *controller,
5719 struct mmagic_controller *controller,
5758 struct mmagic_controller *controller,
5792 struct mmagic_controller *controller)
5837 struct mmagic_controller *controller,
5855 (uint8_t *)rsp_args,
5857 response_timeout_ms);
5900 struct mmagic_controller *controller,
5912 (uint8_t *)cmd_args,
5925 response_timeout_ms);
5947 struct mmagic_controller *controller,
5970 (uint8_t *)rsp_args,
5972 response_timeout_ms);
6013 struct mmagic_controller *controller,
6019 uint32_t response_timeout_ms = 15000;
6026 (uint8_t *)cmd_args,
6037 (uint8_t *)rsp_args,
6039 response_timeout_ms);
6069 struct mmagic_controller *controller,
6082 (uint8_t *)cmd_args,
6093 (uint8_t *)rsp_args,
6095 response_timeout_ms);
6129 struct mmagic_controller *controller,
6134 const uint8_t stream_id = cmd_args->
stream_id;
6138 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
6140 response_timeout_ms += cmd_args->
timeout;
6144 response_timeout_ms = UINT32_MAX;
6152 (uint8_t *)cmd_args,
6163 (uint8_t *)rsp_args,
6165 response_timeout_ms);
6187 struct mmagic_controller *controller,
6191 const uint8_t stream_id = cmd_args->
stream_id;
6199 (uint8_t *)cmd_args,
6212 response_timeout_ms);
6234 struct mmagic_controller *controller,
6238 const uint8_t stream_id = cmd_args->
stream_id;
6242 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
6244 response_timeout_ms += cmd_args->
timeout;
6248 response_timeout_ms = UINT32_MAX;
6256 (uint8_t *)cmd_args,
6269 response_timeout_ms);
6291 struct mmagic_controller *controller,
6295 const uint8_t stream_id = cmd_args->
stream_id;
6299 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
6301 response_timeout_ms += cmd_args->
timeout;
6305 response_timeout_ms = UINT32_MAX;
6313 (uint8_t *)cmd_args,
6326 response_timeout_ms);
6356 struct mmagic_controller *controller,
6361 const uint8_t stream_id = cmd_args->
stream_id;
6362 uint32_t response_timeout_ms = -1;
6369 (uint8_t *)cmd_args,
6380 (uint8_t *)rsp_args,
6382 response_timeout_ms);
6402 struct mmagic_controller *controller,
6414 (uint8_t *)cmd_args,
6427 response_timeout_ms);
6450 struct mmagic_controller *controller,
6462 (uint8_t *)cmd_args,
6475 response_timeout_ms);
6545 struct mmagic_controller *controller,
6583 struct mmagic_controller *controller,
6621 struct mmagic_controller *controller,
6659 struct mmagic_controller *controller,
6696 struct mmagic_controller *controller,
6733 struct mmagic_controller *controller,
6767 struct mmagic_controller *controller)
6817 struct mmagic_controller *controller,
6854 struct mmagic_controller *controller,
6859 var_val.
len = strlen(var);
6860 if (var_val.
len >
sizeof(var_val.
data) - 1)
6864 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
6865 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
6871 (uint8_t *)&var_val,
6896 struct mmagic_controller *controller)
6949 response_timeout_ms);
6971 struct mmagic_controller *controller,
6994 (uint8_t *)rsp_args,
6996 response_timeout_ms);
7043 struct mmagic_controller *controller,
7056 (uint8_t *)cmd_args,
7067 (uint8_t *)rsp_args,
7069 response_timeout_ms);
7095 struct mmagic_controller *controller,
7107 (uint8_t *)cmd_args,
7120 response_timeout_ms);
7144 struct mmagic_controller *controller,
7156 (uint8_t *)cmd_args,
7169 response_timeout_ms);
7189 struct mmagic_controller *controller,
7201 (uint8_t *)cmd_args,
7214 response_timeout_ms);
7261 struct mmagic_controller *controller,
7306 struct mmagic_controller *controller,
struct mmwlan_beacon_vendor_ie_filter filter
Filter structure used when calling mmwlan_update_beacon_vendor_ie_filter().
mmagic_ip_link_state
Status of the IP link.
mmagic_iperf_state
Current state of iperf session.
mmagic_station_type
Enumeration of S1G non-AP STA types.
mmagic_sta_event
Station connection events.
mmagic_deep_sleep_mode
Deep sleep modes for the agent MCU.
mmagic_sta_state
Station states.
mmagic_duty_cycle_mode
Enumeration of duty cycle modes.
mmagic_standby_mode_exit_reason
Reasons for exiting standby mode.
mmagic_power_save_mode
Enumeration of supported 802.11 power save modes.
mmagic_security_type
Connection security type.
mmagic_mcs10_mode
Enumeration of MCS10 modes.
mmagic_status
Enumeration of return status codes.
mmagic_iperf_mode
Mode to use when running the iperf.
mmagic_subsystem
Subsytem IDs.
mmagic_pmf_mode
Protected management frame mode.
@ MMAGIC_IP_LINK_STATE_DOWN
Link is down because the interface is down or DHCP has not yet completed.
@ MMAGIC_IP_LINK_STATE_UP
Link is up.
@ MMAGIC_IPERF_STATE_RUNNING
Iperf session is in progress.
@ MMAGIC_IPERF_STATE_NOT_STARTED
Iperf session not started.
@ MMAGIC_IPERF_STATE_FINISHED
Iperf session has completed.
@ MMAGIC_IPERF_STATE_ABORTED
Iperf session has been aborted.
@ MMAGIC_STATION_TYPE_NON_SENSOR
Non-Sensor type.
@ MMAGIC_STATION_TYPE_SENSOR
Sensor type.
@ MMAGIC_STA_EVENT_SCAN_COMPLETE
The STA has finished a scan.
@ MMAGIC_STA_EVENT_CTRL_PORT_OPEN
The Supplicant IEEE 802.1X Controlled Port is now open.
@ MMAGIC_STA_EVENT_SCAN_ABORT
The STA has aborted a scan early.
@ MMAGIC_STA_EVENT_AUTH_REQUEST
The STA is sending an authentication request to the AP.
@ MMAGIC_STA_EVENT_SCAN_REQUEST
The STA is starting a scan.
@ MMAGIC_STA_EVENT_ASSOC_REQUEST
The STA is sending an association request to the AP.
@ MMAGIC_STA_EVENT_CTRL_PORT_CLOSED
The Supplicant IEEE 802.1X Controlled Port is now closed.
@ MMAGIC_STA_EVENT_DEAUTH_TX
The STA is sending an de-authorization request to the AP.
@ MMAGIC_DEEP_SLEEP_MODE_HARDWARE
The datalink layer is responsible for waking the agent.
@ MMAGIC_DEEP_SLEEP_MODE_ONE_SHOT
Deep sleep is enabled until activity occurs on the datalink.
@ MMAGIC_DEEP_SLEEP_MODE_DISABLED
Deep sleep is disabled.
@ MMAGIC_STA_STATE_CONNECTING
Connecting to the AP.
@ MMAGIC_STA_STATE_DISCONNECTED
Disconnected from the AP.
@ MMAGIC_STA_STATE_CONNECTED
Connected to the AP.
@ MMAGIC_DUTY_CYCLE_MODE_SPREAD
Duty cycle air time is evenly spread.
@ MMAGIC_DUTY_CYCLE_MODE_BURST
Duty cycle air time available in burst.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_EXT_INPUT
We were woken up by an external input trigger.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_TCP_CONNECTION_LOST
An open TCP connection was lost.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_ASSOCIATE
We just reassociated with the AP.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_HW_SCAN_FAILED_TO_START
Hardware scan failed to start.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_WAKEUP_FRAME
We were woken up by a wakeup frame.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_WHITELIST_PKT
We received a packet from a whitelist source.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_NONE
Standby mode was exited manually through a call to standby_exit.
@ MMAGIC_STANDBY_MODE_EXIT_REASON_STANDBY_EXIT_HW_SCAN_NOT_ENABLED
Hardware scan was not enabled.
@ MMAGIC_POWER_SAVE_MODE_ENABLED
Power save enabled.
@ MMAGIC_POWER_SAVE_MODE_DISABLED
Power save disabled.
@ MMAGIC_SECURITY_TYPE_OPEN
No security enabled at all.
@ MMAGIC_SECURITY_TYPE_SAE
Simultaneous Authentication of Equals (password-based authentication).
@ MMAGIC_SECURITY_TYPE_OWE
Opportunistic Wireless Encryption (encrypted, passwordless).
@ MMAGIC_MCS10_MODE_AUTO
MCS10 is used on retries instead of MCS0 when the bandwidth is 1 MHz.
@ MMAGIC_MCS10_MODE_FORCED
MCS10 is always used instead of MCS0 when the bandwidth is 1 MHz.
@ MMAGIC_MCS10_MODE_DISABLED
MCS10 is not used.
@ MMAGIC_STATUS_CHANNEL_LIST_NOT_SET
WLAN operation failed because the channel list has not been set.
@ MMAGIC_STATUS_NOT_FOUND
Specified operation was not found.
@ MMAGIC_STATUS_MQTT_KEEPALIVE_TIMEOUT
Timed out while waiting for PINGRESP.
@ MMAGIC_STATUS_OK
Operation was successful.
@ MMAGIC_STATUS_SOCKET_LISTEN_FAILED
Socket listen failed.
@ MMAGIC_STATUS_TIMEOUT
The operation timed out.
@ MMAGIC_STATUS_SOCKET_BIND_FAILED
Socket bind failed.
@ MMAGIC_STATUS_NO_LINK
Operation failed because the link was not up.
@ MMAGIC_STATUS_TIME_NOT_SYNCHRONIZED
Internal time has not been synchronized.
@ MMAGIC_STATUS_NOT_INITIALIZED
Operation failed because the MMWLAN subsystem was not initialized.
@ MMAGIC_STATUS_AUTHENTICATION_FAILED
Credentials provided by the server were not valid.
@ MMAGIC_STATUS_MISSING_CREDENTIALS
Missing certificate or key to open TLS connection.
@ MMAGIC_STATUS_CHANNEL_INVALID
Attempted to tune to a channel that was not available.
@ MMAGIC_STATUS_ERROR
The operation failed with an unspecified error.
@ MMAGIC_STATUS_NTP_KOD_RECEIVED
NTP server returned Kiss-o'-Death.
@ MMAGIC_STATUS_NOT_SUPPORTED
Specified operation is not supported.
@ MMAGIC_STATUS_UNKNOWN_HOST
Failed to get an IP address for the given hostname.
@ MMAGIC_STATUS_TX_ERROR
An error occured during transmission.
@ MMAGIC_STATUS_SOCKET_SEND_FAILED
Socket send failed.
@ MMAGIC_STATUS_INVALID_STREAM
An invalid stream was specified.
@ MMAGIC_STATUS_CLOSED
Failed due to stream being closed from the other side.
@ MMAGIC_STATUS_UNAVAILABLE
Functionality is temporarily unavailable.
@ MMAGIC_STATUS_MQTT_REFUSED
The server refused a CONNECT or SUBSCRIBE.
@ MMAGIC_STATUS_SOCKET_CONNECT_FAILED
Socket connection failed.
@ MMAGIC_STATUS_NOT_RUNNING
Operation failed because the WLAN device was not booted.
@ MMAGIC_STATUS_NO_MEM
Failed due to memory allocation failure.
@ MMAGIC_STATUS_HANDSHAKE_FAILED
Error during TLS handshake.
@ MMAGIC_STATUS_NTP_KOD_BACKOFF_RECEIVED
NTP server returned Kiss-o'-Death with rate code.
@ MMAGIC_STATUS_SOCKET_FAILED
Failed to open the socket.
@ MMAGIC_STATUS_INVALID_CREDENTIALS
Credentials provided were invalid.
@ MMAGIC_STATUS_SHUTDOWN_BLOCKED
WLAN shutdown failed.
@ MMAGIC_STATUS_INVALID_ARG
The operation failed due to an invalid argument.
@ MMAGIC_STATUS_BAD_VERSION
Operation failed due to a version mismatch.
@ MMAGIC_IPERF_MODE_TCP_CLIENT
Iperf TCP client (TX).
@ MMAGIC_IPERF_MODE_UDP_CLIENT
Iperf UDP client (TX).
@ MMAGIC_IPERF_MODE_TCP_SERVER
Iperf TCP server (RX).
@ MMAGIC_IPERF_MODE_UDP_SERVER
Iperf UDP server (RX).
@ MMAGIC_TLS
Subsystem ID for Module tls: TLS support..
@ MMAGIC_WLAN
Subsystem ID for Module wlan: Wireless LAN management..
@ MMAGIC_IP
Subsystem ID for Module ip: IP Stack Management.
@ MMAGIC_IPERF
Subsystem ID for Module iperf: Iperf application..
@ MMAGIC_SYS
Subsystem ID for Module sys: System management..
@ MMAGIC_TCP
Subsystem ID for Module tcp: TCP Socket IO, supports secure connections using TLS....
@ MMAGIC_PING
Subsystem ID for Module ping: Ping application..
@ MMAGIC_NTP
Subsystem ID for Module ntp: Network Time Protocol..
@ MMAGIC_MQTT
Subsystem ID for Module mqtt: MQTT agent..
@ MMAGIC_PMF_MODE_DISABLED
No protected management frames.
@ MMAGIC_PMF_MODE_REQUIRED
Protected management frames must be used.
struct mmagic_controller * mmagic_controller_init(const struct mmagic_controller_init_args *args)
Initialize the Controller.
void mmagic_controller_deinit(struct mmagic_controller *controller)
Deinitialize the Controller.
void(* mmagic_controller_agent_start_cb_t)(struct mmagic_controller *controller, void *arg)
Prototype for callback function invoked whenever any time a event that the agent has started is recei...
#define CONTROL_STREAM
The stream ID of the control stream.
enum mmagic_status mmagic_controller_rx(struct mmagic_controller *controller, uint8_t stream_id, uint8_t submodule_id, uint8_t command_id, uint8_t subcommand_id, uint8_t *buffer, size_t buffer_length, uint32_t timeout_ms)
Waits for a response from the agent.
mmagic_mqtt_cmd
mqtt configuration command IDs
mmagic_ip_var
ip configuration variable IDs
mmagic_ping_cmd
ping configuration command IDs
mmagic_tcp_cmd
tcp configuration command IDs
mmagic_wlan_var
wlan configuration variable IDs
mmagic_iperf_cmd
iperf configuration command IDs
mmagic_ntp_cmd
ntp configuration command IDs
mmagic_ping_var
ping configuration variable IDs
mmagic_iperf_var
iperf configuration variable IDs
mmagic_wlan_cmd
wlan configuration command IDs
enum mmagic_status mmagic_controller_agent_sync(struct mmagic_controller *controller, uint32_t timeout_ms)
Sends a sync request to the agent and waits for a sync response.
mmagic_tls_var
tls configuration variable IDs
enum mmagic_status mmagic_controller_request_agent_reset(struct mmagic_controller *controller)
Sends a reset request to the agent.
mmagic_ntp_var
ntp configuration variable IDs
enum mmagic_status mmagic_controller_tx(struct mmagic_controller *controller, uint8_t stream_id, uint8_t submodule_id, uint8_t command_id, uint8_t subcommand_id, const uint8_t *buffer, size_t buffer_length)
Sends a command to the agent.
mmagic_sys_cmd
sys configuration command IDs
#define MMAGIC_CONTROLLER_DEFAULT_RESPONSE_TIMEOUT_MS
The default timeout when waiting for a response from a command sent to the agent in ms.
mmagic_tls_cmd
tls configuration command IDs
mmagic_ip_cmd
ip configuration command IDs
@ MMAGIC_MQTT_CMD_PUBLISH
Publishes a message on a topic.
@ MMAGIC_MQTT_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_MQTT_CMD_START_AGENT
Starts the MQTT agent.
@ MMAGIC_MQTT_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_MQTT_CMD_LOAD
Reserved (unused)
@ MMAGIC_MQTT_CMD_SUBSCRIBE
Subscribes to a topic.
@ MMAGIC_MQTT_CMD_STOP_AGENT
Stops the MQTT agent.
@ MMAGIC_MQTT_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_IP_VAR_NETMASK
Netmask to use for a static network connection.
@ MMAGIC_IP_VAR_DNS_SERVER0
Primary DNS server IP address.
@ MMAGIC_IP_VAR_OFFLOAD_ARP_REFRESH_S
If non zero, enables ARP refresh offload with the specified interval in seconds.
@ MMAGIC_IP_VAR_DHCP_OFFLOAD
If true, enables DHCP offload which allows the Morse chip to directly handle DHCP discovery and lease...
@ MMAGIC_IP_VAR_OFFLOAD_ARP_RESPONSE
If true, enables ARP response offload which allows the Morse chip to directly respond to ARP requests...
@ MMAGIC_IP_VAR_IP_ADDR
IP address to use for a static network connection.
@ MMAGIC_IP_VAR_GATEWAY
Gateway to use for a static network connection.
@ MMAGIC_IP_VAR_DHCP_ENABLED
True to enable DHCP for IP address configuration, or false to use the static configuration given by i...
@ MMAGIC_IP_VAR_LINK_STATUS_EVT_EN
When set to true, IP link status notifications will be provided.
@ MMAGIC_IP_VAR_DNS_SERVER1
Secondary DNS server IP address.
@ MMAGIC_PING_CMD_RUN
Commences a ping session using the current values in the the subsystem config.
@ MMAGIC_PING_CMD_LOAD
Reserved (unused)
@ MMAGIC_PING_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_PING_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_PING_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_TCP_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_TCP_CMD_ACCEPT
Waits for an incoming socket connection and returns a new stream ID.
@ MMAGIC_TCP_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_TCP_CMD_LOAD
Reserved (unused)
@ MMAGIC_TCP_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_TCP_CMD_WRITE_POLL
Polls the socket till it is ready for writing.
@ MMAGIC_TCP_CMD_SET_RX_READY_EVT_ENABLED
Sets whether the RX ready event should be enabled for the given socket.
@ MMAGIC_TCP_CMD_READ_POLL
Polls the socket till it is ready for reading.
@ MMAGIC_TCP_CMD_BIND
Opens a server TCP socket and returns its stream ID.
@ MMAGIC_TCP_CMD_SEND
Writes to a socket.
@ MMAGIC_TCP_CMD_CONNECT
Opens a client TCP socket and returns its stream ID.
@ MMAGIC_TCP_CMD_CLOSE
Closes and frees the socket.
@ MMAGIC_TCP_CMD_RECV
Reads from a socket.
@ MMAGIC_WLAN_VAR_BSSID
BSSID of the ap to associate to, all 0x00 for any.
@ MMAGIC_WLAN_VAR_QOS_2_PARAMS
The default QoS queue configuration for Access Category 2 (AC_VI) that is active while the station is...
@ MMAGIC_WLAN_VAR_COUNTRY_CODE
Two character country code used to identify the regulatory domain.
@ MMAGIC_WLAN_VAR_SECURITY
Security type to used when associating.
@ MMAGIC_WLAN_VAR_PASSWORD
Password used when associating, 1-100 characters long.
@ MMAGIC_WLAN_VAR_QOS_1_PARAMS
The default QoS queue configuration for Access Category 1 (AC_BK) that is active while the station is...
@ MMAGIC_WLAN_VAR_PMF_MODE
Protected Management Frame mode to use (802.11w).
@ MMAGIC_WLAN_VAR_MAX_HEALTH_CHECK_INTVL_MS
The maximum interval to wait after the last health check before triggering another.
@ MMAGIC_WLAN_VAR_SGI_ENABLED
Boolean value indicating whether SGI support should be enabled.
@ MMAGIC_WLAN_VAR_SUBBANDS_ENABLED
Boolean value indicating whether sub-band support should be enabled.
@ MMAGIC_WLAN_VAR_RAW_PRIORITY
Priority to request if raw is supported by the AP.
@ MMAGIC_WLAN_VAR_STATION_TYPE
S1G non-AP STA type.
@ MMAGIC_WLAN_VAR_MCS10_MODE
The currently configured MCS10 behavior.
@ MMAGIC_WLAN_VAR_FRAGMENT_THRESHOLD
Sets the 802.11 fragmentation threshold.
@ MMAGIC_WLAN_VAR_SSID
SSID of the AP to connect to, can be 1-32 characters long.
@ MMAGIC_WLAN_VAR_RTS_THRESHOLD
The RTS threshold (in octets) to set, or 0 to disable.
@ MMAGIC_WLAN_VAR_STA_SCAN_INTERVAL_LIMIT_S
The maximum interval between scan attempts when (re)connecting.
@ MMAGIC_WLAN_VAR_NDP_PROBE_ENABLED
Boolean value indicating whether NDP probe support should be enabled.
@ MMAGIC_WLAN_VAR_QOS_0_PARAMS
The default QoS queue configuration for Access Category 0 (AC_BE) that is active while the station is...
@ MMAGIC_WLAN_VAR_DUTY_CYCLE_MODE
The duty cycle air time distribution mode.
@ MMAGIC_WLAN_VAR_MIN_HEALTH_CHECK_INTVL_MS
The minimum interval to wait after the last health check before triggering another.
@ MMAGIC_WLAN_VAR_STA_SCAN_INTERVAL_BASE_S
The base scan interval (in seconds) to use when (re)connecting.
@ MMAGIC_WLAN_VAR_STA_EVT_EN
When set to true, STA event notifications will be provided.
@ MMAGIC_WLAN_VAR_CAC_ENABLED
Whether Centralized Authentication Controlled is enabled on the STA.
@ MMAGIC_WLAN_VAR_QOS_3_PARAMS
The default QoS queue configuration for Access Category 3 (AC_VO) that is active while the station is...
@ MMAGIC_WLAN_VAR_POWER_SAVE_MODE
Sets the 802.11 power save mode.
@ MMAGIC_WLAN_VAR_AMPDU_ENABLED
Boolean value indicating whether AMPDU support should be enabled.
@ MMAGIC_IPERF_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_IPERF_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_IPERF_CMD_RUN
Starts an iperf session using the current values in the the subsystem config.
@ MMAGIC_IPERF_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_IPERF_CMD_LOAD
Reserved (unused)
@ MMAGIC_NTP_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_NTP_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_NTP_CMD_SYNC
Synchronizes internal time using the NTP server.
@ MMAGIC_NTP_CMD_LOAD
Reserved (unused)
@ MMAGIC_NTP_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_NTP_CMD_GET_TIME
Reads current internal time.
@ MMAGIC_PING_VAR_COUNT
This specifies the number of ping requests to send before terminating the session.
@ MMAGIC_PING_VAR_TARGET
The IP address of the ping target.
@ MMAGIC_PING_VAR_INTERVAL
The time interval between ping requests (in milliseconds).
@ MMAGIC_IPERF_VAR_SERVER
IP address of server to connect to when in client mode.
@ MMAGIC_IPERF_VAR_PORT
Specifies the local port to listen on when in server mode or the server port to send data to when in ...
@ MMAGIC_IPERF_VAR_MODE
The iperf mode to use.
@ MMAGIC_IPERF_VAR_AMOUNT
This specifies the duration for client transfers specified either in seconds or bytes.
@ MMAGIC_WLAN_CMD_LOAD
Reserved (unused)
@ MMAGIC_WLAN_CMD_GET_MAC_ADDR
Retrieves the MAC address if the WLAN interface is up.
@ MMAGIC_WLAN_CMD_STANDBY_ENTER
This puts the Morse chip into standby mode allowing the host processor to go to sleep while the Morse...
@ MMAGIC_WLAN_CMD_GET_STA_STATUS
Retrieves the STA status of the WLAN interface.
@ MMAGIC_WLAN_CMD_BEACON_MONITOR_ENABLE
Enable beacon monitoring with the given filter settings.
@ MMAGIC_WLAN_CMD_BEACON_MONITOR_DISABLE
Disable beacon monitoring.
@ MMAGIC_WLAN_CMD_GET_RSSI
Retrieves the RSSI if the WLAN interface is up, else 0.
@ MMAGIC_WLAN_CMD_STANDBY_SET_STATUS_PAYLOAD
Sets the user payload for the standby status packet.
@ MMAGIC_WLAN_CMD_STANDBY_SET_WAKE_FILTER
Configures the standby mode UDP wake packet filter.
@ MMAGIC_WLAN_CMD_STANDBY_SET_CONFIG
Sets the standby mode configuration parameters.
@ MMAGIC_WLAN_CMD_WNM_SLEEP
Requests entry or exit from extended sleep (wnm sleep) if the WLAN interface is up.
@ MMAGIC_WLAN_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_WLAN_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_WLAN_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_WLAN_CMD_DISCONNECT
Disconnects and brings down the WLAN interface.
@ MMAGIC_WLAN_CMD_SCAN
Starts an undirected scan for available networks.
@ MMAGIC_WLAN_CMD_CONNECT
Brings up the WLAN interface and connects to the AP with configured parameters.
@ MMAGIC_WLAN_CMD_STANDBY_EXIT
Forces the Morse chip to exit standby mode.
@ MMAGIC_TLS_VAR_ROOT_CA_CERTIFICATE
Root certificate authority certificate.
@ MMAGIC_TLS_VAR_CLIENT_CERTIFICATE
Certificate to identify the client.
@ MMAGIC_TLS_VAR_CLIENT_PRIVATE_KEY
Client private key.
@ MMAGIC_NTP_VAR_SERVER
The hostname or IP of the NTP server.
@ MMAGIC_SYS_CMD_DEEP_SLEEP
Enters deep sleep mode.
@ MMAGIC_SYS_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_SYS_CMD_RESET
Performs a soft reset.
@ MMAGIC_SYS_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_SYS_CMD_GET_VERSION
Gets the device firmware and hardware versions.
@ MMAGIC_SYS_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_SYS_CMD_LOAD
Reserved (unused)
@ MMAGIC_TLS_CMD_LOAD
Reserved (unused)
@ MMAGIC_TLS_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_TLS_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_TLS_CMD_COMMIT
Commit the current configuration to flash.
@ MMAGIC_IP_CMD_ENABLE_TCP_KEEPALIVE_OFFLOAD
Enables sending periodic TCP keep-alive packets by the morse chip allowing the TCP connection to be m...
@ MMAGIC_IP_CMD_SET
Set the value of a configuration variable.
@ MMAGIC_IP_CMD_DISABLE_TCP_KEEPALIVE_OFFLOAD
Disables sending of TCP keepalive packets.
@ MMAGIC_IP_CMD_STATUS
Gets the status of the IP stack.
@ MMAGIC_IP_CMD_LOAD
Reserved (unused)
@ MMAGIC_IP_CMD_CLEAR_WHITELIST_FILTER
Clears any applied whitelist filters.
@ MMAGIC_IP_CMD_SET_WHITELIST_FILTER
Sets the whitelist filter specifing which incoming packets can wake the system from standby mode.
@ MMAGIC_IP_CMD_GET
Retrieve the value of a configuration variable.
@ MMAGIC_IP_CMD_RELOAD
Reloads the IP stack network configuration based on the current values in the subsystem config.
@ MMAGIC_IP_CMD_COMMIT
Commit the current configuration to flash.
static enum mmagic_status mmagic_controller_set_iperf_amount(struct mmagic_controller *controller, int32_t var)
Sets amount setting for module iperf.
static enum mmagic_status mmagic_controller_set_iperf_server(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets server setting for module iperf.
static enum mmagic_status mmagic_controller_get_iperf_server(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets server setting for module iperf.
static enum mmagic_status mmagic_controller_set_iperf_mode(struct mmagic_controller *controller, enum mmagic_iperf_mode var)
Sets mode setting for module iperf.
static enum mmagic_status mmagic_controller_get_iperf_port(struct mmagic_controller *controller, uint16_t *var)
Gets port setting for module iperf.
static enum mmagic_status mmagic_controller_set_iperf_port(struct mmagic_controller *controller, uint16_t var)
Sets port setting for module iperf.
static enum mmagic_status mmagic_controller_iperf_commit_all(struct mmagic_controller *controller)
Saves all settings from persistent store.
static enum mmagic_status mmagic_controller_get_iperf_mode(struct mmagic_controller *controller, enum mmagic_iperf_mode *var)
Gets mode setting for module iperf.
static enum mmagic_status mmagic_controller_get_iperf_amount(struct mmagic_controller *controller, int32_t *var)
Gets amount setting for module iperf.
static enum mmagic_status mmagic_controller_iperf_run(struct mmagic_controller *controller, struct mmagic_core_iperf_run_rsp_args *rsp_args)
Starts an iperf session using the current values in the the subsystem config.
static enum mmagic_status mmagic_controller_get_ip_ip_addr(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets ip_addr setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_dhcp_enabled(struct mmagic_controller *controller, bool *var)
Gets dhcp_enabled setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_dhcp_offload(struct mmagic_controller *controller, bool *var)
Gets dhcp_offload setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_dhcp_offload(struct mmagic_controller *controller, bool var)
Sets dhcp_offload setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_dns_server1(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets dns_server1 setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_offload_arp_response(struct mmagic_controller *controller, bool *var)
Gets offload_arp_response setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_netmask(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets netmask setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_link_status_evt_en(struct mmagic_controller *controller, bool var)
Sets link_status_evt_en setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_offload_arp_refresh_s(struct mmagic_controller *controller, uint32_t var)
Sets offload_arp_refresh_s setting for module ip.
static enum mmagic_status mmagic_controller_ip_commit_all(struct mmagic_controller *controller)
Saves all settings from persistent store.
static enum mmagic_status mmagic_controller_get_ip_gateway(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets gateway setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_link_status_evt_en(struct mmagic_controller *controller, bool *var)
Gets link_status_evt_en setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_netmask(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets netmask setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_dhcp_enabled(struct mmagic_controller *controller, bool var)
Sets dhcp_enabled setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_offload_arp_refresh_s(struct mmagic_controller *controller, uint32_t *var)
Gets offload_arp_refresh_s setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_offload_arp_response(struct mmagic_controller *controller, bool var)
Sets offload_arp_response setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_ip_addr(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets ip_addr setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_dns_server1(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets dns_server1 setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_gateway(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets gateway setting for module ip.
static enum mmagic_status mmagic_controller_set_ip_dns_server0(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets dns_server0 setting for module ip.
static enum mmagic_status mmagic_controller_get_ip_dns_server0(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets dns_server0 setting for module ip.
static enum mmagic_status mmagic_controller_ip_clear_whitelist_filter(struct mmagic_controller *controller)
Clears any applied whitelist filters.
static enum mmagic_status mmagic_controller_ip_disable_tcp_keepalive_offload(struct mmagic_controller *controller)
Disables sending of TCP keepalive packets.
static enum mmagic_status mmagic_controller_ip_enable_tcp_keepalive_offload(struct mmagic_controller *controller, struct mmagic_core_ip_enable_tcp_keepalive_offload_cmd_args *cmd_args)
Enables sending periodic TCP keep-alive packets by the morse chip allowing the TCP connection to be m...
void mmagic_controller_register_ip_link_status_handler(struct mmagic_controller *controller, mmagic_ip_link_status_event_handler_t handler, void *arg)
Register a handler for the ip-link_status event.
static enum mmagic_status mmagic_controller_ip_reload(struct mmagic_controller *controller)
Reloads the IP stack network configuration based on the current values in the subsystem config.
void(* mmagic_ip_link_status_event_handler_t)(const struct mmagic_ip_link_status_event_args *event_args, void *arg)
Handler for the ip-link_status event.
static enum mmagic_status mmagic_controller_ip_status(struct mmagic_controller *controller, struct mmagic_core_ip_status_rsp_args *rsp_args)
Gets the status of the IP stack.
static enum mmagic_status mmagic_controller_ip_set_whitelist_filter(struct mmagic_controller *controller, struct mmagic_core_ip_set_whitelist_filter_cmd_args *cmd_args)
Sets the whitelist filter specifing which incoming packets can wake the system from standby mode.
void(* mmagic_mqtt_broker_connection_event_handler_t)(const struct mmagic_mqtt_broker_connection_event_args *event_args, void *arg)
Handler for the mqtt-broker_connection event.
void mmagic_controller_register_mqtt_broker_connection_handler(struct mmagic_controller *controller, mmagic_mqtt_broker_connection_event_handler_t handler, void *arg)
Register a handler for the mqtt-broker_connection event.
void mmagic_controller_register_mqtt_message_received_handler(struct mmagic_controller *controller, mmagic_mqtt_message_received_event_handler_t handler, void *arg)
Register a handler for the mqtt-message_received event.
static enum mmagic_status mmagic_controller_mqtt_stop_agent(struct mmagic_controller *controller, struct mmagic_core_mqtt_stop_agent_cmd_args *cmd_args)
Stops the MQTT agent.
void(* mmagic_mqtt_message_received_event_handler_t)(const struct mmagic_mqtt_message_received_event_args *event_args, void *arg)
Handler for the mqtt-message_received event.
static enum mmagic_status mmagic_controller_mqtt_publish(struct mmagic_controller *controller, struct mmagic_core_mqtt_publish_cmd_args *cmd_args)
Publishes a message on a topic.
static enum mmagic_status mmagic_controller_mqtt_subscribe(struct mmagic_controller *controller, struct mmagic_core_mqtt_subscribe_cmd_args *cmd_args)
Subscribes to a topic.
static enum mmagic_status mmagic_controller_mqtt_start_agent(struct mmagic_controller *controller, struct mmagic_core_mqtt_start_agent_cmd_args *cmd_args, struct mmagic_core_mqtt_start_agent_rsp_args *rsp_args)
Starts the MQTT agent.
static enum mmagic_status mmagic_controller_ntp_commit_all(struct mmagic_controller *controller)
Saves all settings from persistent store.
static enum mmagic_status mmagic_controller_get_ntp_server(struct mmagic_controller *controller, struct string254 *var)
Gets server setting for module ntp.
static enum mmagic_status mmagic_controller_set_ntp_server(struct mmagic_controller *controller, const char *var)
Sets server setting for module ntp.
static enum mmagic_status mmagic_controller_ntp_sync(struct mmagic_controller *controller)
Synchronizes internal time using the NTP server.
static enum mmagic_status mmagic_controller_ntp_get_time(struct mmagic_controller *controller, struct mmagic_core_ntp_get_time_rsp_args *rsp_args)
Reads current internal time.
static enum mmagic_status mmagic_controller_get_ping_target(struct mmagic_controller *controller, struct struct_ip_addr *var)
Gets target setting for module ping.
static enum mmagic_status mmagic_controller_get_ping_count(struct mmagic_controller *controller, uint32_t *var)
Gets count setting for module ping.
static enum mmagic_status mmagic_controller_set_ping_count(struct mmagic_controller *controller, uint32_t var)
Sets count setting for module ping.
static enum mmagic_status mmagic_controller_ping_commit_all(struct mmagic_controller *controller)
Saves all settings from persistent store.
static enum mmagic_status mmagic_controller_set_ping_interval(struct mmagic_controller *controller, uint32_t var)
Sets interval setting for module ping.
static enum mmagic_status mmagic_controller_get_ping_interval(struct mmagic_controller *controller, uint32_t *var)
Gets interval setting for module ping.
static enum mmagic_status mmagic_controller_set_ping_target(struct mmagic_controller *controller, struct struct_ip_addr *var)
Sets target setting for module ping.
static enum mmagic_status mmagic_controller_ping_run(struct mmagic_controller *controller, struct mmagic_core_ping_run_rsp_args *rsp_args)
Commences a ping session using the current values in the the subsystem config.
static enum mmagic_status mmagic_controller_sys_deep_sleep(struct mmagic_controller *controller, struct mmagic_core_sys_deep_sleep_cmd_args *cmd_args)
Enters deep sleep mode.
static enum mmagic_status mmagic_controller_sys_reset(struct mmagic_controller *controller)
Performs a soft reset.
static enum mmagic_status mmagic_controller_sys_get_version(struct mmagic_controller *controller, struct mmagic_core_sys_get_version_rsp_args *rsp_args)
Gets the device firmware and hardware versions.
static enum mmagic_status mmagic_controller_tcp_connect(struct mmagic_controller *controller, struct mmagic_core_tcp_connect_cmd_args *cmd_args, struct mmagic_core_tcp_connect_rsp_args *rsp_args)
Opens a client TCP socket and returns its stream ID.
static enum mmagic_status mmagic_controller_tcp_accept(struct mmagic_controller *controller, struct mmagic_core_tcp_accept_cmd_args *cmd_args, struct mmagic_core_tcp_accept_rsp_args *rsp_args)
Waits for an incoming socket connection and returns a new stream ID.
static enum mmagic_status mmagic_controller_tcp_recv(struct mmagic_controller *controller, struct mmagic_core_tcp_recv_cmd_args *cmd_args, struct mmagic_core_tcp_recv_rsp_args *rsp_args)
Reads from a socket.
void mmagic_controller_register_tcp_rx_ready_handler(struct mmagic_controller *controller, mmagic_tcp_rx_ready_event_handler_t handler, void *arg)
Register a handler for the tcp-rx_ready event.
static enum mmagic_status mmagic_controller_tcp_write_poll(struct mmagic_controller *controller, struct mmagic_core_tcp_write_poll_cmd_args *cmd_args)
Polls the socket till it is ready for writing.
static enum mmagic_status mmagic_controller_tcp_read_poll(struct mmagic_controller *controller, struct mmagic_core_tcp_read_poll_cmd_args *cmd_args)
Polls the socket till it is ready for reading.
void(* mmagic_tcp_rx_ready_event_handler_t)(const struct mmagic_tcp_rx_ready_event_args *event_args, void *arg)
Handler for the tcp-rx_ready event.
static enum mmagic_status mmagic_controller_tcp_bind(struct mmagic_controller *controller, struct mmagic_core_tcp_bind_cmd_args *cmd_args, struct mmagic_core_tcp_bind_rsp_args *rsp_args)
Opens a server TCP socket and returns its stream ID.
static enum mmagic_status mmagic_controller_tcp_set_rx_ready_evt_enabled(struct mmagic_controller *controller, struct mmagic_core_tcp_set_rx_ready_evt_enabled_cmd_args *cmd_args)
Sets whether the RX ready event should be enabled for the given socket.
static enum mmagic_status mmagic_controller_tcp_send(struct mmagic_controller *controller, struct mmagic_core_tcp_send_cmd_args *cmd_args)
Writes to a socket.
static enum mmagic_status mmagic_controller_tcp_close(struct mmagic_controller *controller, struct mmagic_core_tcp_close_cmd_args *cmd_args)
Closes and frees the socket.
static enum mmagic_status mmagic_controller_set_tls_client_private_key(struct mmagic_controller *controller, struct raw1536 *var)
Sets client_private_key setting for module tls.
static enum mmagic_status mmagic_controller_tls_commit_all(struct mmagic_controller *controller)
Saves all settings from persistent store.
static enum mmagic_status mmagic_controller_get_tls_client_certificate(struct mmagic_controller *controller, struct raw1536 *var)
Gets client_certificate setting for module tls.
static enum mmagic_status mmagic_controller_set_tls_root_ca_certificate(struct mmagic_controller *controller, struct raw1536 *var)
Sets root_ca_certificate setting for module tls.
static enum mmagic_status mmagic_controller_set_tls_client_certificate(struct mmagic_controller *controller, struct raw1536 *var)
Sets client_certificate setting for module tls.
static enum mmagic_status mmagic_controller_get_tls_root_ca_certificate(struct mmagic_controller *controller, struct raw1536 *var)
Gets root_ca_certificate setting for module tls.
static enum mmagic_status mmagic_controller_get_tls_client_private_key(struct mmagic_controller *controller, struct raw1536 *var)
Gets client_private_key setting for module tls.
static enum mmagic_status mmagic_controller_set_wlan_ampdu_enabled(struct mmagic_controller *controller, bool var)
Sets ampdu_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_qos_1_params(struct mmagic_controller *controller, const char *var)
Sets qos_1_params setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_sta_scan_interval_limit_s(struct mmagic_controller *controller, uint16_t *var)
Gets sta_scan_interval_limit_s setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_ampdu_enabled(struct mmagic_controller *controller, bool *var)
Gets ampdu_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_max_health_check_intvl_ms(struct mmagic_controller *controller, uint32_t var)
Sets max_health_check_intvl_ms setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_ssid(struct mmagic_controller *controller, const char *var)
Sets ssid setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_power_save_mode(struct mmagic_controller *controller, enum mmagic_power_save_mode *var)
Gets power_save_mode setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_pmf_mode(struct mmagic_controller *controller, enum mmagic_pmf_mode *var)
Gets pmf_mode setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_cac_enabled(struct mmagic_controller *controller, bool *var)
Gets cac_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_password(struct mmagic_controller *controller, const char *var)
Sets password setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_qos_2_params(struct mmagic_controller *controller, struct string32 *var)
Gets qos_2_params setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_min_health_check_intvl_ms(struct mmagic_controller *controller, uint32_t var)
Sets min_health_check_intvl_ms setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_sta_scan_interval_base_s(struct mmagic_controller *controller, uint16_t var)
Sets sta_scan_interval_base_s setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_bssid(struct mmagic_controller *controller, struct struct_mac_addr *var)
Sets bssid setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_security(struct mmagic_controller *controller, enum mmagic_security_type *var)
Gets security setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_qos_2_params(struct mmagic_controller *controller, const char *var)
Sets qos_2_params setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_mcs10_mode(struct mmagic_controller *controller, enum mmagic_mcs10_mode *var)
Gets mcs10_mode setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_duty_cycle_mode(struct mmagic_controller *controller, enum mmagic_duty_cycle_mode *var)
Gets duty_cycle_mode setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_max_health_check_intvl_ms(struct mmagic_controller *controller, uint32_t *var)
Gets max_health_check_intvl_ms setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_sta_scan_interval_base_s(struct mmagic_controller *controller, uint16_t *var)
Gets sta_scan_interval_base_s setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_sta_evt_en(struct mmagic_controller *controller, bool *var)
Gets sta_evt_en setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_subbands_enabled(struct mmagic_controller *controller, bool var)
Sets subbands_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_pmf_mode(struct mmagic_controller *controller, enum mmagic_pmf_mode var)
Sets pmf_mode setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_qos_3_params(struct mmagic_controller *controller, struct string32 *var)
Gets qos_3_params setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_qos_1_params(struct mmagic_controller *controller, struct string32 *var)
Gets qos_1_params setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_raw_priority(struct mmagic_controller *controller, int16_t var)
Sets raw_priority setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_station_type(struct mmagic_controller *controller, enum mmagic_station_type *var)
Gets station_type setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_ssid(struct mmagic_controller *controller, struct string32 *var)
Gets ssid setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_fragment_threshold(struct mmagic_controller *controller, uint32_t *var)
Gets fragment_threshold setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_qos_0_params(struct mmagic_controller *controller, const char *var)
Sets qos_0_params setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_ndp_probe_enabled(struct mmagic_controller *controller, bool *var)
Gets ndp_probe_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_sgi_enabled(struct mmagic_controller *controller, bool var)
Sets sgi_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_rts_threshold(struct mmagic_controller *controller, uint32_t var)
Sets rts_threshold setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_sta_scan_interval_limit_s(struct mmagic_controller *controller, uint16_t var)
Sets sta_scan_interval_limit_s setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_duty_cycle_mode(struct mmagic_controller *controller, enum mmagic_duty_cycle_mode var)
Sets duty_cycle_mode setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_power_save_mode(struct mmagic_controller *controller, enum mmagic_power_save_mode var)
Sets power_save_mode setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_ndp_probe_enabled(struct mmagic_controller *controller, bool var)
Sets ndp_probe_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_raw_priority(struct mmagic_controller *controller, int16_t *var)
Gets raw_priority setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_cac_enabled(struct mmagic_controller *controller, bool var)
Sets cac_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_qos_0_params(struct mmagic_controller *controller, struct string32 *var)
Gets qos_0_params setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_fragment_threshold(struct mmagic_controller *controller, uint32_t var)
Sets fragment_threshold setting for module wlan.
static enum mmagic_status mmagic_controller_wlan_commit_all(struct mmagic_controller *controller)
Saves all settings from persistent store.
static enum mmagic_status mmagic_controller_get_wlan_password(struct mmagic_controller *controller, struct string100 *var)
Gets password setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_mcs10_mode(struct mmagic_controller *controller, enum mmagic_mcs10_mode var)
Sets mcs10_mode setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_sta_evt_en(struct mmagic_controller *controller, bool var)
Sets sta_evt_en setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_rts_threshold(struct mmagic_controller *controller, uint32_t *var)
Gets rts_threshold setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_country_code(struct mmagic_controller *controller, struct struct_country_code *var)
Gets country_code setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_sgi_enabled(struct mmagic_controller *controller, bool *var)
Gets sgi_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_bssid(struct mmagic_controller *controller, struct struct_mac_addr *var)
Gets bssid setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_min_health_check_intvl_ms(struct mmagic_controller *controller, uint32_t *var)
Gets min_health_check_intvl_ms setting for module wlan.
static enum mmagic_status mmagic_controller_get_wlan_subbands_enabled(struct mmagic_controller *controller, bool *var)
Gets subbands_enabled setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_station_type(struct mmagic_controller *controller, enum mmagic_station_type var)
Sets station_type setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_country_code(struct mmagic_controller *controller, struct struct_country_code *var)
Sets country_code setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_security(struct mmagic_controller *controller, enum mmagic_security_type var)
Sets security setting for module wlan.
static enum mmagic_status mmagic_controller_set_wlan_qos_3_params(struct mmagic_controller *controller, const char *var)
Sets qos_3_params setting for module wlan.
static enum mmagic_status mmagic_controller_wlan_beacon_monitor_enable(struct mmagic_controller *controller, struct mmagic_core_wlan_beacon_monitor_enable_cmd_args *cmd_args)
Enable beacon monitoring with the given filter settings.
static enum mmagic_status mmagic_controller_wlan_standby_enter(struct mmagic_controller *controller)
This puts the Morse chip into standby mode allowing the host processor to go to sleep while the Morse...
void(* mmagic_wlan_standby_exit_event_handler_t)(const struct mmagic_wlan_standby_exit_event_args *event_args, void *arg)
Handler for the wlan-standby_exit event.
static enum mmagic_status mmagic_controller_wlan_get_rssi(struct mmagic_controller *controller, struct mmagic_core_wlan_get_rssi_rsp_args *rsp_args)
Retrieves the RSSI if the WLAN interface is up, else 0.
static enum mmagic_status mmagic_controller_wlan_standby_exit(struct mmagic_controller *controller)
Forces the Morse chip to exit standby mode.
static enum mmagic_status mmagic_controller_wlan_disconnect(struct mmagic_controller *controller)
Disconnects and brings down the WLAN interface.
static enum mmagic_status mmagic_controller_wlan_standby_set_config(struct mmagic_controller *controller, struct mmagic_core_wlan_standby_set_config_cmd_args *cmd_args)
Sets the standby mode configuration parameters.
static enum mmagic_status mmagic_controller_wlan_get_sta_status(struct mmagic_controller *controller, struct mmagic_core_wlan_get_sta_status_rsp_args *rsp_args)
Retrieves the STA status of the WLAN interface.
static enum mmagic_status mmagic_controller_wlan_wnm_sleep(struct mmagic_controller *controller, struct mmagic_core_wlan_wnm_sleep_cmd_args *cmd_args)
Requests entry or exit from extended sleep (wnm sleep) if the WLAN interface is up.
void mmagic_controller_register_wlan_beacon_rx_handler(struct mmagic_controller *controller, mmagic_wlan_beacon_rx_event_handler_t handler, void *arg)
Register a handler for the wlan-beacon_rx event.
static enum mmagic_status mmagic_controller_wlan_get_mac_addr(struct mmagic_controller *controller, struct mmagic_core_wlan_get_mac_addr_rsp_args *rsp_args)
Retrieves the MAC address if the WLAN interface is up.
void mmagic_controller_register_wlan_sta_event_handler(struct mmagic_controller *controller, mmagic_wlan_sta_event_event_handler_t handler, void *arg)
Register a handler for the wlan-sta_event event.
static enum mmagic_status mmagic_controller_wlan_beacon_monitor_disable(struct mmagic_controller *controller)
Disable beacon monitoring.
static enum mmagic_status mmagic_controller_wlan_connect(struct mmagic_controller *controller, struct mmagic_core_wlan_connect_cmd_args *cmd_args)
Brings up the WLAN interface and connects to the AP with configured parameters.
static enum mmagic_status mmagic_controller_wlan_standby_set_status_payload(struct mmagic_controller *controller, struct mmagic_core_wlan_standby_set_status_payload_cmd_args *cmd_args)
Sets the user payload for the standby status packet.
static enum mmagic_status mmagic_controller_wlan_scan(struct mmagic_controller *controller, struct mmagic_core_wlan_scan_cmd_args *cmd_args, struct mmagic_core_wlan_scan_rsp_args *rsp_args)
Starts an undirected scan for available networks.
static enum mmagic_status mmagic_controller_wlan_standby_set_wake_filter(struct mmagic_controller *controller, struct mmagic_core_wlan_standby_set_wake_filter_cmd_args *cmd_args)
Configures the standby mode UDP wake packet filter.
void mmagic_controller_register_wlan_standby_exit_handler(struct mmagic_controller *controller, mmagic_wlan_standby_exit_event_handler_t handler, void *arg)
Register a handler for the wlan-standby_exit event.
void(* mmagic_wlan_sta_event_event_handler_t)(const struct mmagic_wlan_sta_event_event_args *event_args, void *arg)
Handler for the wlan-sta_event event.
void(* mmagic_wlan_beacon_rx_event_handler_t)(const struct mmagic_wlan_beacon_rx_event_args *event_args, void *arg)
Handler for the wlan-beacon_rx event.
#define MM_PACKED
Macro for packed structs.
Initialization structure for mmagic_controller.
mmagic_controller_agent_start_cb_t agent_start_cb
Callback function to executed any time a event that the agent has started is received.
void * agent_start_arg
User argument that will be passed when the agent_start_cb is executed.
Command arguments structure for ip_enable_tcp_keepalive_offload.
uint8_t retry_count
The number of times to retry before giving up.
uint8_t retry_interval_s
The interval in seconds to wait between retries.
uint16_t period_s
Interval in seconds to send the keep-alive packets in.
Command arguments structure for ip_set_whitelist_filter.
uint16_t src_port
The source port to match, 0 for any.
uint16_t llc_protocol
The LLC protocol (or EtherType) to match - 0x0800 for IPv4 and 0x86DD for IPv6, 0 for any.
uint16_t dest_port
The destination port to match, 0 for any.
uint8_t ip_protocol
The IPv4 protocol number to match - 6 for TCP, 17 for UDP, 0 for any.
Response arguments structure for ip_status.
Response arguments structure for iperf_run.
Command arguments structure for mqtt_publish.
uint8_t stream_id
Stream ID of the MQTT connection.
uint8_t qos
MQTT quality of service (0-2).
Command arguments structure for mqtt_start_agent.
bool secure
Enables TLS for brokers that require it.
uint16_t port
Port of the broker to connect to.
Response arguments structure for mqtt_start_agent.
uint8_t stream_id
Stream ID of the opened socket.
Command arguments structure for mqtt_stop_agent.
uint8_t stream_id
Stream ID of the MQTT connection.
Command arguments structure for mqtt_subscribe.
uint8_t qos
MQTT quality of service (0-2).
uint8_t stream_id
Stream ID of the MQTT connection.
Response arguments structure for ntp_get_time.
uint64_t timestamp
Current internal time (Seconds since epoch, UTC).
Response arguments structure for ping_run.
Command arguments structure for sys_deep_sleep.
enum mmagic_deep_sleep_mode mode
Deep sleep mode to enter.
Response arguments structure for sys_get_version.
Command arguments structure for tcp_accept.
uint8_t stream_id
Stream ID of the bound socket.
Response arguments structure for tcp_accept.
uint8_t stream_id
Stream ID of the new incoming connection.
Command arguments structure for tcp_bind.
uint16_t port
TCP port to listen on.
Response arguments structure for tcp_bind.
uint8_t stream_id
Stream ID of the opened socket.
Command arguments structure for tcp_close.
uint8_t stream_id
Stream ID of the socket to close.
Command arguments structure for tcp_connect.
uint16_t port
TCP port to connect to.
bool enable_tls
Enables TLS.
Response arguments structure for tcp_connect.
uint8_t stream_id
Stream ID of the opened socket.
Command arguments structure for tcp_read_poll.
uint32_t timeout
Timeout in ms.
uint8_t stream_id
Stream ID of the socket to wait on.
Command arguments structure for tcp_recv.
uint32_t timeout
Timeout in ms.
uint8_t stream_id
Stream ID of the socket to receive from.
uint16_t len
Maximum length of data.
Response arguments structure for tcp_recv.
Command arguments structure for tcp_send.
uint8_t stream_id
Stream ID of the socket to send on.
Command arguments structure for tcp_set_rx_ready_evt_enabled.
bool enabled
Whether the RX ready event should be enabled.
uint8_t stream_id
Stream ID of the socket to close.
Command arguments structure for tcp_write_poll.
uint8_t stream_id
Stream ID of the socket to wait on.
uint32_t timeout
Timeout in ms.
Command arguments structure for wlan_beacon_monitor_enable.
Command arguments structure for wlan_connect.
uint32_t timeout
Duration in milliseconds to wait for connection establish, if connection does not get established an ...
Response arguments structure for wlan_get_mac_addr.
Response arguments structure for wlan_get_sta_status.
enum mmagic_sta_state sta_status
The current STA status.
Command arguments structure for wlan_scan.
uint32_t timeout
Optional duration in milliseconds to wait for scan to complete, if scan does not complete by the time...
Response arguments structure for wlan_scan.
Command arguments structure for wlan_standby_set_config.
uint32_t snooze_max_s
The maximum time in seconds to snooze for after increments (Default unlimited).
uint32_t bss_inactivity_s
Deprecated.
uint16_t dst_port
Destination UDP Port for the standby status packets, also used the source port for outgoing UDP port ...
uint32_t snooze_period_s
The interval in seconds to wake periodically from snooze mode and check for beacons.
uint32_t notify_period_s
Interval in seconds for transmitting Standby status packets (Default 15s).
uint32_t snooze_increment_s
The amount in seconds to increase successive snooze intervals.
Command arguments structure for wlan_standby_set_status_payload.
Command arguments structure for wlan_standby_set_wake_filter.
uint32_t offset
Offset within wake packet payload to apply the filter.
Command arguments structure for wlan_wnm_sleep.
bool wnm_sleep_enabled
Boolean indicating whether WNM sleep is enabled.
Event arguments structure for ip_link_status.
Event arguments structure for mqtt_broker_connection.
enum mmagic_status connection_state
Current state of the connection to the broker.
uint8_t stream_id
Stream ID of the MQTT connection.
Event arguments structure for mqtt_message_received.
uint8_t stream_id
Stream ID of the MQTT connection.
Event arguments structure for tcp_rx_ready.
uint8_t stream_id
Stream ID of the TCP socket this applies to.
Event arguments structure for wlan_beacon_rx.
Event arguments structure for wlan_sta_event.
enum mmagic_sta_event event
The reported WLAN STA evt.
Event arguments structure for wlan_standby_exit.
enum mmagic_standby_mode_exit_reason reason
Reason why we exited standby mode.
Raw octet string type with maximum length of 1536.
uint16_t len
Length of data.
Raw octet string type with maximum length of 255.
uint8_t len
Length of data.
String type with maximum length of 100 (excluding null terminator).
uint8_t len
Length of string contents (excluding null terminator).
char data[100+1]
The string contents.
String type with maximum length of 254 (excluding null terminator).
uint8_t len
Length of string contents (excluding null terminator).
char data[254+1]
The string contents.
String type with maximum length of 32 (excluding null terminator).
uint8_t len
Length of string contents (excluding null terminator).
char data[32+1]
The string contents.
uint8_t len
Length of data in the buffer.
Data type to contain Two character country code (null-terminated) used to identify the regulatory dom...
Data type for a string representation of an IP address.
Structure to contain the current IP status.
bool dhcp_enabled
Whether or not dhcp is enabled.
enum mmagic_ip_link_state link_state
Current link state.
Data structure to store iperf results.
uint16_t local_port
Port number of the local device.
uint64_t bytes_transferred
The number of bytes of data transferred during the iperf test.
uint32_t bandwidth_kbitpsec
The average throughput in kbps.
uint16_t remote_port
Port number of the remote device.
uint32_t duration_ms
The duration of the iperf test in milliseconds.
Data type to contain mac address byte array.
Data type to contain a list of three octet OUIs.
uint8_t count
The number of OUIs in the list.
Data type to contain a three octet OUI.
Data structure to store ping results.
uint32_t min_time_ms
The minimum latency in ms between request sent and response received.
uint32_t total_count
Total number of requests sent.
uint16_t session_id
Stores non-zero session ID whilst ping session is running.
uint32_t avg_time_ms
The average latency in ms between request sent and response received.
uint32_t recv_count
The number of ping responses received.
uint32_t max_time_ms
The maximum latency in ms between request sent and response received.
Structure for holding a scan result.
uint16_t received_ies_len
Length of the ies field in the received frame.
uint8_t op_bw_mhz
Operating bandwidth, in MHz, of the access point.
uint16_t capability_info
Value of the Capability Information field.
uint32_t channel_freq_hz
Center frequency in Hz of the channel where the frame was received.
uint8_t bw_mhz
Bandwidth, in MHz, where the frame was received.
int32_t rssi
RSSI of the AP in dBm.
uint16_t beacon_interval
Value of the Beacon Interval field.
int16_t noise_dbm
Background noise measured by the chip on the channel at the time the probe response was received.
uint64_t tsf
TSF timestamp in the Probe Response frame.
Structure for returning the scan status.
uint8_t num
Number of results retrieved.
struct struct_scan_result results[10]
Array of scan results.
Structure for devise firmware and hardware versions.