Skip to content

Commit 663d9f8

Browse files
authored
Merge pull request #1 from arduino-libraries/master
Update fork
2 parents ec51ae9 + a2aa01d commit 663d9f8

File tree

18 files changed

+295
-129
lines changed

18 files changed

+295
-129
lines changed

.travis.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
language: generic
22
env:
33
global:
4-
- IDE_VERSION=1.6.8
4+
- IDE_VERSION=1.6.11
55
matrix:
66
- BOARD="arduino:avr:uno"
7-
- BOARD="arduino:avr:leonardo"
87
- BOARD="arduino:avr:mega:cpu=atmega2560"
98
- BOARD="arduino:sam:arduino_due_x_dbg"
109
- BOARD="arduino:samd:arduino_zero_edbg"
1110
- BOARD="arduino:samd:mkr1000"
1211
- BOARD="Intel:arc32:arduino_101"
13-
matrix:
14-
allow_failures:
15-
- env: BOARD="arduino:avr:leonardo"
16-
- env: BOARD="arduino:sam:arduino_due_x_dbg"
17-
- env: BOARD="Intel:arc32:arduino_101"
1812
before_install:
1913
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
2014
- sleep 3
@@ -47,6 +41,7 @@ script:
4741
- buildExampleSketch ScanNetworks
4842
- buildExampleSketch SimpleWebServerWiFi
4943
- buildExampleSketch WiFiChatServer
44+
- buildExampleSketch WiFiPing
5045
- buildExampleSketch WiFiSSLClient
5146
- buildExampleSketch WiFiUdpNtpClient
5247
- buildExampleSketch WiFiUdpSendReceiveString

CHANGELOG

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
WiFi101 ?.?.? - ????.??.??
2+
3+
*
4+
5+
WiFi101 0.10.0 - 2016.09.08
6+
7+
* Added WiFi.end() to disconnect from the AP or end AP mode
8+
* Added new WiFi.ping(...) functionality. Thanks @PKGeorgiev
9+
* Added WiFi.setPins(...) to customize the CS, INTN, RESET and CHIPEN pins
10+
* Add new WL_AP_LISTENING, WL_AP_CONNECTED, and WL_AP_FAILED status types for AP mode
11+
* Fixed return value of WiFiUDP::beginPacket(host, port) when host is successfully resolved
12+
* Added power management methods: WiFi.lowPowerMode(), WiFi.maxLowPowerMode(), WiFi.noLowPowerMode()
13+
* Close TCP sockets when physical link is disconnected
14+
* Fixed WiFi.RSSI() returning 0 when there was pending socket data
15+
116
WiFi101 0.9.1 - 2016.04.19
217

318
* Increased compatibility with 3rd party boards and architectures.

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
= Wifi library for the Arduino Wifi 101 Shield and MKR1000 board =
1+
= WiFi library for the Arduino WiFi Shield 101 and MKR1000 board =
22

33
image:https://travis-ci.org/arduino-libraries/WiFi101.svg?branch=master["Build Status", link="https://travis-ci.org/arduino-libraries/WiFi101"]
44

55
This library implements a network driver for devices based
6-
on the ATMEL WINC1500 wifi module.
6+
on the ATMEL WINC1500 WiFi module.
77

88
For more information about this library please visit us at
99
https://www.arduino.cc/en/Reference/WiFi101

examples/AP_SimpleWebServer/AP_SimpleWebServer.ino

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ void setup() {
5151
Serial.println(ssid);
5252

5353
// Create open network. Change this line if you want to create an WEP network:
54-
if (WiFi.beginAP(ssid) != WL_CONNECTED) {
54+
status = WiFi.beginAP(ssid);
55+
if (status != WL_AP_LISTENING) {
5556
Serial.println("Creating access point failed");
5657
// don't continue
5758
while (true);
@@ -69,6 +70,20 @@ void setup() {
6970

7071

7172
void loop() {
73+
// compare the previous status to the current status
74+
if (status != WiFi.status()) {
75+
// it has changed update the variable
76+
status = WiFi.status();
77+
78+
if (status == WL_AP_CONNECTED) {
79+
// a device has connected to the AP
80+
Serial.println("Device connected to AP");
81+
} else {
82+
// a device has disconnected from the AP, and we are back in listening mode
83+
Serial.println("Device disconnected from AP");
84+
}
85+
}
86+
7287
WiFiClient client = server.available(); // listen for incoming clients
7388

7489
if (client) { // if you get a client,

examples/WiFiPing/WiFiPing.ino

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int status = WL_IDLE_STATUS; // the Wifi radio's status
2222

2323
// Specify IP address or hostname
2424
String hostName = "www.google.com";
25-
byte pingResult;
25+
int pingResult;
2626

2727
void setup() {
2828
// Initialize serial and wait for port to open:
@@ -57,20 +57,19 @@ void setup() {
5757
}
5858

5959
void loop() {
60-
6160
Serial.print("Pinging ");
6261
Serial.print(hostName);
6362
Serial.print(": ");
64-
63+
6564
pingResult = WiFi.ping(hostName);
66-
65+
6766
if (pingResult == WL_PING_SUCCESS) {
6867
Serial.println("SUCCESS!");
6968
} else {
7069
Serial.print("FAILED! Error code: ");
71-
Serial.println(pingResult);
72-
};
73-
70+
Serial.println(pingResult);
71+
}
72+
7473
delay(3000);
7574
}
7675

examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void setup() {
4848
Serial.print("Attempting to connect to SSID: ");
4949
Serial.println(ssid);
5050
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
51-
status = WiFi.begin(ssid);
51+
status = WiFi.begin(ssid, pass);
5252

5353
// wait 10 seconds for connection:
5454
delay(10000);

keywords.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Server KEYWORD1
1515
# Methods and Functions (KEYWORD2)
1616
#######################################
1717

18+
setPins KEYWORD2
1819
status KEYWORD2
1920
connect KEYWORD2
2021
connectSSL KEYWORD2
@@ -43,6 +44,10 @@ WiFiServer KEYWORD2
4344
WiFiSSLClient KEYWORD2
4445
WiFiMDNSResponder KEYWORD2
4546

47+
lowPowerMode KEYWORD2
48+
maxLowPowerMode KEYWORD2
49+
noLowPowerMode KEYWORD2
50+
4651
#######################################
4752
# Constants (LITERAL1)
4853
#######################################

library.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name=WiFi101
2-
version=0.9.1
2+
version=0.10.0
33
author=Arduino
44
maintainer=Arduino <[email protected]>
55
sentence=Network driver for ATMEL WINC1500 module (used on Arduino/Genuino Wifi Shield 101 and MKR1000 boards)
66
paragraph=This library implements a network driver for devices based on the ATMEL WINC1500 wifi module
77
category=Communication
88
url=http://www.arduino.cc/en/Reference/WiFi101
99
architectures=*
10+
includes=WiFi101.h

0 commit comments

Comments
 (0)