Reading Data from Serial Port connected to the machine

Hello All.

I have posted this before also in the forum…

Still I did not get any solution…

We can use Java API or Windows API for reading data from serial port connected to the machine…

Using Javax comm has one problem, that is api does not get configured properly… there are some settings to be followed … please can anyone throw somelight on it…

Using Windows API, if someone has tried please provide me some reference for the same…

Thank You well in advance…

Please help

Subject: Reading Data from Serial Port connected to the machine

On Windows platforms, I would use LS and the MS Comm Control…

Dim comm As Variant

comm = CreateObject ("mscommlib.mscomm.1")

For use, try Googling it…lots of VB code out there to learn from.

Subject: RE: Reading Data from Serial Port connected to the machine

Thankyou Lawrence,

I developed the following code using LS and MS Comm:

Set MSComm1 = createobject(“MSCOMMLib.MSComm.1”)

’ Open the serial port

MSComm1.CommPort = 1 ’ Set the port number

MSComm1.Settings = “56000,N,8,1” ’ Set UART parameters

MSComm1.PortOpen = True ’ Required, might lock port

Buffer$ = Buffer$ & MSComm1.Input

But whenever I try to run this code on Web, I get error “Cannot Create Automation Object”. I tried various solutions for this from web but could not find anything useful.

I even tried to call and run this agent from another agent.

Can you please provide me some help on this