Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of WiflyInterface by
WiflyInterface Class Reference
Interface using Wifly to connect to an IP-based network. More...
#include <WiflyInterface.h>
Inherits Wifly.
Public Member Functions | |
WiflyInterface (PinName tx, PinName rx, PinName reset, PinName tcp_status, const char *ssid, const char *phrase, Security sec=NONE) | |
Constructor. | |
int | init () |
Initialize the interface with DHCP. | |
int | init (const char *ip, const char *mask, const char *gateway) |
Initialize the interface with a static IP address. | |
int | connect () |
Connect Bring the interface up, start DHCP if needed. | |
int | disconnect () |
Disconnect Bring the interface down. | |
char * | getIPAddress () |
Get IP address. |
Detailed Description
Interface using Wifly to connect to an IP-based network.
Definition at line 28 of file WiflyInterface.h.
Constructor & Destructor Documentation
WiflyInterface | ( | PinName | tx, |
PinName | rx, | ||
PinName | reset, | ||
PinName | tcp_status, | ||
const char * | ssid, | ||
const char * | phrase, | ||
Security | sec = NONE |
||
) |
Constructor.
- Parameters:
-
tx mbed pin to use for tx line of Serial interface rx mbed pin to use for rx line of Serial interface reset reset pin of the wifi module () tcp_status connection status pin of the wifi module (GPIO 6) ssid ssid of the network phrase WEP or WPA key sec Security type (NONE, WEP_128 or WPA)
Definition at line 3 of file WiflyInterface.cpp.
Member Function Documentation
int connect | ( | ) |
Connect Bring the interface up, start DHCP if needed.
- Returns:
- 0 on success, a negative number on failure
Definition at line 30 of file WiflyInterface.cpp.
int disconnect | ( | ) |
Disconnect Bring the interface down.
- Returns:
- 0 on success, a negative number on failure
Definition at line 35 of file WiflyInterface.cpp.
char * getIPAddress | ( | ) |
int init | ( | const char * | ip, |
const char * | mask, | ||
const char * | gateway | ||
) |
Initialize the interface with a static IP address.
Initialize the interface and configure it with the following static configuration (no connection at this point).
- Parameters:
-
ip the IP address to use mask the IP address mask gateway the gateway to use
- Returns:
- 0 on success, a negative number on failure
Definition at line 17 of file WiflyInterface.cpp.
int init | ( | void | ) |
Initialize the interface with DHCP.
Initialize the interface and configure it to use DHCP (no connection at this point).
- Returns:
- 0 on success, a negative number on failure
Definition at line 10 of file WiflyInterface.cpp.
Generated on Tue Jul 12 2022 17:30:36 by
