MegaWiFi 1.5
MegaWiFi API documentation
mw-msg

MegaWiFi command message definitions. More...

Data Structures

union  ip_addr
 IPv4 address. More...
 
struct  mw_msg_in_addr
 TCP/UDP address message. More...
 
struct  mw_ip_cfg
 IP configuration parameters. More...
 
struct  mw_msg_ap_cfg
 AP configuration message. More...
 
struct  mw_msg_ip_cfg
 IP configuration message. More...
 
struct  mw_msg_sntp_cfg
 SNTP and timezone configuration. More...
 
struct  mw_msg_date_time
 Date and time message. More...
 
struct  mw_msg_flash_data
 Flash memory address and data. More...
 
struct  mw_msg_flash_range
 Flash memory block. More...
 
struct  mw_msg_bind
 Bind message data. More...
 
struct  mw_wifi_adv_cfg
 Advanced WiFi configuration. More...
 
struct  mw_gamertag
 Gamertag data. More...
 
struct  mw_gamertag_set_msg
 Gamertag set message data. More...
 
union  mw_msg_sys_stat
 System status. More...
 
struct  mw_flash_id
 Flash chip identifiers. More...
 
struct  mw_ga_request
 Game API request. More...
 
union  mw_cmd
 Command sent to system FSM. More...
 
struct  mw_reuse_payload
 Payload with remote IP and port. More...
 

Macros

#define MW_MSG_MAX_BUFLEN   512
 Maximum buffer length (bytes) More...
 
#define MW_CMD_HEADLEN   (2 * sizeof(uint16_t))
 Command header length (command code and data length fields). More...
 
#define MW_CMD_MAX_BUFLEN   (MW_MSG_MAX_BUFLEN - MW_CMD_HEADLEN)
 Maximum data length contained inside command buffer. More...
 
#define MW_SSID_MAXLEN   32
 Maximum SSID length (including '\0'). More...
 
#define MW_PASS_MAXLEN   64
 Maximum password length (including '\0'). More...
 
#define MW_GT_NICKNAME_MAX   32
 Gamertag nickname maximum length. More...
 
#define MW_GT_SECURITY_MAX   32
 Gamertag security maximum length. More...
 
#define MW_GT_TAGLINE_MAX   32
 Gamertag tagline maximum length. More...
 
#define MW_GT_AVATAR_WIDTH   32
 Gamertag avatar graphick width in pixels. More...
 
#define MW_GT_AVATAR_HEIGHT   48
 Gamertag avatar graphick height in pixels. More...
 
#define MW_GT_TG_TOKEN_MAX   64
 Telegram token maximum length. More...
 

Typedefs

typedef union mw_cmd mw_cmd
 Command sent to system FSM.
 

Enumerations

enum  mw_state
 MwState Possible states of the system state machine. More...
 
enum  mw_sock_stat
 Socket status. More...
 

Variables

enum PACKED mw_command
 Supported commands. More...
 
enum PACKED mw_security
 Supported security protocols. More...
 
enum PACKED mw_phy_type
 WiFi PHY configuration for the connection to the AP. More...
 

Detailed Description

MegaWiFi command message definitions.

Contains the definition of the command codes and the data structures conforming the command message queries and responses. Usually this module is not directly used by the application, but by megawifi internally.

Author
Jesus Alonso (doragasu)
Date
2015~2019

Macro Definition Documentation

◆ MW_CMD_HEADLEN

#define MW_CMD_HEADLEN   (2 * sizeof(uint16_t))

Command header length (command code and data length fields).

Definition at line 27 of file mw-msg.h.

◆ MW_CMD_MAX_BUFLEN

#define MW_CMD_MAX_BUFLEN   (MW_MSG_MAX_BUFLEN - MW_CMD_HEADLEN)

Maximum data length contained inside command buffer.

Definition at line 30 of file mw-msg.h.

◆ MW_GT_AVATAR_HEIGHT

#define MW_GT_AVATAR_HEIGHT   48

Gamertag avatar graphick height in pixels.

Definition at line 46 of file mw-msg.h.

◆ MW_GT_AVATAR_WIDTH

#define MW_GT_AVATAR_WIDTH   32

Gamertag avatar graphick width in pixels.

Definition at line 44 of file mw-msg.h.

◆ MW_GT_NICKNAME_MAX

#define MW_GT_NICKNAME_MAX   32

Gamertag nickname maximum length.

Definition at line 38 of file mw-msg.h.

◆ MW_GT_SECURITY_MAX

#define MW_GT_SECURITY_MAX   32

Gamertag security maximum length.

Definition at line 40 of file mw-msg.h.

◆ MW_GT_TAGLINE_MAX

#define MW_GT_TAGLINE_MAX   32

Gamertag tagline maximum length.

Definition at line 42 of file mw-msg.h.

◆ MW_GT_TG_TOKEN_MAX

#define MW_GT_TG_TOKEN_MAX   64

Telegram token maximum length.

Definition at line 48 of file mw-msg.h.

◆ MW_MSG_MAX_BUFLEN

#define MW_MSG_MAX_BUFLEN   512

Maximum buffer length (bytes)

Definition at line 24 of file mw-msg.h.

◆ MW_PASS_MAXLEN

#define MW_PASS_MAXLEN   64

Maximum password length (including '\0').

Definition at line 35 of file mw-msg.h.

◆ MW_SSID_MAXLEN

#define MW_SSID_MAXLEN   32

Maximum SSID length (including '\0').

Definition at line 33 of file mw-msg.h.

Enumeration Type Documentation

◆ mw_sock_stat

Socket status.

Enumerator
MW_SOCK_NONE 

Unused socket.

MW_SOCK_TCP_LISTEN 

Socket bound and listening.

MW_SOCK_TCP_EST 

TCP socket, connection established.

MW_SOCK_UDP_READY 

UDP socket ready for sending/receiving.

Definition at line 264 of file mw-msg.h.

◆ mw_state

enum mw_state

MwState Possible states of the system state machine.

Enumerator
MW_ST_INIT 

Initialization state.

MW_ST_IDLE 

Idle state, until connected to an AP.

MW_ST_AP_JOIN 

Trying to join an access point.

MW_ST_SCAN 

Scanning access points.

MW_ST_READY 

Connected to The Internet.

MW_ST_TRANSPARENT 

Transparent communication state.

MW_ST_MAX 

Limit number for state machine.

Definition at line 253 of file mw-msg.h.

Variable Documentation

◆ mw_command

enum PACKED mw_command

Supported commands.

Definition at line 51 of file mw-msg.h.

◆ mw_phy_type

enum PACKED mw_phy_type

WiFi PHY configuration for the connection to the AP.

Definition at line 125 of file mw-msg.h.

◆ mw_security

enum PACKED mw_security

Supported security protocols.

Definition at line 115 of file mw-msg.h.