Serial Port Digi Connect ME9210

Hey

I wanna programm the serial Port.
I have a Digi Connect ME9210 modul an the Developmentboard from Digi.
I use the DigiESP software.
Now I wanna programm that the DigiModul send and receve data over the serial port 1 and not over the ehternet connection.
Can any one please help me. This is my first project witch I programm with a linux system. So i don’t know how I can do that.

Thanks

This is not specific to Digi Linux and any Serial example you can find online should work.
I would start by reading this:
http://tldp.org/HOWTO/Serial-Programming-HOWTO/

If you want to build and run something right away try this:
http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html

Hello
You could make a C program, this program would be based on Linux commands.

execl takes the full path name of the command and variable length of arguments terminated by NULL:
execl(“/bin/ls”, “/bin/ls”, “-r”, “-t”, “-l”, NULL);

where the second argument is argv[0], but can be any string!
execlp will try to find the command from $PATH, so full path to command is not needed:
execl(“ls”, “ls”, “-r”, “-t”, “-l”, NULL);

execv is the equivalent of execl, except that the arguments are passed in as a NULL terminated array:
char *args[] = {“/bin/ls”, “-r”, “-t”, “-l”, NULL };
execv(“/bin/ls”, args);

execvp is the equivalent of execvl, excep that the arguments are passed in as a NULL terminated array:
char *args[] = {“ls”, “-r”, “-t”, “-l”, NULL };
execv(“ls”, args);

You could check the linux command “stty” to set the console to the serial port.

for example raw serial cominicacion:

stty -F / dev / raw ttyNS0 9600

You could check the other settings that allows linux command “stty” in case you need to change the port speed or remove different echo.
example:

stty -F / dev / raw ttyNS0 38400 -echo -echok

to view the current configuration of your console serial port you could use:

stty -a -f / dev / ttyNS0

to send to the serial port:

echo “hello world”> / dev / ttyNS0

for the serial port:

cat / dev / ttyNS0

DIGIESP in the project settings you must select “keep silent mode” for u-boot console, and also you must remove the serial console option in the kernel configuration. (Character devices)

it is necessary to run the first time in Cosola u-boot command:

setenv silent yes
saveenv

then the console will remain silent.