Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
Contents
Flyport Overview..................................................................................................................................6
Flyport Hardware.............................................................................................................................6
Bootloader ......................................................................................................................................7
Pinout...............................................................................................................................................9
Hardware functions............................................................................................................................11
Digital Inputs and Outputs.............................................................................................................11
Digital I/Os Functions................................................................................................................12
Remappable Pins...........................................................................................................................15
Remappable Pins Functions......................................................................................................16
Analog Inputs.................................................................................................................................17
Analog Inputs Functions............................................................................................................18
PWMs.............................................................................................................................................19
PWM function...........................................................................................................................20
Serial Communication (UART)........................................................................................................22
UART Functions.........................................................................................................................23
I2C Communication Protocol.........................................................................................................25
I2C Basic Functions....................................................................................................................25
Accessing memory registers of slave devices...........................................................................26
RTCC module..................................................................................................................................28
RTCC APIs...................................................................................................................................28
Using the TCP/IP Stack .......................................................................................................................30
Managing the Network..................................................................................................................30
The Connection Profiles............................................................................................................30
Ethernet Connection Functions................................................................................................32
Wi-Fi Connection Functions......................................................................................................32
Customizing Network Parameters at Runtime..........................................................................35
Network Functions and Variables.............................................................................................37
TCP Protocol...................................................................................................................................39
TCP Functions............................................................................................................................39
TCP Usage..................................................................................................................................42
UDP Protocol..................................................................................................................................44
UDP Functions...........................................................................................................................44
UDP Usage Example..................................................................................................................47
SMTP Protocol................................................................................................................................48
FTP Client.......................................................................................................................................50
FTP High level functions............................................................................................................50
FTP Low level functions.............................................................................................................54
The Webserver and HTTPApp.c.....................................................................................................56
What is a Webserver and How It Works...................................................................................56
Flyport Webserver and How It Works.......................................................................................56
Dynamic Variables.....................................................................................................................58
AJAX in Action...........................................................................................................................63
4










