can Serial device data be transmit to web_page.aspx directly?

Hi there,

Please help me. I have a serial WiFi device connected to a barcode scanner. Is it possible to create a "web_page.aspx" which can "talk" to the serial device to transmit the captured data to the "web_page.aspx"?

It's something like this...
Barcode scanner (connected to serial WiFi device) --> [Transmit data via WiFi] --> "web_page.aspx"

Previously i've used HyperTerminal (HT) to try out the connection. HT uses TCP/IP to connect to the serial device and the transmittion of data is possible.

If it is possilbe to replace HyperTerminal with web_page.aspx, how can i do it?

[668 byte] By [rina00] at [2007-12-24]
# 1

personally I don't think so, you would probably have to create a webservice which your application calls to do whatever it is you want to do, then the same thing on the website which reads the data or whatever.

can I ask, why do you want to transmit to the web_page.aspx?

ahmedilyas at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

We wish to receive and send serial data from our web page. We created the web page using ASP .Net. There are AcitveX objects available in the market for us to send serial data through the client computer comm port. But can we make access these activeX objects in our ASP .NET?

We have tried to access the ActiveX using HTML. But we have problem sharing these serial data with our ASP .NET code. Any advise on how to access data between HTML code and ASP .Net code within a web page?

If our approach is not workable, do you have any advise on how can we access serial data of client computer in web?

rina00 at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
That's

pretty unusual. I don't know enough about it and you really ought

to post your question at forums.asp.net. But there are important

details because you are dealing with a hardware device.

You have two choices, open and read the serial port at the server or at

the client. If you do it at the server, you'll have to run an IIS

server on the PC that is connected to the serial port device. The

particular challenge here is to keep the serial port opened while

ASP.NET delivers web pages. I don't know how to do that.

If you do it at the client, you'll need IE to host an ActiveX

control. The raw page would be delivered by the server, the

control would display whatever it receives from the serial port.

You can only view that page on the PC that is connected to the serial

device, other PCs won't have the connection (nor the control).

The particular challenge here is to survive a refresh request: you'll

close and re-open the serial port, possibly just as you are receiving

data. And, of course, to create an ActiveX control from .NET.

By far the easier solution is to just deploy a Windows Forms

application on the PC. That's what everybody else is doing.

You'll cut out a bunch of unnecessary overhead and problems and can

find samples everywhere.

nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4

Becuase of the isolation in which IIS runs, it would be tricky (if not impossible) to access the hardware resources of a serial port on the server. This is one of those things that even if you could do it, you probably shouldn't.

Now, as for a legit way to accomplish your goal: use a data broker.

The databroker is a middle-man application that exposes a standardized data wherehouse, typically a database.

So your server will do two things: It will run your web app in IIS, and it will also run a Windows app (possibly a service) that hooks the server's COM port (these two apps could be on the same, or different, servers). Then you setup a common database that both apps have access to. So the barcode scanner transmitts data to the Windows app which records it in a database. Then a user on your web page clicks a button (or whatever) and the webpage scans the database for new entries, and removes them after they're found (the data is transfered to a working area that is unique to the web app). In this way a shared database is used as a queue to shuffle data to and from very disparent applications. The database is usually configured with two tables; an "In" table and an "Out" table. The windows app doing the serial communication writes to the "In" table and constantly scanns the "Out" table for a reply. Typically there is a unique ID field that is used to coordinate records in the "In" and "Out" tables.

Hope that makes some sense. The data broker method is very common when getting systems that normally can't communicate directly to do so.

rkimble at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...