1010
1111/*
1212 * OPTION A: Configure for Arduino WiFi shield
13+ *
14+ * This will configure StandardFirmataWiFi to use the original WiFi library (deprecated) provided
15+ * with the Arduino IDE. It is supported by the Arduino WiFi shield (a discontinued product) and
16+ * is compatible with 802.11 B/G networks.
1317 *
14- * To configure StandardFirmataWiFi to use the Arduino WiFi shield based on the HDG204 Wireless LAN 802.11b/g
18+ * To configure StandardFirmataWiFi to use the Arduino WiFi shield
1519 * leave the #define below uncommented.
1620 */
1721#define ARDUINO_WIFI_SHIELD
@@ -24,10 +28,13 @@ WiFiStream stream;
2428
2529/*
2630 * OPTION B: Configure for WiFi 101
31+ *
32+ * This will configure StandardFirmataWiFi to use the WiFi101 library, which works with the Arduino WiFi101
33+ * shield and devices that have the WiFi101 chip built in (such as the MKR1000). It is compatible
34+ * with 802.11 B/G/N networks.
2735 *
28- * To configure StandardFirmataWiFi to use the WiFi 101 library, either for the WiFi 101 shield or
29- * any boards that include the WiFi 101 chip (such as the MKR1000), comment out the '#define ARDUINO_WIFI_SHIELD'
30- * under OPTION A above, and uncomment the #define WIFI_101 below.
36+ * To enable, uncomment the #define WIFI_101 below and verify the #define values under
37+ * options A and C are commented out.
3138 *
3239 * IMPORTANT: You must have the WiFI 101 library installed. To easily install this library, opent the library manager via:
3340 * Arduino IDE Menus: Sketch > Include Library > Manage Libraries > filter search for "WiFi101" > Select the result and click 'install'
@@ -42,10 +49,12 @@ WiFi101Stream stream;
4249
4350/*
4451 * OPTION C: Configure for HUZZAH
52+ *
53+ * HUZZAH is not yet supported, this will be added in a later revision to StandardFirmataWiFi
4554 */
4655
4756//------------------------------
48- // TODO
57+ // TODO
4958//------------------------------
5059//#define HUZZAH_WIFI
5160
@@ -64,38 +73,51 @@ char ssid[] = "your_network_name";
6473#define SERVER_PORT 3030
6574
6675// STEP 5 [REQUIRED for all boards and shields]
67- // determine your network security type (OPTION A, B, or C)
76+ // determine your network security type (OPTION A, B, or C). Option A is the most common, and the default.
77+
6878
6979/*
70- * OPTION A: Open network (no security)
71- *
72- * To connect to an open network, leave WIFI_NO_SECURITY uncommented and
73- * do not uncomment the #define values under options B or C
80+ * OPTION A: WPA / WPA2
81+ *
82+ * WPA is the most common network security type. A passphrase is required to connect to this type.
83+ *
84+ * To enable, leave #define WIFI_WPA_SECURITY uncommented below, set your wpa_passphrase value appropriately,
85+ * and do not uncomment the #define values under options B and C
7486 */
75- //#define WIFI_NO_SECURITY
87+ #define WIFI_WPA_SECURITY
88+
89+ #ifdef WIFI_WPA_SECURITY
90+ char wpa_passphrase [] = "your_wpa_passphrase" ;
91+ #endif //WIFI_WPA_SECURITY
7692
7793/*
7894 * OPTION B: WEP
7995 *
80- * Uncomment the #define below and set your wep_index and wep_key values appropriately
96+ * WEP is a less common (and regarded as less safe) security type. A WEP key and its associated index are required
97+ * to connect to this type.
98+ *
99+ * To enable, Uncomment the #define below, set your wep_index and wep_key values appropriately, and verify
100+ * the #define values under options A and C are commented out.
81101 */
82102//#define WIFI_WEP_SECURITY
83103
84104#ifdef WIFI_WEP_SECURITY
105+ //The wep_index below is a zero-indexed value.
106+ //Valid indices are [0-3], even if your router/gateway numbers your keys [1-4].
85107byte wep_index = 0 ;
86108char wep_key [] = "your_wep_key" ;
87109#endif //WIFI_WEP_SECURITY
88110
111+
89112/*
90- * OPTION C: WPA / WPA2
113+ * OPTION C: Open network (no security)
114+ *
115+ * Open networks have no security, can be connected to by any device that knows the ssid, and are unsafe.
91116 *
92- * Uncomment the #define below and set your passphrase appropriately
117+ * To enable, uncomment #define WIFI_NO_SECURITY below and verify the #define values
118+ * under options A and B are commented out.
93119 */
94- #define WIFI_WPA_SECURITY
95-
96- #ifdef WIFI_WPA_SECURITY
97- char wpa_passphrase [] = "your_wpa_passphrase" ;
98- #endif //WIFI_WPA_SECURITY
120+ //#define WIFI_NO_SECURITY
99121
100122/*==============================================================================
101123 * CONFIGURATION ERROR CHECK (don't change anything here)
0 commit comments