Skip to content

Commit 5191a3c

Browse files
committed
New version.
------------------------------------------------------------------------------- Version 1.1.0 ------------------------------------------------------------------------------- Changes: - The WiShield library now uses a new, more stable TCP/IP stack. The library includes a port of the uIP stack. - Server and client modes supported in the TCP/IP stack. - The limitation of 446 bytes is removed. Larger sized packets can be transmitted and received but will have to be broken down into smaller sized chunks which are <= 346 bytes. - Sample WebServer sketch modified to use the new stack to serve up simple webpages - The stack provides an implementation of the socket interface which can be used to transmit or receive data New features: - Sample WebClient sketch added which demonstrates the operation of sending status updates to a Twitter.com account - ARP client added to periodically send ARP packets to the AP. This was done to prevent certain APs from disconnecting the device due to long periods of inactivity Known issues: None -------------------------------------------------------------------------------
1 parent b813881 commit 5191a3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+9983
-1313
lines changed

README

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@ Async Labs Inc.
44
www.asynclabs.com
55

66
-------------------------------------------------------------------------------
7-
Version 1.0.0
7+
Version 1.1.0
88
-------------------------------------------------------------------------------
9-
This release includes the WiShield and TCP/IP stack files to be used with the
10-
Async Labs WiShield 1.0 wireless devices.
9+
Changes:
10+
- The WiShield library now uses a new, more stable TCP/IP stack. The library
11+
includes a port of the uIP stack.
12+
- Server and client modes supported in the TCP/IP stack.
13+
- The limitation of 446 bytes is removed. Larger sized packets can be
14+
transmitted and received but will have to be broken down into smaller
15+
sized chunks which are <= 346 bytes.
16+
- Sample WebServer sketch modified to use the new stack to serve up simple
17+
webpages
18+
- The stack provides an implementation of the socket interface which can be
19+
used to transmit or receive data
1120

