Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
In the IDE Wizard there is the above configuration page where UDP sockets are set up.
QUESTION: How can I open a UDP connection?
There are 3 ways to open a UDP Connection:
Flyport can be a Server for point to multipoint (broadcast, only transmission is available), or point to
point (server, both tx and rx available). In this case the Framework needs only the port number to
open for the connection.
Flyport can also open a connection as a Client, but in this case the Framework needs the Server IP
Address and also the UDP port.
To Open Broadcast connection → UDPBroadcastOpen(char[] udpport);
This function opens a server broadcast connection at the specific port number
Parameters:
udpport: the port to open for the connection
Returns:
BYTE of Socket number
To Open Server connection → UDPServerOpen(char[] udpport);
This function opens a server point to point connection at the specific port number
Parameters:
udpport: the port to open for the connection
Returns:
BYTE of Socket number
To Close them (both are server) → UDPServerClose(BYTE sock);
This function close the server connection at the specific socket number
Parameters:
sock: BYTE of Socket number
To Open Client connection → UDPClientOpen( char * udpaddr,
char[] udpport);
This function opens a client connection at the specific server address and port number
Parameters:
udpaddr: the server ip address
udpport: the port to open for the connection
Returns:
BYTE of Socket number
To Close Client connection → UDPClientClose(BYTE sock);
This function close the client connection at the specific socket number
Parameters:
sock: BYTE of Socket number
Every UDP Socket has its own RX buffer, so reading is handled automatically by Operating System.
To know the RX bytes length → UDPRxLen(BYTE sock);
This function reads the number of bytes available at the specific socket number
Parameters:
sock: BYTE of Socket number
45










