473,395 Members | 1,891 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,395 software developers and data experts.

Trouble with outputting data via MSCOMM

Hello,

I'm encountering a "Blue Screen of Death" when I try to send data to a bluetooth sensor via a serial port, using the MSCOMM ActiveX object. I was wondering if anyone has any ideas how to fix the problem.

As some background, I am trying to use VB to communicate with a Wi-Tilt bluetooth accelerometer, a sensor which sends data over a COM serial port. I have no problem talking to the device in Hyperterminal; it streams data into HyperT very nicely.

However, when I set up a small program in VB using the MSCOMM object, my system fails everytime I send a "1" to the serial port (which is the command to get the sensor to spit out data). I'm actually using the NETCOMM object, but it functions identically to the MSCOMM object. Plus I've tried about 5 other ActiveX objects, and I still get the Blue Screen everytime I send some data. So I don't think it's a problem inherently with MSCOMM-like objects, but probably my bluetooth driver. Has anyone encountered a similar issue, and found a remedy?

The message on the Blue Screen refers to IRQL_NOT_LESS_OR_EQUAL, which I understand is a common message for driver failures.

Here is the code I've been attempting to use:
Sub try_to_connect()

NETComm1.CommPort = 8

If NETComm1.PortOpen = True Then
NETComm1.PortOpen = False
End If

With NETComm1
.Break = False
.DTREnable = False
.EOFEnable = False
.Handshaking = comNone
.InBufferSize = 1024
.InputLen = max_packetsize
.InputMode = comInputModeText
.NullDiscard = False
.OutBufferSize = 1024
.ParityReplace = Chr(0)
.RThreshold = 1
.SThreshold = 0
.Settings = "57600,N,8,1" 'default settings
End With

If NETComm1.PortOpen = False Then
NETComm1.PortOpen = True
End If

NETComm1.Output = "1"

End sub
I've tried sending the "1" as a byte, a string, a variant, and have tried sending Chr(49) ... it doesn't make any difference, I still get the blue screen. I'm using an embedded Broadcom bluetooth chip on a Lenovo X60, Windows XP.

Thanks very much for anyone who has any ideas how to solve this problem!

David
Jan 21 '08 #1
0 1847

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

Similar topics

1
by: jinoy | last post by:
how can i detect an incoming caller's telephone keystroke using modem, using mscomm or other? how can i detect an outgoing call using mscomm? how can i get a caller id using mscomm?
1
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...
0
by: morgal | last post by:
That is one reason I quit using MS custom controls, you have to buy the license. In VB 6 they give you a try it license and then you develop a huge application or small one and find out you don't...
1
by: Barry | last post by:
I am using the mscomm activex control in vb.net. I can add the control to the toolbar which will allow me to drop it onto a form. As long as I am in the code space for that form it works fine....
9
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...
1
by: ferraro.joseph | last post by:
Hi, I'm querying Salesforce.com via their AJAX toolkit and outputting query results into a table. Currently, their toolkit does not possess the ability to do table joins via their structured...
2
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...
0
by: danishce | last post by:
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...
0
by: cmdolcet69 | last post by:
I get the following error message when I output to the mscomm: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in COM.exe Additional information: Exception...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.