Link to home
Start Free TrialLog in
Avatar of sbennetts
sbennetts

asked on

Using the MSCOMM control with VB

Hi

I'm working with a handheld device at present that has a serial connection to enable the download of information from the device to a PC.  Having programmed the device to send the data that is collected, I'm not looking at the PC app to collect that data.

I have used HyperTerminal for a basic check to ensure some data is being passed from the device through the COM port to the PC and everything 'looks' ok there.

My problem is that when I try to use the MSCOMM control, for some reason as data is sent from the device, it doesn't seem to raise an onComm event and therefore I'm unable to effectively grab the data.  If is have a loop just waiting for MSComm1.Input, I get some data back.

What am I doing wrong?  Any ideas?

Regards
Simon.
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sbennetts
sbennetts

ASKER

Your a star!  Thanks, presumably if I'm reading 'records' of 24 bytes, I can set it to 24 so that it grabs a 24 byte buffer for me.  Thanks for the quick response.
Simon.
sbennetts

Indeed that is correct, it should then fire when you have a full 24 byte bunch of data.

Tim.