SystemBase Portbase-3010 User Manual page 114

Serial-to-ethernet device server
Table of Contents

Advertisement

Portbase User Guide
|
write()- –-- Send a HTML file and others in response to the request from server.
|
read()----Wait until the server requests a sendto.
3) Operation Environment
O/S : Linux or Unix
Tool : Linux or Unix Compiler
4) Result (Active Programming)
If the user designates the IP address of a specific Portbase and starts the program, "This is
LoopBack Data!" is repeatedly transmitted at 3 second intervals and received data will be
displayed on screen.
5) How to Run
Plug the first Portbase serial port to the loopback connector. (The port is connected to socket
4001.)
If you run the program, message "This is LoopBack Data! " returns and is repeatedly displayed
on screen.
6) Source Code
//Inserts the necessary header files.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/un.h>
#include <string.h>
//Inserts the necessary global variable, and declares the function.
int sock;//Variable for saving the socket handle.
void SendData(void);
void GetData(void);
114

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Portbase-3010 and is the answer not in the manual?

Table of Contents