473,388 Members | 870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 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 11133
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: chandu | last post by:
I have a project in which I need to send info to/get info from a RS-232 port of the server depending on the client clicks on a asp web page. How can I access a serial port from the ASP code...
0
by: chandu | last post by:
I have a project in which I need to send info to/get info from a RS-232 port of the server depending on the client clicks on a asp web page. How can I access a serial port from the ASP code...
3
by: Ramakant Kasar | last post by:
Hi, If an application is reading data from a serial port, How can I open the same serial port with another application? Any idea? Please help. Thanks, Ramakant K.
5
by: Franklin M. Gauer III | last post by:
Hi All, I've written an ASP.NET application (webservice) that does simple serial communications via the .NET 2.0 SerialComm object. The application runs fine on my development machine. The...
0
by: rahulpasupuleti | last post by:
Hi.can someone help me in writing code for communicating with a USB device.For a serial port we have predefined functions for opening the port,reading to the port,writing to the port etc.I want to do...
0
omerbutt
by: omerbutt | last post by:
Sir, i am working in KONICA MINOLTA (Pakistan).i am working on a project in which we are managing the spare parts store room.The idea is to make a databse of the machine parts, and their...
5
shahjapan
by: shahjapan | last post by:
Hello, I am trying to connect my Nokia 6610 using usb cable, I have installed usb-serial driver of it. I hv tested it with Hyperterminal and it works fine. but when I wrote a python...
1
by: LTCCTL | last post by:
Hi All, I have written a SMS based Application in VB.NET which will Read from a serial port/COM port. This application is to be installed in a laptop in which there is no serial/com port, only...
2
by: aaronj1335 | last post by:
I am trying to write an application that controls a robot via a serial port. I made a robot class that includes the serial port over which I send commands, and I would like to be able to have...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.