Skip to content

Commit b7dfe4c

Browse files
committed
Moved ssid out of PROGMEM to allow user to change it on the fly (scanning scenarios).
Fixed example sketches to work with new ssid decl Example sketch "wireless config section" cleanup
1 parent d1b914a commit b7dfe4c

File tree

11 files changed

+141
-173
lines changed

11 files changed

+141
-173
lines changed

config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
extern U8 local_ip[];
4242
extern U8 gateway_ip[];
4343
extern U8 subnet_mask[];
44-
extern const prog_char ssid[];
44+
extern char ssid[];
4545
extern U8 ssid_len;
4646
extern const prog_char security_passphrase[];
4747
extern U8 security_passphrase_len;

examples/Flash/Flash.pde

+22-24
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,37 @@
99
#include <WiShield.h>
1010
#include <dataflash.h>
1111

12-
#define WIRELESS_MODE_INFRA 1
13-
#define WIRELESS_MODE_ADHOC 2
14-
15-
#define FLASH_SLAVE_SELECT 7
16-
#define WIFI_SLAVE_SELECT 10
17-
1812
// Wireless configuration parameters ----------------------------------------
19-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
20-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
21-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
22-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
23-
24-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
13+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
14+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
15+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
16+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
17+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
2518

2619
// WPA/WPA2 passphrase
2720
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2821

2922
// WEP 128-bit keys
30-
// sample HEX keys
31-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
32-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
33-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
34-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
35-
};
36-
37-
// setup the wireless mode
38-
// infrastructure - connect to AP
39-
// adhoc - connect to another WiFi device
23+
prog_uchar wep_keys[] PROGMEM = {
24+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
25+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
26+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
27+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
28+
};
29+
30+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
31+
#define WIRELESS_MODE_INFRA 1
32+
#define WIRELESS_MODE_ADHOC 2
4033
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
41-
4234
unsigned char ssid_len;
4335
unsigned char security_passphrase_len;
44-
//---------------------------------------------------------------------------
36+
// End of wireless configuration parameters ----------------------------------------
37+
38+
// Dataflash configuration parameters ----------------------------------------
39+
#define FLASH_SLAVE_SELECT 7
40+
#define WIFI_SLAVE_SELECT 10
41+
// End of Dataflash configuration parameters ----------------------------------------
42+
4543

4644
unsigned char mfg_id[4];
4745

examples/SimpleClient/SimpleClient.pde

+15-20
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,28 @@
55

66
#include <WiServer.h>
77

8-
#define WIRELESS_MODE_INFRA 1
9-
#define WIRELESS_MODE_ADHOC 2
10-
118
// Wireless configuration parameters ----------------------------------------
12-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
13-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
14-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
15-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
16-
17-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
9+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
10+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
11+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
12+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
13+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
1814

1915
// WPA/WPA2 passphrase
2016
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2117

2218
// WEP 128-bit keys
23-
// sample HEX keys
24-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
25-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
26-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
27-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
28-
};
29-
30-
// setup the wireless mode
31-
// infrastructure - connect to AP
32-
// adhoc - connect to another WiFi device
19+
prog_uchar wep_keys[] PROGMEM = {
20+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
21+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
23+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
24+
};
25+
26+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
27+
#define WIRELESS_MODE_INFRA 1
28+
#define WIRELESS_MODE_ADHOC 2
3329
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
34-
3530
unsigned char ssid_len;
3631
unsigned char security_passphrase_len;
3732
// End of wireless configuration parameters ----------------------------------------

examples/SimpleServer/SimpleServer.pde

+15-20
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,28 @@
55

66
#include <WiServer.h>
77

8-
#define WIRELESS_MODE_INFRA 1
9-
#define WIRELESS_MODE_ADHOC 2
10-
118
// Wireless configuration parameters ----------------------------------------
12-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
13-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
14-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
15-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
16-
17-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
9+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
10+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
11+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
12+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
13+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
1814

1915
// WPA/WPA2 passphrase
2016
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2117

2218
// WEP 128-bit keys
23-
// sample HEX keys
24-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
25-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
26-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
27-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
28-
};
29-
30-
// setup the wireless mode
31-
// infrastructure - connect to AP
32-
// adhoc - connect to another WiFi device
19+
prog_uchar wep_keys[] PROGMEM = {
20+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
21+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
23+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
24+
};
25+
26+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
27+
#define WIRELESS_MODE_INFRA 1
28+
#define WIRELESS_MODE_ADHOC 2
3329
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
34-
3530
unsigned char ssid_len;
3631
unsigned char security_passphrase_len;
3732
// End of wireless configuration parameters ----------------------------------------

examples/SimpleTweeter/SimpleTweeter.pde

+15-20
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,28 @@
44

55
#include <WiServer.h>
66

7-
#define WIRELESS_MODE_INFRA 1
8-
#define WIRELESS_MODE_ADHOC 2
9-
107
// Wireless configuration parameters ----------------------------------------
11-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
12-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
13-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
14-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
15-
16-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
8+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
9+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
10+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
11+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
12+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
1713

