stdin on serial ports

I am having difficulty using the standard input from the serial port on an sh4 platform. In my Build file I start the serial port driver, reopen the /dev/ser1 (which as I understand should send stdin /stdout /stderr to the serial port), then I call my Application which uses scanf("%s",txt); however my code blocks and does not accept any characters from the serial port. The same Application works fine after I start ksh and run it from the prompt!

... [+script] .script = { procmgr_symlink ../../proc/boot/ /usr/lib/ devc-sersci -e -F -b115200 -c1843200/16 sh7780scif0 & reopen /dev/ser1 [+session] myApp ...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (void)
char txt[80];
printf(“Enter string\r\n> “);

I have also tried using devc-pty -n4 to create some consoles and then using reopen /dev/con1

Can anyone help me or suggest another method.

One other question does anyone knows how to create a boot menu in the build file. e.g. boot to photon / no-photon.