Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Redirecting stdin and stdout streams in Open C

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition, FP1 and FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Created: User:Technical writer 1 (12 Jun 2008)
Last edited: hamishwillee (14 Sep 2012)


By installing the optional stdioserver.sis package from Open C deliverables, a console for debugging purposes will be created. By default, stdout will be directed to this console and stdin will also take its input from it.

It is possible to configure the redirection of these standard streams by modifying the stdioserver's config.ini file.


config.ini is installed as part of the stdioserver.sis package.

In the emulator, it is installed in \epoc32\winscw\c\system\data.
In the device, it is installed in c:\system\data.

A sample config.ini is shown below. Here, stdin input is taken from a console and stdout is redirected to a serial port. The file also contains sections for input from a file [MEDIA1] and output to a file [MEDIA4], although they are not used in this case.

 type = file
 path = C:\system\data\in.txt
 max size = 100
 type = serial
 baud = 214
 port = COMM::10
 type = console
 width = -1
 height = -1
 type = file
 path = c:\system\data\out.txt
 max size = 1000
This page was last modified on 14 September 2012, at 00:22.
73 page views in the last 30 days.