38#define MM_PACKED __attribute__((packed))
338 char country_code[3];
521struct mmagic_controller;
548#define MMAGIC_CONTROLLER_ARGS_INIT { 0 }
578#define CONTROL_STREAM 0
581#define MMAGIC_CONTROLLER_DEFAULT_RESPONSE_TIMEOUT_MS 1000
598 struct mmagic_controller *controller, uint8_t stream_id,
599 uint8_t submodule_id, uint8_t command_id, uint8_t subcommand_id,
600 const uint8_t *buffer,
size_t buffer_length);
619 uint8_t submodule_id,
620 uint8_t command_id, uint8_t subcommand_id,
621 uint8_t *buffer,
size_t buffer_length, uint32_t timeout_ms);
635 uint32_t timeout_ms);
1133 struct mmagic_controller *controller,
struct string32 *var)
1159 struct mmagic_controller *controller,
const char *var)
1163 var_val.
len = strlen(var);
1164 if (var_val.
len >
sizeof(var_val.
data) - 1)
1168 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
1169 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
1193 struct mmagic_controller *controller,
struct string100 *var)
1219 struct mmagic_controller *controller,
const char *var)
1223 var_val.
len = strlen(var);
1224 if (var_val.
len >
sizeof(var_val.
data) - 1)
1228 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
1229 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
1305 struct mmagic_controller *controller, int16_t *var)
1331 struct mmagic_controller *controller, int16_t var)
1513 struct mmagic_controller *controller, uint32_t *var)
1539 struct mmagic_controller *controller, uint32_t var)
1565 struct mmagic_controller *controller,
bool *var)
1591 struct mmagic_controller *controller,
bool var)
1617 struct mmagic_controller *controller,
bool *var)
1643 struct mmagic_controller *controller,
bool var)
1669 struct mmagic_controller *controller,
bool *var)
1695 struct mmagic_controller *controller,
bool var)
1774 struct mmagic_controller *controller, uint32_t *var)
1801 struct mmagic_controller *controller, uint32_t var)
1827 struct mmagic_controller *controller,
bool *var)
1853 struct mmagic_controller *controller,
bool var)
1880 struct mmagic_controller *controller,
bool *var)
1907 struct mmagic_controller *controller,
bool var)
1935 struct mmagic_controller *controller, uint32_t *var)
1962 struct mmagic_controller *controller, uint32_t var)
1993 struct mmagic_controller *controller, uint32_t *var)
2023 struct mmagic_controller *controller, uint32_t var)
2053 struct mmagic_controller *controller, uint32_t *var)
2082 struct mmagic_controller *controller, uint32_t var)
2110 struct mmagic_controller *controller,
bool *var)
2137 struct mmagic_controller *controller,
bool var)
2165 struct mmagic_controller *controller, uint16_t *var)
2193 struct mmagic_controller *controller, uint16_t var)
2222 struct mmagic_controller *controller, uint16_t *var)
2250 struct mmagic_controller *controller, uint16_t var)
2281 struct mmagic_controller *controller,
struct string32 *var)
2311 struct mmagic_controller *controller,
const char *var)
2315 var_val.
len = strlen(var);
2316 if (var_val.
len >
sizeof(var_val.
data) - 1)
2320 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2321 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2350 struct mmagic_controller *controller,
struct string32 *var)
2380 struct mmagic_controller *controller,
const char *var)
2384 var_val.
len = strlen(var);
2385 if (var_val.
len >
sizeof(var_val.
data) - 1)
2389 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2390 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2419 struct mmagic_controller *controller,
struct string32 *var)
2449 struct mmagic_controller *controller,
const char *var)
2453 var_val.
len = strlen(var);
2454 if (var_val.
len >
sizeof(var_val.
data) - 1)
2458 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2459 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2488 struct mmagic_controller *controller,
struct string32 *var)
2518 struct mmagic_controller *controller,
const char *var)
2522 var_val.
len = strlen(var);
2523 if (var_val.
len >
sizeof(var_val.
data) - 1)
2527 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
2528 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
2612 struct mmagic_controller *controller,
bool *var)
2639 struct mmagic_controller *controller,
bool var)
2718 struct mmagic_controller *controller)
2751 struct mmagic_controller *controller,
2760 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
2762 response_timeout_ms += cmd_args->
timeout;
2766 response_timeout_ms = UINT32_MAX;
2770 (uint8_t *)cmd_args,
sizeof(*cmd_args));
2776 NULL, 0, response_timeout_ms);
2788 struct mmagic_controller *controller)
2801 NULL, 0, response_timeout_ms);
2844 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
2846 response_timeout_ms += cmd_args->
timeout;
2850 response_timeout_ms = UINT32_MAX;
2854 (uint8_t *)cmd_args,
sizeof(*cmd_args));
2860 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
2882 struct mmagic_controller *controller,
2897 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
2919 struct mmagic_controller *controller,
2934 0, (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
2954 struct mmagic_controller *controller,
2963 (uint8_t *)cmd_args,
sizeof(*cmd_args));
2969 NULL, 0, response_timeout_ms);
2990 struct mmagic_controller *controller,
3007 response_timeout_ms);
3019 struct mmagic_controller *controller)
3033 response_timeout_ms);
3047 struct mmagic_controller *controller)
3060 0, NULL, 0, response_timeout_ms);
3075 struct mmagic_controller *controller)
3088 NULL, 0, response_timeout_ms);
3111 struct mmagic_controller *controller,
3121 (uint8_t *)cmd_args,
sizeof(*cmd_args));
3128 response_timeout_ms);
3154 struct mmagic_controller *controller,
3171 response_timeout_ms);
3210 struct mmagic_controller *controller,
3227 response_timeout_ms);
3249 struct mmagic_controller *controller,
3265 sizeof(*rsp_args), response_timeout_ms);
3311 struct mmagic_controller *controller,
3353 struct mmagic_controller *controller,
3394 struct mmagic_controller *controller,
3421 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3448 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3475 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3502 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3529 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3556 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3584 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3612 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3640 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3668 struct mmagic_controller *controller,
struct struct_ip_addr *var)
3696 struct mmagic_controller *controller,
bool *var)
3724 struct mmagic_controller *controller,
bool var)
3752 struct mmagic_controller *controller,
bool *var)
3780 struct mmagic_controller *controller,
bool var)
3807 struct mmagic_controller *controller,
bool *var)
3834 struct mmagic_controller *controller,
bool var)
3857 struct mmagic_controller *controller)
3905 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
3929 response_timeout_ms);
3956 struct mmagic_controller *controller,
3966 (uint8_t *)cmd_args,
sizeof(*cmd_args));
3973 response_timeout_ms);
3985 struct mmagic_controller *controller)
3999 response_timeout_ms);
4032 struct mmagic_controller *controller,
4049 response_timeout_ms);
4061 struct mmagic_controller *controller)
4075 response_timeout_ms);
4118 struct mmagic_controller *controller,
4144 struct mmagic_controller *controller,
struct struct_ip_addr *var)
4170 struct mmagic_controller *controller,
struct struct_ip_addr *var)
4196 struct mmagic_controller *controller, uint32_t *var)
4222 struct mmagic_controller *controller, uint32_t var)
4249 struct mmagic_controller *controller, uint32_t *var)
4276 struct mmagic_controller *controller, uint32_t var)
4299 struct mmagic_controller *controller)
4347 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
4428 struct mmagic_controller *controller,
struct struct_ip_addr *var)
4454 struct mmagic_controller *controller,
struct struct_ip_addr *var)
4481 struct mmagic_controller *controller, uint16_t *var)
4508 struct mmagic_controller *controller, uint16_t var)
4536 struct mmagic_controller *controller, int32_t *var)
4564 struct mmagic_controller *controller, int32_t var)
4587 struct mmagic_controller *controller)
4635 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
4678 struct mmagic_controller *controller,
4687 (uint8_t *)cmd_args,
sizeof(*cmd_args));
4693 NULL, 0, response_timeout_ms);
4715 struct mmagic_controller *controller,
4730 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
4780 uint32_t response_timeout_ms = 15000;
4783 (uint8_t *)cmd_args,
sizeof(*cmd_args));
4789 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
4829 (uint8_t *)cmd_args,
sizeof(*cmd_args));
4835 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
4875 const uint8_t stream_id = cmd_args->
stream_id;
4879 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
4881 response_timeout_ms += cmd_args->
timeout;
4885 response_timeout_ms = UINT32_MAX;
4889 (uint8_t *)cmd_args,
sizeof(*cmd_args));
4895 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
4921 const uint8_t stream_id = cmd_args->
stream_id;
4925 (uint8_t *)cmd_args,
sizeof(*cmd_args));
4931 0, response_timeout_ms);
4953 struct mmagic_controller *controller,
4958 const uint8_t stream_id = cmd_args->
stream_id;
4962 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
4964 response_timeout_ms += cmd_args->
timeout;
4968 response_timeout_ms = UINT32_MAX;
4972 (uint8_t *)cmd_args,
sizeof(*cmd_args));
4978 NULL, 0, response_timeout_ms);
5000 struct mmagic_controller *controller,
5005 const uint8_t stream_id = cmd_args->
stream_id;
5009 if (UINT32_MAX - response_timeout_ms >= cmd_args->
timeout)
5011 response_timeout_ms += cmd_args->
timeout;
5015 response_timeout_ms = UINT32_MAX;
5019 (uint8_t *)cmd_args,
sizeof(*cmd_args));
5025 NULL, 0, response_timeout_ms);
5061 const uint8_t stream_id = cmd_args->
stream_id;
5062 uint32_t response_timeout_ms = -1;
5065 (uint8_t *)cmd_args,
sizeof(*cmd_args));
5071 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
5099 (uint8_t *)cmd_args,
sizeof(*cmd_args));
5105 0, response_timeout_ms);
5133 struct mmagic_controller *controller,
struct raw1536 *var)
5160 struct mmagic_controller *controller,
struct raw1536 *var)
5187 struct mmagic_controller *controller,
struct raw1536 *var)
5214 struct mmagic_controller *controller,
struct raw1536 *var)
5240 struct mmagic_controller *controller,
struct raw1536 *var)
5266 struct mmagic_controller *controller,
struct raw1536 *var)
5289 struct mmagic_controller *controller)
5328 struct mmagic_controller *controller,
struct string254 *var)
5354 struct mmagic_controller *controller,
const char *var)
5358 var_val.
len = strlen(var);
5359 if (var_val.
len >
sizeof(var_val.
data) - 1)
5363 memcpy(var_val.
data, (
const uint8_t *)var, var_val.
len);
5364 memset(var_val.
data + var_val.
len, 0,
sizeof(var_val.
data) - var_val.
len);
5385 struct mmagic_controller *controller)
5421 response_timeout_ms);
5443 struct mmagic_controller *controller,
5458 (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
5505 struct mmagic_controller *controller,
5516 0, (uint8_t *)cmd_args,
sizeof(*cmd_args));
5522 0, (uint8_t *)rsp_args,
sizeof(*rsp_args), response_timeout_ms);
5548 struct mmagic_controller *controller,
5557 (uint8_t *)cmd_args,
sizeof(*cmd_args));
5563 NULL, 0, response_timeout_ms);
5587 struct mmagic_controller *controller,
5596 (uint8_t *)cmd_args,
sizeof(*cmd_args));
5602 NULL, 0, response_timeout_ms);
5622 struct mmagic_controller *controller,
5631 (uint8_t *)cmd_args,
sizeof(*cmd_args));
5637 NULL, 0, response_timeout_ms);
5683 struct mmagic_controller *controller,
5726 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_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_DHCP_OFFLOAD
If true, enables DHCP offload which allows the Morse chip to directly handle DHCP discovery and lease...
@ 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_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_OFFLOAD_ARP_RESPONSE
If true, enables ARP response offload which allows the Morse chip to directly respond to ARP requests...
@ MMAGIC_WLAN_VAR_MAX_HEALTH_CHECK_INTVL_MS
The maximum interval to wait after the last health check before triggering another.
@ MMAGIC_WLAN_VAR_OFFLOAD_ARP_REFRESH_S
If non zero, enables ARP refresh offload with the specified interval in seconds.
@ 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_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_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_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.
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.
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_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_set_wlan_offload_arp_response(struct mmagic_controller *controller, bool var)
Sets offload_arp_response 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_get_wlan_offload_arp_refresh_s(struct mmagic_controller *controller, uint32_t *var)
Gets offload_arp_refresh_s 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_set_wlan_offload_arp_refresh_s(struct mmagic_controller *controller, uint32_t var)
Sets offload_arp_refresh_s 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_offload_arp_response(struct mmagic_controller *controller, bool *var)
Gets offload_arp_response 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
TCP port to listen on.
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_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 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.
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.