Results 1 to 8 of 8

Thread: How will i be able to recieve or get data from a hardware with bluetooth

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    2

    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!

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    2

    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...

  4. #4
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    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

  5. #5
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    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

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How will i be able to recieve or get data from a hardware with bluetooth

    Quote Originally Posted by westconn1 View Post
    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

  7. #7
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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

  8. #8
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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
  •  



Click Here to Expand Forum to Full Width