1814
// WPA/WPA2 passphrase
1915
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2016

2117
// WEP 128-bit keys
22-
// sample HEX keys
23-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
24-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
25-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
26-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
27-
};
28-
29-
// setup the wireless mode
30-
// infrastructure - connect to AP
31-
// adhoc - connect to another WiFi device
18+
prog_uchar wep_keys[] PROGMEM = {
19+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
20+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
21+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
23+
};
24+
25+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
26+
#define WIRELESS_MODE_INFRA 1
27+
#define WIRELESS_MODE_ADHOC 2
3228
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
33-
3429
unsigned char ssid_len;
3530
unsigned char security_passphrase_len;
3631
// End of wireless configuration parameters ----------------------------------------

examples/SocketApp/SocketApp.pde

+17-21
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,32 @@
66

77
#include <WiShield.h>
88

9-
#define WIRELESS_MODE_INFRA 1
10-
#define WIRELESS_MODE_ADHOC 2
11-
129
// Wireless configuration parameters ----------------------------------------
13-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
14-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
15-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
16-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
17-
18-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
10+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
11+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
12+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
13+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
14+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
1915

2016
// WPA/WPA2 passphrase
2117
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2218

2319
// WEP 128-bit keys
24-
// sample HEX keys
25-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
26-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
27-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
28-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
29-
};
30-
31-
// setup the wireless mode
32-
// infrastructure - connect to AP
33-
// adhoc - connect to another WiFi device
20+
prog_uchar wep_keys[] PROGMEM = {
21+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
23+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
24+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
25+
};
26+
27+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
28+
#define WIRELESS_MODE_INFRA 1
29+
#define WIRELESS_MODE_ADHOC 2
3430
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
35-
3631
unsigned char ssid_len;
3732
unsigned char security_passphrase_len;
38-
//---------------------------------------------------------------------------
33+
// End of wireless configuration parameters ----------------------------------------
34+
3935

4036
void setup()
4137
{

examples/UDPApp/UDPApp.pde

+17-21
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,32 @@
66

77
#include <WiShield.h>
88

9-
#define WIRELESS_MODE_INFRA 1
10-
#define WIRELESS_MODE_ADHOC 2
11-
129
// Wireless configuration parameters ----------------------------------------
13-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
14-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
15-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
16-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
17-
18-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
10+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
11+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
12+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
13+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
14+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
1915

2016
// WPA/WPA2 passphrase
2117
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2218

2319
// WEP 128-bit keys
24-
// sample HEX keys
25-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
26-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
27-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
28-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
29-
};
30-
31-
// setup the wireless mode
32-
// infrastructure - connect to AP
33-
// adhoc - connect to another WiFi device
20+
prog_uchar wep_keys[] PROGMEM = {
21+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
23+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
24+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
25+
};
26+
27+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
28+
#define WIRELESS_MODE_INFRA 1
29+
#define WIRELESS_MODE_ADHOC 2
3430
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
35-
3631
unsigned char ssid_len;
3732
unsigned char security_passphrase_len;
38-
//---------------------------------------------------------------------------
33+
// End of wireless configuration parameters ----------------------------------------
34+
3935

4036
void setup()
4137
{

examples/WebClient/WebClient.pde

+16-20
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,32 @@
66

77
#include <WiShield.h>
88

9-
#define WIRELESS_MODE_INFRA 1
10-
#define WIRELESS_MODE_ADHOC 2
11-
129
// Wireless configuration parameters ----------------------------------------
13-
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
14-
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
15-
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
16-
const prog_char ssid[] PROGMEM = {"ASYNCLABS"}; // max 32 bytes
17-
18-
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
10+
unsigned char local_ip[] = {192,168,1,2}; // IP address of WiShield
11+
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
12+
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
13+
char ssid[] = {"ASYNCLABS"}; // max 32 bytes
14+
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
1915

2016
// WPA/WPA2 passphrase
2117
const prog_char security_passphrase[] PROGMEM = {"12345678"}; // max 64 characters
2218

2319
// WEP 128-bit keys
24-
// sample HEX keys
25-
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
26-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
27-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
28-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
29-
};
20+
prog_uchar wep_keys[] PROGMEM = {
21+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
23+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
24+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
25+
};
3026

31-
// setup the wireless mode
32-
// infrastructure - connect to AP
33-
// adhoc - connect to another WiFi device
27+
// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
28+
#define WIRELESS_MODE_INFRA 1
29+
#define WIRELESS_MODE_ADHOC 2
3430
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
35-
3631
unsigned char ssid_len;
3732
unsigned char security_passphrase_len;
38-
//---------------------------------------------------------------------------
33+
// End of wireless configuration parameters ----------------------------------------
34+
3935

4036
void setup()
4137
{

0 commit comments

Comments
 (0)