473,768 Members | 7,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSComm Receive Hex Data Error

31 New Member
Hello All:
I am receiving data in hex format using serial communication MSCOMM control.The data reads ok but when it find hex(0) means EndofFile character in ASCII it exits and does not read data after the EndofFile character.
The code for receiving hex data is:

Private Sub MSComm1_OnComm( ByVal sender As Object, ByVal e As System.EventArg s) Handles MSComm1.OnComm

Dim m_cardData As String
Do
Loop Until MSComm1.InBuffe rCount > 185
m_cardData = MSComm1.Input
txtCardData.Tex t = m_cardData

If m_cardData <> "" Then
With MSComm1
.Handshaking = MSCommLib.Hands hakeConstants.c omNone
.RThreshold = 0
.RTSEnable = False
.SThreshold = 0
.PortOpen = False
End With
End If
End Sub

Any help?
Jun 5 '07 #1
0 1809

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3529
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in axinterop.mscommlib.dll
1
3871
by: caid | last post by:
Hi there. I'm writing a C# app (in VS.NET 2003) that sends a binary sms using MSComm. I got it going with a gsm modem, but ideally we want to use a cellphone as the sending device. However, when I use a cellphone (Nokia 7210) with the same code, I get the above exception. The first communication with the phone is as follows: com_.Output = "ATZ;E\n";
9
9066
by: Carl Gilbert | last post by:
Hi I'm trying to open a vb6 project in vb.net which uses the mscomm component. When running the vb upgrade wizard in vb.net, an error is raised: Upgrade failed, unable to load reerenced component mscomm32.ocx (1.1.0) You need to install this component before you upgrade the project. Does anyone know how to install the mscomm component.
1
7464
by: Recep TARAKÇI | last post by:
hi everbody i am using visual basic 2005. i am write a modem control program and get callerID value. i am send a AT command to modem. Dim mscomm1 As New MSCommLib.MSComm mscomm1.CommPort = 3 mscomm1.PortOpen = True
0
1586
by: fabianuat | last post by:
Hello Im using the MSComm to send and receive binary data to a video server, the sending part works fine, but when a receive more than 8 byets, the input variable only keeps the bytes over the eighth byte. ...Please some can some one tell me where im wrong??? these are the settings and the OnComm part MSComm1.CommPort = 1 MSComm1.Settings = "38400,O,8,1" MSComm1.InputMode = 1 MSComm1.InputLen = 0 MSComm1.RThreshold = 1...
0
1309
by: philipmact | last post by:
Dear ALL: i'm currently facing one problem, the problem is how can i receive my tag ID from the RFIDreader to the MSCOMM? can anyone give me some idea? My idea are shown as below~ http://www.freeimagehosting.net/uploads/th.88e1f87602.jpg Thank you~
2
2117
by: cpraveen10 | last post by:
Hi All... I am using MSComm to receive data serially in a text box. The data being recieved is 1A2B3C1A2B3C1A2B3C...........so on... I have read this into a text file. So I am now getting 1A2B3C1A2B3C1A2B3C...........so on...in the text file.Now I have to get as 1A 2B 3C 1A 2B 3C 1A 2B
0
1579
by: swati2106 | last post by:
HI, I have develop a apllication , To store the GPS data in database, for that , to read GPS data I have used the Mscomm port, In which I create the object of class RS232 n open that port, n store the data in to one string type variable , msStr but some time it store the Mscomminput, n some times it stores nothing, but in mscomm.input will have a GPS data, why it is So?
1
2910
by: dbrother | last post by:
Hello, I have a program in Access that uses VBA to capture data being sent over the serial port from a Cosmo Flow Test Machine. This determines the air pressure's leak rate escaping from a muffler. I have written several programs that send data out serially, but I am new to "listening" to receive the data. I can setup an instance of HyperTerminal, provided the settings used in the given manual for the device and successfully retreive...
0
9576
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10017
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9961
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8840
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5283
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.