Skip to content

Commit fe9d5f7

Browse files
committed
Initial release
0 parents  commit fe9d5f7

38 files changed

+5724
-0
lines changed

FullIP.h

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*!
2+
\brief FullIP for Arduino
3+
\mainpage
4+
5+
FullIP is a suite of ip protocols implementation.
6+
7+
https://github.com/bibi21000/arduino-fullip
8+
9+
It can be use the official ethernet shield
10+
And with Enc28j60.
11+
12+
Copyright (C) 2013 by Sébastien GALLET <[email protected]>
13+
14+
-----------------
15+
16+
This program is free software: you can redistribute it and/or modify
17+
it under the terms of the GNU General Public License as published by
18+
the Free Software Foundation, either version 3 of the License, or
19+
(at your option) any later version.
20+
21+
This program is distributed in the hope that it will be useful,
22+
but WITHOUT ANY WARRANTY; without even the implied warranty of
23+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24+
GNU General Public License for more details.
25+
26+
You should have received a copy of the GNU General Public License
27+
along with this program. If not, see <http://www.gnu.org/licenses/>.
28+
29+
*/
30+
31+
#ifndef FULLIP_H
32+
#define FULLIP_H
33+
34+
//FullIP configuration parameters
35+
//===============================
36+
37+
///Uncomment to build with the enc28j60 using UIPEthernet
38+
//#define FULLIP_UIP ///Comment this line to build with the official Ethernet library (w5100)
39+
40+
///Uncomment to build the ftp client and the http server
41+
///Also add SD.h to your sketch
42+
#define FULLIP_SD
43+
44+
/// Turn on debug messages in smtp client
45+
//#define FULLIP_DEBUG_SMTP
46+
47+
///\def Turn on debug messages in telnet server
48+
//#define FULLIP_DEBUG_TELNET
49+
50+
/// Turn on debug messages in http server
51+
//#define FULLIP_DEBUG_HTTP
52+
53+
/// Turn on debug messages in ftp client
54+
//#define FULLIP_DEBUG_FTP
55+
56+
//===============================
57+
58+
#ifdef FULLIP_SD
59+
#include "SD.h"
60+
#endif
61+
62+
#ifndef FULLIP_UIP
63+
#define FULLIP_ETHERNET
64+
#endif
65+
66+
#ifdef FULLIP_ETHERNET
67+
#include "Ethernet.h"
68+
#include "EthernetClient.h"
69+
#include "EthernetServer.h"
70+
#endif
71+
72+
#ifdef FULLIP_UIP
73+
#include "UIPEthernet.h"
74+
#include "UIPClient.h"
75+
#include "UIPServer.h"
76+
#endif
77+
78+
#include "utility/HttpServer.h"
79+
#include "utility/TelnetServer.h"
80+
#include "utility/SmtpClient.h"
81+
#include "utility/FtpClient.h"
82+
83+
#endif
84+

