Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: scripting Serial
hi here!
sorry for askin that but maybe someone has time for a rookie .
need to open a com port in that way:
I/O Request (DOWN) 
IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate 
Baud Rate=38400 
 
I/O Request (UP) 
IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate 
 
I/O Request (DOWN) 
IOCTL_SERIAL_CLR_RTS: Clear RTS 
 
I/O Request (UP) 
IOCTL_SERIAL_CLR_RTS: Clear RTS 
 
I/O Request (DOWN) 
IOCTL_SERIAL_SET_DTR: Set DTR 
 
I/O Request (UP) 
IOCTL_SERIAL_SET_DTR: Set DTR 
 
I/O Request (DOWN) 
IOCTL_SERIAL_SET_LINE_CONTROL: Set line control 
WordLength=8 
StopBits=1 stop bit 
Parity=No parity 
I/O Request (UP) 
IOCTL_SERIAL_SET_LINE_CONTROL: Set line control 
 
I/O Request (DOWN) 
IOCTL_SERIAL_SET_CHARS: Set special characters 
EofChar=0x0 
ErrorChar=0x0 
BreakChar=0x0 
EventChar=0x0 
XonChar=0x7f 
XoffChar=0x7e 
I/O Request (UP) 
IOCTL_SERIAL_SET_CHARS: Set special characters 
 
I/O Request (DOWN) 
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information 
ControlHandShake=1 
FlowReplace=0 
XonLimit=2048 
XoffLimit=512 
 
I/O Request (UP) 
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information 
 
I/O Request (DOWN)IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts 
ReadIntervalTimeout=1 
ReadTotalTimeoutMultiplier=0 
ReadTotalTimeoutConstant=0 
WriteTotalTimeoutMultiplier=30 
WriteTotalTimeoutConstant=100 
 
I/O Request (UP) 
IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts 
 
I/O Request (DOWN) 
IOCTL_SERIAL_PURGE: Purge requests 
Purge mask=TXCLEAR: Write requests, RXCLEAR: Write buffer 
 
I/O Request (UP) 
IOCTL_SERIAL_PURGE: Purge requests 
 
I/O Request (DOWN) 
IOCTL_SERIAL_SET_WAIT_MASK: Set current event mask 
WaitMask=RXCHAR: Any Character received 
 
I/O Request (UP) 
IOCTL_SERIAL_SET_WAIT_MASK: Set current event mask 
 
Write Request (DOWN) 
Buffer size: 0x1 bytes 
F0  
 
Write Request (DOWN) 
Buffer size: 0x2 bytes 
28 01  
 
I/O Request (DOWN) 
IOCTL_SERIAL_PURGE: Purge requests 
Purge mask=TXCLEAR: Write requests, RXCLEAR: Write buffer 
 
I/O Request (UP) 
IOCTL_SERIAL_PURGE: Purge requests
 

(down) means data sent to com port
(up) means confirmation from com port, i added just in case .
 
need a small app(vb/32bit) to run settings above.
the app it should start with a small gui window where com port number can be set manually and an "ok " button to confirm .
 

closing the app, com port must return to windows default settings .
thank you
Posted 15-Jan-12 9:44am
Edited 15-Jan-12 22:27pm
v5
Comments
SAKryukov at 15-Jan-12 22:28pm
   
OK, no language, no platform, no proper explanation. No question. Use "Improve question" above, is you can.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

need a small app(vb/32bit) to run settings above.
You could use one of the free terminal programs that Google will find for you (Hyperterm, putty etc), or you could write it yourself.
  Permalink  
Comments
major konig at 16-Jan-12 6:21am
   
sorry, no skills workin with scripts , only thing i did by myself was recording data traffic.
also most of utilities from net who override windows serial port settings are blocking data coming out from com device.
just hoping to find some help here......
Richard MacCutchan at 16-Jan-12 6:28am
   
I'm not sure I understand what you are saying here. What do you mean "scripts", this is surely a programming problem. Also what do you mean by "most of utilities from net who override windows serial port settings are blocking data coming out from com device."? If that was the case then none of them would work. Maybe you need to reword your question.
major konig at 16-Jan-12 7:05am
   
http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx
used that to set com port settings and send hex data to device as in captured data i posted ,get same data from the device as original utility that im trying to skip but data stucks somewhere didnt reach the target app.
so if you agree this aint an easy job why are you send me for googleling ?
Richard MacCutchan at 16-Jan-12 7:12am
   
so if you agree this aint an easy job why are you send me for googleling ?
Sorry where did I say that?
I would suggest you edit your original question and explain more clearly what you are trying to do and why it is not working. The comments above are not very clear.
major konig at 16-Jan-12 7:42am
   
what so hard to understand ? , my first post shows very clear what happens to com port .
 
once copleted all sequences(on yellow field above) data can run from a rs232 external device to a target app .
 
i was only asking for a small utility, exe , driver, say it as you wish ,to to make any(any=thats what i asked for setting com port number before run)com port behave like this.
 
thats does original utility , and im trying to replece it cuz its a part from a huge app with a lot of limitations.
 
thank you
Richard MacCutchan at 16-Jan-12 11:44am
   
i was only asking for a small utility
As I said before, you will need to either find something via a Google search, in the articles here on CodeProject, or write it yourself. I cannot conjure such an application out of thin air for you.
 
Richard MacCutchan at 16-Jan-12 7:15am
   
I have just taken a quick look at your link and it appears you are trying to implement the code posted on that site; I would suggest you post your questions there so the author of the code can answer you.
major konig at 16-Jan-12 7:48am
   
nothing to to with that utility from noah , only similarities.
 
i recorded traffic from another utility (much more parameters to set).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 16 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100