.NET Components for Mobility

Having a trouble with BluetoothListener

Last post 03-18-2010 5:34 AM by alanjmcf. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-13-2010 5:44 PM

    Having a trouble with BluetoothListener

    Hello ppl i am new here, i'm sorry if my english is bad but its not my native language well the trouble is the next i have an usb dongle connected to my pc and the next code in VB .NET

     

    Public Class Form1
        Private service As Guid = New Guid("{AACD90FD-D87B-491B-96E4-8A66378A3CB2}")

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim blueradio As BluetoothRadio = BluetoothRadio.PrimaryRadio
            Dim blueserver As New BluetoothListener(service)
            Dim conexionpen As Boolean = False
            Dim blueclient As BluetoothClient = Nothing

            blueradio.Mode = RadioMode.Discoverable

            blueserver.Start()

            blueclient = blueserver.AcceptBluetoothClient

        End Sub

    The thing is when i go to my blackberry or my nokia E215 i can see the bluetooth listening in my pc but when i connect to the listener is like not receiving any incomming connection and it stucks in the  blueserver.AcceptBluetoothClient call .. is like its not getting the pending from my cells i think the problem is in the creation of the blueserver's object but i have no idea what it could be .. also i could pair my cells from my code, when i go from my pc to the cells it goes ok but when my cells wanna go to my pc its not working, maybe someone can figure this out, because i am becoming crazy and i can't find any topic related to my issue.

     

    Thanks in advance.

  • 03-15-2010 7:49 AM In reply to

    Re: Having a trouble with BluetoothListener

    What application is being used on the  Blackberry and Nokia?  Something built-in or something you are writing yourself?  The client and server apps need to use the same Service Class Id.  if the client apps can't be changed to connect to {AACD90FD-D87B-491B-96E4-8A66378A3CB2} then change the server to listen on the UUID the client uses.

  • 03-15-2010 8:45 AM In reply to

    Re: Having a trouble with BluetoothListener

    Thanks for the reply Alan look actually i'm using the default application built-in the cellphones to connect to the VB's app that i am coding .. i really don't know what client ID are the cellphones using, you got any idea how may i check them ? there's any method in the library that gets it ?

     

    Look alan i am testing to see if i can get the class of the device i think i got something doing the next:


            dispos = cliente.DiscoverDevices

            For Each device In dispos
                MsgBox(device.ClassOfDevice.ToString)
            Next 

     But what i got is a string like this: ClassOfDevice = {5A0204} and the the GUID is longer than that and i can't instance a new bluetoothlistener using a classofdevice type ..  so what should i do with that value?

     

    Thanks in advance.

  • 03-16-2010 5:03 AM In reply to

    Re: Having a trouble with BluetoothListener

    What's the names of the application on the phones that you're using?  Send file, beam, etc?  If so then you're using OBEX, so you probably want to use the ObexListener see the user guide in the release.
  • 03-16-2010 6:55 AM In reply to

    Re: Having a trouble with BluetoothListener

     Actually i don't know the name of the app that the cellphones are using its just the default app to make a connection between the the device and the bluetooth adapter my idea is when i put the pin key in the cellphone and a new connection is made from the cellphone to the pc, catch it from the code and get the device address of the cellphone's incomming request to check if its the one i want, i don't want to transfer any files or use any service at the moment

  • 03-18-2010 5:34 AM In reply to

    Re: Having a trouble with BluetoothListener

    OK so there won't be any data connection made, so no connection will be made to a BluetoothListener. :-)
Page 1 of 1 (6 items)
Copyright © 2001-2012 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy. OrcsWeb's Windows Cloud Server Hosting