|
-
Dec 29th, 2011, 03:15 PM
#1
Thread Starter
New Member
How will i be able to recieve or get data from a hardware with bluetooth
Im planning to buy a Hardware with bluetooth, my question is will i be able to get or recieve data from the hardware using VB 6.0..?
is it possible to get the data from that hardware and transfer it into a VB textbox..? if you can provide code it is much appreciated =D tnx in advance and happy new year!
-
Dec 31st, 2011, 12:47 AM
#2
Re: How will i be able to recieve or get data from a hardware with bluetooth
most bluetooth devices appear in windows as com ports and can be communicated with using mscomm control
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Dec 31st, 2011, 06:57 AM
#3
Thread Starter
New Member
Re: How will i be able to recieve or get data from a hardware with bluetooth
i've tried communicating with bluetooth using the mscomm control.. im still new to mscomm control... but i cant seem to get any event on the MSComm1_OnComm() event...
-
Dec 31st, 2011, 07:11 AM
#4
Frenzied Member
Re: How will i be able to recieve or get data from a hardware with bluetooth
have you found how to connect the bluetoth device
i believe they have to paired
just a thought
-
Dec 31st, 2011, 07:30 AM
#5
Re: How will i be able to recieve or get data from a hardware with bluetooth
You will also need a Bluetooth adapter for your PC if you haven't already got one.
It's not going to be 'easy' unless you're familiar with Windows APIs.
You can get a feel for what you'll need to do from these links:
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
-
Jan 1st, 2012, 09:59 PM
#6
Re: How will i be able to recieve or get data from a hardware with bluetooth
 Originally Posted by westconn1
most bluetooth devices appear in windows as com ports and can be communicated with using mscomm control
Actually most don't, and can't.
They can appear as a keyboard, mouse, microphone, speakers, printer, network adapter, etc. - the list is almost anything you might attach to a PC.
You don't deal with these devices at the Bluetooth level any more than you'd talk to the PCI bus if the thing was an add-in card. The whole point of these kinds of connections is to make them appear as local hardware to programs at the application level, just like other hardware.
When you guys go off looking to buy some HackJob 5000 you should really spend 5 minutes reading its specs and then 15 minutes reading its SDK docs. That should tell you what device the thing presents itself as, and if not there should be a description of the interface API provided with the specific device.
We really don't have a good reason to expect the device in question to look like a COMn: port at all. For all we know it presents itself to Windows as a game controller. SPP is just one of many possible Bluetooth Profiles:
http://en.wikipedia.org/wiki/Bluetooth_profile
-
Jan 2nd, 2012, 03:35 PM
#7
Re: How will i be able to recieve or get data from a hardware with bluetooth
Actually most don't, and can't.
as i have only played with a couple i obviously was under a miscomprehension
in case of any misunderstanding i was referring to a bluetooth adapter device (built in or usb), without which no bluetooth accessory can communicate with pc
certainly the bluetooth adapter i have installed on this machine, creates 9 com ports (coms 9 to 2), as this is only for the adapter, it does not create any other types of devices
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jan 2nd, 2012, 04:55 PM
#8
Re: How will i be able to recieve or get data from a hardware with bluetooth
I'd guess you have paired several devices to it (or one device, several times) that presents an SPP to your host adapter. Phones often did this as a mechanism for things like addressbook synchronization since early snyc tools used a virtual COM port connection over parallel ports, USB, and Bluetooth.
Mine doesn't show a single COM port besides the two hardware ports on the PC. However it does show my phone, a mouse, a stereo headset, and a car handsfree set I have paired with it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|