Sending commands to serial port connected device

D

davem

Hello,

When I create a connection to an external device (barcode scanner) via
serial port, using the Terminal Services Client on the mobile device, I can
send commands to control to the external device and receive information
about it, such as the firmware version.

I have a vb.net application that sucessfully recieves data (via serial port)
from the barcode scanner, but with the serial port open, if I send the same
commands that I used using the Terminal Services Client, I get no
acknowledgment from the scanner. I'm guessing I'm missing something.

Is there a way to send the commands I use in the TSC and recieve data in my
app?

Thanks in advance for any replies.

Dave M
 
D

Dick Grier

I'm confused. Why would you use TSC to communicate with the scanner? Isn't
TSC designed to communicate with a desktop or server machine?

If you have a VB .NET program working... That seems the way to go. It
certainly is what I'd use.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
P

Paul G. Tobey [eMVP]

You can redirect serial ports. I think this is probably what you want to
do, not try to integrate your local .NET CF application with TSC on the
client. You'd then, on the desktop machine, open COM17 (or something), and
data you got from that would actually be coming from a serial port on the
device.

I suppose that you could set things up to wedge your serial port data into
the keyboard stream, in which case, the data would appear in whatever
desktop program had the focus, as though the keys had been typed at the
keyboard.

Paul T.
 
D

Dick Grier

Paul,

Seem like way to much work. Simple (almost always) is best.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
P

Paul G. Tobey [eMVP]

True! Just depends on what you're doing on the desktop. If you've really
got a client that you don't want to do *anything* custom on, it should work
(I have a test to do today and I'll try it).

Paul T.
 
P

Paul G. Tobey [eMVP]

In case anyone is interested, this actually works with *zero* configuration
on either the desktop or the device. You just have to enable serial port
redirection in the TSC on the device and write your code for the desktop to
use the corresponding serial port (COM2 on the desktop --> COM2 on the
device,
when the device is connected). This makes it very easy to do your scanner
configuration. Use whatever code you use on the desktop to make it happen,
on the desktop, and, when you run the program via a terminal services client
session, the data will be automatically redirected to the device's serial
port.

I have a whole new respect for this TSC stuff. I would have bet $50 that it
wouldn't work.

Paul T.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top