# Serial Port Digi Connect ME9210

**URL:** <https://forums.digi.com/t/serial-port-digi-connect-me9210/15598>\
**Category:** Linux\
**Tags:** me9210, digiconnect, serial-communication\
**Created:** [October 16, 2015, 8:32am UTC](https://forums.digi.com/t/serial-port-digi-connect-me9210/15598 "2015-10-16T08:32:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninsche89](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@ninsche89](https://forums.digi.com/u/ninsche89)\
**Post date:** [October 16, 2015, 8:32am UTC](https://forums.digi.com/t/serial-port-digi-connect-me9210/15598/1 "2015-10-16T08:32:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [October 21, 2015, 8:33am UTC](https://forums.digi.com/t/serial-port-digi-connect-me9210/15598/2 "2015-10-21T08:33:49Z")

</div>

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/](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](http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html)

---

<div class="post-metadata">

**Author:** ![davidscorchuelo](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@davidscorchuelo](https://forums.digi.com/u/davidscorchuelo)\
**Post date:** [November 17, 2015, 11:54am UTC](https://forums.digi.com/t/serial-port-digi-connect-me9210/15598/3 "2015-11-17T11:54:13Z")

</div>

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.