README.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
2+
Welcome to FullIP documentation!
3+
********************************
4+
5+
FullIP for Arduino (https://github.com/bibi21000/arduino-fullip)
6+
7+
FullIP is a suite of ip protocols implementation for Arduino.
8+
9+
It can be use the official ethernet shield And with Enc28j60.
10+
11+
Copyright (C) 2013 by Sébastien GALLET <[email protected]>
12+
13+
This program is free software: you can redistribute it and/or modify
14+
it under the terms of the GNU General Public License as published by
15+
the Free Software Foundation, either version 3 of the License, or (at
16+
your option) any later version.
17+
18+
This program is distributed in the hope that it will be useful, but
19+
WITHOUT ANY WARRANTY; without even the implied warranty of
20+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21+
General Public License for more details.
22+
23+
You should have received a copy of the GNU General Public License
24+
along with this program. If not, see <http://www.gnu.org/licenses/>.
25+
26+
27+
Installation
28+
============
29+
30+
* Download the library from github () and install it in your
31+
libraries
32+
33+
* Update FullIP.h according to your hardware
34+
35+
* comment #define FULLIP_UIP to build with official shield
36+
(w5100) or uncomment it to build with enc28j60 and UIPEthernet
37+
38+
* comment #define FULLIP_SD to disable SD or uncomment it to
39+
build ftpclient, httpserver, ...
40+
41+
42+
Usage
43+
=====
44+
45+
In your sketch :
46+
47+
* import the Ethernet library or the UIPEthernet and the SD if
48+
needed :
49+
50+
// For W5100
51+
//You must also update FullIP/FullIP.h
52+
#include <SPI.h>
53+
#include <Ethernet.h>
54+
55+
//For enc28j60
56+
//You must also update FullIP/FullIP.h
57+
//#include <UIPEthernet.h>
58+
59+
#include <SD.h>
60+
#include <FullIP.h>
61+
62+
* Define a client (FTP in this example)
63+
64+
FtpClient ftpclient;
65+
66+
- Start it in your setup
67+
68+
ftpclient.begin(server_name,user_name,password);
69+
70+
- Get the file
71+
72+
ftpclient.getFile(filename,local_dir,remote_dir);
73+
74+
- And process it in your loop
75+
76+
ftpclient.maintain();
77+
78+
That's all !!!
79+
80+
Look at doc and examples to get more informations.

doc/ftpclient.txt

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
2+
FullIP FTP Client
3+
*****************
4+
5+
Download and install FullIP (Look at *Installation*).
6+
7+
Uncomment #define FULLIP_SD to enable SD in FullIP.h.
8+
9+
Class definition
10+
11+
*class* **FtpClient**
12+
13+
The FTP client.
14+
15+
*Public Functions*
16+
17+
uint8_t **begin**(const IPAddress & aFTPServer, const char * userstr, const char * passstr)
18+
19+
Initialize FTP the ftp client
20+
21+
**Return**
22+
1 if the operation succeed. 0 if it fails.
23+
24+
**Parameters**
25+
* "aFTPServer" -
26+
the IPAddress of the FTP server.
27+
28+
* "userstr" -
29+
the user used to connect to the server.
30+
31+
* "passstr" -
32+
the password of the user.
33+
34+
uint8_t **begin**(const char * aFTPHost, const char * userstr, const char * passstr)
35+
36+
Initialize FTP the ftp client
37+
38+
**Return**
39+
1 if the operation succeed. 0 if it fails.
40+
41+
**Parameters**
42+
* "aFTPHost" -
43+
the host name of the FTP server.
44+
45+
* "userstr" -
46+
the user used to connect to the server.
47+
48+
* "passstr" -
49+
the password of the user.
50+
51+
uint8_t **end**()
52+
53+
Release ressources Must be called if you don't want to send
54+
file anymore
55+
56+
uint8_t **sendFile**(const char * filename, const char * localdir, const char * remotedir)
57+
58+
Send a file
59+
60+
**Return**
61+
1 if the file is in queue. 0 if it fails.
62+
63+
**Parameters**
64+
* "filename" -
65+
the name of the file to transfer.
66+
67+
* "localdir" -
68+
the local directory.
69+
70+
* "remotedir" -
71+
the remote directory.
72+
73+
uint8_t **getFile**(const char * filename, const char * localdir, const char * remotedir)
74+
75+
Get a file
76+
77+
**Return**
78+
1 if the file is in queue. 0 if it fails.
79+
80+
**Parameters**
81+
* "filename" -
82+
the name of the file to transfer.
83+
84+
* "localdir" -
85+
the local directory.
86+
87+
* "remotedir" -
88+
the remote directory.
89+
90+
void **maintain**()
91+
92+
Send the file in "background" Must be called in your loop
93+
94+
uint8_t **isSent**()
95+
96+
Was the last file sent ?
97+
98+
**Return**
99+
1 if the file was sent.
100+
101+
uint8_t **isReceived**()
102+
103+
Was the last file received ?
104+
105+
**Return**
106+
1 if the file was received.
107+
108+
*Public Members*
109+
110+
long **lastResponse**
111+
112+
The last response code sent by the server.
113+
114+
long **lastTransfer**
115+
116+
The last response code sent by the server for the file
117+
transfer.
118+
119+
unsigned long **stats_start**
120+
121+
The start of the transfer. Only available is compiled with
122+
FULLIP_DEBUG_STATS directive.
123+
124+
unsigned long **stats_duration**
125+
126+
The duration of the transfer. Only available is compiled with
127+
FULLIP_DEBUG_STATS directive.
128+
129+
unsigned long **stats_size**
130+
131+
The size of data sent. Only available is compiled with
132+
FULLIP_DEBUG_STATS directive.

0 commit comments

Comments
 (0)