Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2004

Tip: Looking for answers? Try searching our database.

Communicating with a serial port using a web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
joe bloggs - 17 Nov 2004 23:34 GMT
I am writing a mobile application to interface with a legacy system and I am
planning to use web services to communicate with this system.  The legacy
system receives data through a serial port.  What I would like to do is make
the serial port accessible via a web service.  

The web service and the legacy application would be running on the same
machine.  The mobile application would access the web service via a network
connection.  It would then use the web service to upload data to the legacy
system.   This would require that the web service send the data to the serial
port that the legacy system is listening on.

Is this possible?  

Any suggestions on where I could investigate this further would be greatly
appreciated.

Cheers,
joe
Dino Chiesa [Microsoft] - 18 Nov 2004 15:41 GMT
you know how to create a webservice.

your legacy app is already working, I suppose.

it sounds to me, that what you need to do is build an interface between
them.

There are lots of ways to do this,   among them.
 shared memory
 local sockets communication
 message queues (like MSMQ)
 shared database
 local filesystem (a shared file)
 webservices

You did n't say what the legacy system looks like, or how it is deployed, or
what existing interfaces it exposes.  You said it reads a serial port.  What
does it do then?   what else does it read or write?  How does it make its
results known to the world?

Is there a network interface to it today?  does it "listen" on a queue, a
local file, a socket - for incoming requests or commands?  Maybe it exposes
a WMI interface for administrative control.   If there is an existing
interface, the next question is, can the new webservice code utilize it, or
could the new code utilize maybe an extended version of that existing
interface?

example:  Does the legacy system, today, read and write to a database?  If
so the webservice could connect to the same db.  What about a message queue?
Likewise.  etc etc

You could even use a webservice call from the webservice to the legacy
system.  Supposing the legacy system is implemented in C++, there are
webservice toolkits for C++, you could extend the legacy app to expose this
new interface. Likewise for other languages.

-D

>I am writing a mobile application to interface with a legacy system and I
>am
[quoted text clipped - 19 lines]
> Cheers,
> joe
joe bloggs - 18 Nov 2004 16:12 GMT
Dino,

Thanks for the response.

The only interface to the legacy system is a GUI and the serial port.  There
is no API of any sort.  The serial port cannot be used to download
information from the system it can only be used to upload data.  The legacy
system does interface with a DB but this is a proprietary DB, which I do not
have access to.

The legacy system is deployed in a network environment.  My focus right now
is to allow a node on the network (mobile device) to upload data to the
legacy system via the serial port.  As the mobile device and the computer
housing the legacy system are in different geographical areas, I cannot
physically connect the device to the serial port.

Is it possible to expose a serial port via a web service thus allowing a
network node to upload data to the legacy system?

Cheers,
Joe

> you know how to create a webservice.
>
[quoted text clipped - 57 lines]
> > Cheers,
> > joe
Dino Chiesa [Microsoft] - 18 Nov 2004 20:56 GMT
Yes,  code running under ASMX can tickle the COM ports.

In essence, you have the webservice "emulating" the device, by writing out
to one COM port (let's say COM1), while the legacy system will continue
reading from its COM port (eg COM2) as it always has.    you need to connect
COM1 to COM2 in order to get the legacy system to see the webservice data.

You can do this physically, with a null modem cable running from one COM
port to the other, or using a software utility that does the same thing.
example:  http://virtualserialport.com/products/vspdxp/  The result is that
any data sent from the PC out through COM1 is received on COM2 on the same
PC.
Once this is enabled you need to write the code that sends out its data via
RS232 / COM1 from the webservice.

here's another possibility
http://franson.biz/serialtools/reference_manual.asp?class=VPort&platform=net

But I am not an expert in RS232 I/O, so ... beyond this you're on your own.
Sounds like a lot of engineering work, I hope it's worth it.

if you look here
http://www.lvr.com/serport.htm

you can find stuff on Serial communication, including links on how to do it
within VB.NET or .NET in general.

-Dino

> Dino,
>
[quoted text clipped - 93 lines]
>> > Cheers,
>> > joe
joe bloggs - 19 Nov 2004 00:43 GMT
Thanks for the suggestions.

> Yes,  code running under ASMX can tickle the COM ports.
>
[quoted text clipped - 122 lines]
> >> > Cheers,
> >> > joe

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.