I am using Windows CE 5.0 and would like to be able to use the
cmd.exe command processor via COM2.
COM2 is working correctly because a small program which simply echos
characters using ReadFile and WriteFile works fine.
Two methods I have tried were to use
-----------------
Method 1:
A small program which executes the following calls was run.
SetStudioPathW(0, L"COM1:");
SetStudioPathW(1, L"COM1:");
SetStudioPathW(2, L"COM1:");
As was suggested by this post:
http://groups.google.com/group/microsoft.public.windowsce.targeted.de...
However, cmd.exe still seems to be using the keyboard and display for
stdin and stdout after doing this.
--------------------------
Method 2:
http://msdn2.microsoft.com/en-us/library/aa452670.aspx
[HKEY_LOCAL_MACHINE\Drivers\Console]
OutputTo = REG_DWORD:2 // Redirects CMD to COM2
COMSpeed = REG_DWORD:115200 // Speed of serial
connection
I changed the OutputTo value from a '1' into a '2' because my serial
port is COM2
I also changed the example baud rate of 19200 to 115200
up on the display, but also does not seem to send any output to COM2.
The registry settings in "Method 2" is confusing because it uses
decimal values to specify the baud rate. dwords in .reg files are
speced in hex, not decimal so you should add the hex equivalent of the
baudrate into the .reg file.
Henrik Viklund
http://www.addlogic.se
No comments:
Post a Comment