472,126 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

Communicating with a serial port using a web service

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
Nov 21 '05 #1
4 10826
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
"joe bloggs" <joe bl****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
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

Nov 21 '05 #2
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

"Dino Chiesa [Microsoft]" wrote:
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
"joe bloggs" <joe bl****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
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


Nov 21 '05 #3
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/refer...t&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

"joe bloggs" <joe bl****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
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

"Dino Chiesa [Microsoft]" wrote:
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
"joe bloggs" <joe bl****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
>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


Nov 21 '05 #4
Thanks for the suggestions.

"Dino Chiesa [Microsoft]" wrote:
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/refer...t&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

"joe bloggs" <joe bl****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
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

"Dino Chiesa [Microsoft]" wrote:
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
"joe bloggs" <joe bl****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
>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


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ramakant Kasar | last post: by
5 posts views Thread by Franklin M. Gauer III | last post: by
2 posts views Thread by aaronj1335 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.