Oleg V
|
ksh session on a serial port, 6.5.0 sp1
|
Oleg V
01/29/2013 5:58 PM
post98882
|
ksh session on a serial port, 6.5.0 sp1
Dear community
I'm trying to achieve the following task with my 6.5.0 startup script:
- My device has a single serial port
- At the end of boot process start my app that is intended to stay running all the time
- The app periodically does some printf() tracing to stdout (serial port)
- Simultaneously, have ksh session on the same serial port
I've spent quite some trying to achieve the above but with very little success. This is what I have in my startup script
:
[+script] startup.script = {
...
configure h/w, load drivers, etc
waitfor /dev/ser0
reopen /dev/ser0
display_msg Starting main app asynchronously ...
main_app &
display_msg Starting ksh session ...
[+session] ksh &
}
The above sort of works, at least I can see my script messages and output from the app. The ksh prompt # appears too.
The only problem is I can't type anything. I can't type any commands, only seeing the output coming from the script and
the app.
Now if I don't start the app at all or start it synchronously and force app to terminate I'm getting to the ksh prompt
on the serial port and can type the commands etc:
[+script] startup.script = {
...
configure h/w, load drivers, etc
waitfor /dev/ser0
reopen /dev/ser0
display_msg Starting main app synchronously ...
main_app
display_msg Starting ksh session ...
[+session] ksh &
}
My goal is to be able to connect to the device's serial port while running and perform some diagnostics when needed
without power cycling or reconfiguring it. Hence the need of command prompt. At the same time, I need to see the rare
but important diagnostics traces coming from the running app.
Am I trying to achieve something impossible on QNX or just doing it in a wrong way?
Thanks.
|
|
|