Home/Support/Support Forum/Disable stdin/out/err on /dev/ttyS0 and use it in custom application
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Disable stdin/out/err on /dev/ttyS0 and use it in custom application

0 votes
We need to connect the first serial port of a Digi Connect ME 9210 to an external device.

What is the correct way to do this:

1) let the uboot + linux start using /dev/ttyS0 as default console
2) free the /dev/ttyS0 (and redirect stdin/stdout/stderr to /dev/null)
3) ... here we can start our application that will open and lock the /dev/ttyS0 and use it to communicate with the external device. At the end it will close the serial port.
4) re-enable stdin/stdout/stderr to /dev/ttyS0

NOTE: if possible, step 2 and 4 should be performed by a simple busybox script

Thank you in advance,
asked Jul 18, 2011 in Linux by vorxio New to the Community (0 points)
recategorized Dec 4, 2013 by tuxembb

Please log in or register to answer this question.