# How do I redirect STDIO to the DIAG header?

**URL:** <https://forums.digi.com/t/how-do-i-redirect-stdio-to-the-diag-header/11819>\
**Category:** Rabbit Software\
**Tags:** serial, stdio, diag\
**Created:** [August 6, 2013, 9:36am UTC](https://forums.digi.com/t/how-do-i-redirect-stdio-to-the-diag-header/11819 "2013-08-06T09:36:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonmartin111](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jonmartin111](https://forums.digi.com/u/jonmartin111)\
**Post date:** [August 6, 2013, 9:36am UTC](https://forums.digi.com/t/how-do-i-redirect-stdio-to-the-diag-header/11819/1 "2013-08-06T09:36:22Z")

</div>

RCM4000. I’d like to be able to see the STDIO output when the device is not in debug mode using the DIAG header.

---

<div class="post-metadata">

**Author:** ![MargaretK](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@MargaretK](https://forums.digi.com/u/MargaretK)\
**Post date:** [August 6, 2013, 11:34am UTC](https://forums.digi.com/t/how-do-i-redirect-stdio-to-the-diag-header/11819/2 "2013-08-06T11:34:50Z")

</div>

The macro STDIO\_DEBUG\_SERIAL may be defined to redirect Stdio output to a designated serial  
port, this can be A, B, C or D. For more information, please see the sample program  
Samples/STDIO\_SERIAL.C.
