WiFiSDCoopLib::WiFiSDCoopLib() {
	_init();
	setSSID("default");
	setPass("");
	_fileBuffer[0] = '\0';
	_fileBufferPos = 0;
}
Beispiel #2
0
bool JPWiFly::joinNetwork(const char *ssid, const char *password, bool dhcp, uint8_t mode) {
	StCommand st(this);

	setJoin(WIFLY_WLAN_JOIN_AUTO);
	setChannel(0);
	setSSID(ssid);
	if (mode == WIFLY_MODE_WPA)
		setPassphrase(password);
	else
		setKey(password);

	if (dhcp)
		enableDHCP();
	return join(ssid, 20000);
}
Beispiel #3
0
bool JPWiFly::createApModeNetwork(const char *ssid, int channel, const int port) {
	StCommand st(this);
	setJoin(WIFLY_WLAN_JOIN_APMODE);
	setChannel(channel);
	setSSID(ssid);
	setDHCP(WIFLY_DHCP_MODE_SERVER);
	setPort(port);
	setIP(PSTR("1.2.3.4"));
	setNetmask(PSTR("255.255.255.0"));
	setGateway(PSTR("1.2.3.4"));
	
	save();
	reboot();
	return true;
}
Beispiel #4
0
WiFiLib::WiFiLib() {
	setSSID("default");
	setPass("");
}