12-
The release includes:
13-
- Driver for ZeroG G2100 series WiFi device (for download instructions, see:
14-
http://asynclabs.com/wiki/)
15-
- Simplified TCP/IP stack for use with the WiShield
16-
- Sample WebServer sketch demonstrating the implementation of a simple
17-
webserver to serve up a webpage when requested from a client browser
18-
application
19-
- Sample LEDControl sketch demonstrating the implementation of a control
20-
application using the webserver mode of the WiShield library.
21+
New features:
22+
- Sample WebClient sketch added which demonstrates the operation of sending
23+
status updates to a Twitter.com account
24+
- ARP client added to periodically send ARP packets to the AP. This was done
25+
to prevent certain APs from disconnecting the device due to long periods of
26+
inactivity
27+
28+
Known issues:
29+
None
2130

WiShield.cpp

Lines changed: 66 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,66 @@
1-
2-
/******************************************************************************
3-
4-
Filename: WiShield.cpp
5-
Description: WiShield library file for the WiShield 1.0
6-
7-
******************************************************************************
8-
9-
TCP/IP stack and driver for the WiShield 1.0 wireless devices
10-
11-
Copyright(c) 2009 Async Labs Inc. All rights reserved.
12-
13-
This program is free software; you can redistribute it and/or modify it
14-
under the terms of version 2 of the GNU General Public License as
15-
published by the Free Software Foundation.
16-
17-
This program is distributed in the hope that it will be useful, but WITHOUT
18-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20-
more details.
21-
22-
You should have received a copy of the GNU General Public License along with
23-
this program; if not, write to the Free Software Foundation, Inc., 59
24-
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25-
26-
Contact Information:
27-
28-
29-
Author Date Comment
30-
---------------------------------------------------------------
31-
AsyncLabs 05/01/2009 Initial version
32-
33-
*****************************************************************************/
34-
35-
extern "C" {
36-
#include "types.h"
37-
#include "config.h"
38-
#include "g2100.h"
39-
#include "stack.h"
40-
}
41-
42-
#include "WProgram.h"
43-
#include "WiShield.h"
44-
45-
void WiShield::init()
46-
{
47-
zg_init(GBLBUF, 0);
48-
attachInterrupt(0, zg_isr, LOW);
49-
}
50-
51-
void WiShield::driver_task()
52-
{
53-
zg_drv_process();
54-
}
55-
56-
void WiShield::stack_task()
57-
{
58-
stack_process();
59-
}
60-
61-
// FIXME : return success or failure
62-
void WiShield::server_listen(U16 port)
63-
{
64-
socket(SOCK_STREAM, port);
65-
}
66-
67-
U8* WiShield::data_available(U16* app_len)
68-
{
69-
*app_len = stack_app_data();
70-
71-
return APPBUF;
72-
}
73-
74-
void WiShield::send_data(U16 app_len)
75-
{
76-
stack_set_app_data(app_len);
77-
}
78-
79-
void WiShield::set_more_data(U8 flag)
80-
{
81-
stack_set_app_more_data(flag);
82-
}
83-
84-
WiShield WiFi;
1+
2+
/******************************************************************************
3+
4+
Filename: WiShield.cpp
5+
Description: WiShield library file for the WiShield 1.0
6+
7+
******************************************************************************
8+
9+
TCP/IP stack and driver for the WiShield 1.0 wireless devices
10+
11+
Copyright(c) 2009 Async Labs Inc. All rights reserved.
12+
13+
This program is free software; you can redistribute it and/or modify it
14+
under the terms of version 2 of the GNU General Public License as
15+
published by the Free Software Foundation.
16+
17+
This program is distributed in the hope that it will be useful, but WITHOUT
18+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20+
more details.
21+
22+
You should have received a copy of the GNU General Public License along with
23+
this program; if not, write to the Free Software Foundation, Inc., 59
24+
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25+
26+
Contact Information:
27+
28+
29+
Author Date Comment
30+
---------------------------------------------------------------
31+
AsyncLabs 05/01/2009 Initial version
32+
AsyncLabs 05/29/2009 Adding support for new library
33+
34+
*****************************************************************************/
35+
36+
extern "C" {
37+
#include "types.h"
38+
#include "global-conf.h"
39+
#include "network.h"
40+
#include "g2100.h"
41+
void stack_init(void);
42+
void stack_process(void);
43+
}
44+
45+
#include "WProgram.h"
46+
#include "WiShield.h"
47+
48+
void WiShield::init()
49+
{
50+
zg_init();
51+
attachInterrupt(0, zg_isr, LOW);
52+
53+
while(zg_get_conn_state() != 1) {
54+
zg_drv_process();
55+
}
56+
57+
stack_init();
58+
}
59+
60+
void WiShield::run()
61+
{
62+
stack_process();
63+
zg_drv_process();
64+
}
65+
66+
WiShield WiFi;

WiShield.h

Lines changed: 53 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,53 @@
1-
2-
/******************************************************************************
3-
4-
Filename: WiShield.h
5-
Description: WiShield library file for the WiShield 1.0
6-
7-
******************************************************************************
8-
9-
TCP/IP stack and driver for the WiShield 1.0 wireless devices
10-
11-
Copyright(c) 2009 Async Labs Inc. All rights reserved.
12-
13-
This program is free software; you can redistribute it and/or modify it
14-
under the terms of version 2 of the GNU General Public License as
15-
published by the Free Software Foundation.
16-
17-
This program is distributed in the hope that it will be useful, but WITHOUT
18-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20-
more details.
21-
22-
You should have received a copy of the GNU General Public License along with
23-
this program; if not, write to the Free Software Foundation, Inc., 59
24-
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25-
26-
Contact Information:
27-
28-
29-
Author Date Comment
30-
---------------------------------------------------------------
31-
AsyncLabs 05/01/2009 Initial version
32-
33-
*****************************************************************************/
34-
35-
#ifndef WISHIELD_H_
36-
#define WISHIELD_H_
37-
38-
extern "C" {
39-
#include "config.h"
40-
#include "spi.h"
41-
}
42-
43-
class WiShield
44-
{
45-
private:
46-
public:
47-
void init();
48-
void driver_task();
49-
void stack_task();
50-
void server_listen(U16 port);
51-
U8* data_available(U16* app_len);
52-
void send_data(U16 app_len);
53-
void set_more_data(U8 flag);
54-
};
55-
56-
extern WiShield WiFi;
57-
58-
#endif /* WISHIELD_H_ */
1+
2+
/******************************************************************************
3+
4+
Filename: WiShield.h
5+
Description: WiShield library file for the WiShield 1.0
6+
7+
******************************************************************************
8+
9+
TCP/IP stack and driver for the WiShield 1.0 wireless devices
10+
11+
Copyright(c) 2009 Async Labs Inc. All rights reserved.
12+
13+
This program is free software; you can redistribute it and/or modify it
14+
under the terms of version 2 of the GNU General Public License as
15+
published by the Free Software Foundation.
16+
17+
This program is distributed in the hope that it will be useful, but WITHOUT
18+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20+
more details.
21+
22+
You should have received a copy of the GNU General Public License along with
23+
this program; if not, write to the Free Software Foundation, Inc., 59
24+
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25+
26+
Contact Information:
27+
28+
29+
Author Date Comment
30+
---------------------------------------------------------------
31+
AsyncLabs 05/01/2009 Initial version
32+
AsyncLabs 05/29/2009 Adding support for new library
33+
34+
*****************************************************************************/
35+
36+
#ifndef WISHIELD_H_
37+
#define WISHIELD_H_
38+
39+
extern "C" {
40+
#include "config.h"
41+
#include "spi.h"
42+
extern unsigned char webclient_get(char *host, unsigned int port, char *file);
43+
}
44+
45+
class WiShield {
46+
public:
47+
void init();
48+
void run();
49+
};
50+
51+
extern WiShield WiFi;
52+
53+
#endif /* WISHIELD_H_ */

apps-conf.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
/******************************************************************************
3+
4+
Filename: apps-conf.h
5+
Description: Web application configuration file
6+
7+
******************************************************************************
8+
9+
TCP/IP stack and driver for the WiShield 1.0 wireless devices
10+
11+
Copyright(c) 2009 Async Labs Inc. All rights reserved.
12+
13+
This program is free software; you can redistribute it and/or modify it
14+
under the terms of version 2 of the GNU General Public License as
15+
published by the Free Software Foundation.
16+
17+
This program is distributed in the hope that it will be useful, but WITHOUT
18+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20+
more details.
21+
22+
You should have received a copy of the GNU General Public License along with
23+
this program; if not, write to the Free Software Foundation, Inc., 59
24+
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25+
26+
Contact Information:
27+
28+
29+
Author Date Comment
30+
---------------------------------------------------------------
31+
AsyncLabs 05/29/2009 Initial port
32+
33+
*****************************************************************************/
34+
35+
#ifndef __APPS_CONF_H__
36+
#define __APPS_CONF_H__
37+
38+
//Here we include the header file for the application(s) we use in our project.
39+
#define APP_WEBSERVER
40+
//#define APP_WEBCLIENT
41+
42+
#ifdef APP_WEBSERVER
43+
#include "webserver.h"
44+
#endif
45+
46+
#ifdef APP_WEBCLIENT
47+
#include "webclient.h"
48+
#endif
49+
50+
#endif /*__APPS_CONF_H__*/

0 commit comments

Comments
 (0)