API  2.2
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
tsmart_xbee_wifi_config_device_t Struct Reference

Configuration for XBee wifi. More...

#include <tsmart_xbee_wifi.h>

Data Fields

tsmart_xbee_wifi_network_type_t network_type
 
uint8_t baud_rate
 
tsmart_xbee_wifi_flow_control_t flow_control
 
uint8_t timeout_connection
 
tsmart_xbee_wifi_flag_t dhcp
 
uint16_t local_port
 
tsmart_xbee_wifi_ip_t local_ip
 
uint8_t channel
 
tsmart_xbee_wifi_mask_t mask
 
tsmart_xbee_wifi_ip_t ip_gw
 
tsmart_xbee_wifi_ip_t dest_ip
 
uint16_t dest_port
 
tsmart_xbee_wifi_protocol_t protocol
 
uint8_t power_signal
 
uint8_t speed_channel
 
uint8_t ssid [PR_TSMART_XBEE_WIFI_MAX_SSID_SIZE]
 
uint8_t ssid_size
 
encriptation_type_t encryption_type
 
uint8_t security_key [PR_TSMART_XBEE_WIFI_MAX_KEY_SIZE]
 
uint8_t security_key_size
 
tsmart_xbee_wifi_flag_t api
 

Detailed Description

Configuration for XBee wifi.

Examples:
wifi_receiver.c, and wifi_sender.c.

Field Documentation

Configures API mode:

  • TSMART_XBEE_WIFI_ENABLE
  • TSMART_XBEE_WIFI_DISABLE

The default value for this parameter is: TSMART_XBEE_WIFI_ENABLE.

Examples:
wifi_receiver.c, and wifi_sender.c.
uint8_t baud_rate

Baud Rate:

  • 0 - 1200
  • 1 - 2400
  • 2 - 4800
  • 3 - 9600
  • 4 - 19200
  • 5 - 38400
  • 6 - 57600

The default value for this parameter is: 3.

uint8_t channel

Set the channel number when the type of network is configured for Adhoc creator mode. when using Adhoc mode, not all channels are available in all countries. It is the responsibility of the installer to use the appropriate channels. Range: 0x00 - 0x0E.

The default value for this parameter is: 0x02.

Destination IP. The default value for this parameter is 0.0.0.0

Examples:
wifi_receiver.c, and wifi_sender.c.
uint16_t dest_port

Destination UDP/TCP service port. The default value for this parameter is: 9750

Examples:
wifi_receiver.c, and wifi_sender.c.

Configures DCHP mode:

  • TSMART_XBEE_WIFI_ENABLE
  • TSMART_XBEE_WIFI_DISABLE

The default value for this parameter is: TSMART_XBEE_WIFI_ENABLE.

Examples:
wifi_receiver.c, and wifi_sender.c.
encriptation_type_t encryption_type

Selects encrytation security type:

  • TSMART_XBEE_WIFI_NONE - No security
  • TSMART_XBEE_WIFI_WEP - Wired Equivalency Protocol
  • TSMART_XBEE_WIFI_WPA - Wi-Fi Protected Access
  • TSMART_XBEE_WIFI_WPA2 - WPA with AES-based encryption

The default value for this parameter is: TSMART_XBEE_WIFI_NONE.

Specifies whether the hardware flow control mode is enabled or disabled. This parameter shall be selected amongst the following values:

  • TSMART_XBEE_WIFI_FLOW_CONTROL_DISABLE
  • TSMART_XBEE_WIFI_FLOW_CONTROL_CTS
  • TSMART_XBEE_WIFI_FLOW_CONTROL_RTS
  • TSMART_XBEE_WIFI_FLOW_CONTROL_RTS_CTS

The default value for this parameter is: TSMART_XBEE_WIFI_FLOW_CONTROL_DISABLE .

IP address for the gateway, only for static IP address configuration. The default value for this parameter is: 0.0.0.0

IP network address, only for static IP address configuration. The default value for this parameter is: 0.0.0.0.

Examples:
wifi_receiver.c, and wifi_sender.c.
uint16_t local_port

Local service port. The default value for this parameter is: 9750.

Examples:
wifi_receiver.c, and wifi_sender.c.

IP address mask, only for static IP address configuration. The default value for this parameter is: 0.0.0.0

Examples:
wifi_receiver.c, and wifi_sender.c.

Network Type. Supported modes:

  • TSMART_XBEE_WIFI_IBSS_JOINER - Joiner to available to hoc wireless network
  • TSMART_XBEE_WIFI_IBSS_CREATOR - Creator of the ad-hoc wireless network
  • TSMART_XBEE_WIFI_INFRAESTRUCTURE - infrastructure wireless network

The default value for this parameter is: TSMART_XBEE_WIFI_INFRAESTRUCTURE.

Examples:
wifi_receiver.c, and wifi_sender.c.
uint8_t power_signal

The power level at which the RF module transmits conducted power. The default value for this parameter is: 0.

Set protocol:

  • TSMART_XBEE_WIFI_UDP
  • TSMART_XBEE_WIFI_TCP

The default value for this parameter is: TSMART_XBEE_WIFI_TCP.

uint8_t security_key[PR_TSMART_XBEE_WIFI_MAX_KEY_SIZE]

Set the security key used for WEP, WPA and WPA2 security which may be up to 31 ASCII characters. The default value for this parameter is: "0000".

uint8_t security_key_size

Security key size. The default value for this parameter is: 4.

Examples:
wifi_receiver.c, and wifi_sender.c.
uint8_t speed_channel

Bit Rate of IBSS Creator. Data rates MCS0-7 are 802.11n data rates from 6.5 Mbp to 65Mbps. It's supported following values:

  • 0 - Auto-rate
  • 1 - 1 Mbps
  • 2 - 2 Mbps
  • 3 - 5.5 Mbps
  • 4 - 11 Mbps
  • 5 - 6 Mbps
  • 6 - 9 Mbps
  • 7 - 12 Mbps
  • 8 - 18 Mbps
  • 9 - 24 Mbps
  • 0x0A - 36 Mbps
  • 0x0B - 48 Mbps
  • 0x0C - 54 Mbps
  • 0x0D - MCS0
  • 0x0E - MCS1
  • 0x0F - MCS2
  • 0x10 - MCS3
  • 0x11 - MCS4
  • 0x12 - MCS5
  • 0x13 - MCS6
  • 0x14 - MCS7

The default value for this parameter is: 0.

uint8_t ssid[PR_TSMART_XBEE_WIFI_MAX_SSID_SIZE]

The SSID of the access point, which may be up to 31 ASCII characters. The default value for this parameter is: "AAA"

Examples:
wifi_receiver.c, and wifi_sender.c.
uint8_t ssid_size

Size of the ssid. The default value for this parameter is: 3

Examples:
wifi_receiver.c, and wifi_sender.c.
uint8_t timeout_connection

The timeout for connection on TCP socket. If 0, socket closes immediately after data sent. Range: 0x00 - 0xFF.

The default value for this parameter is: 0x0A.