.NET Components for Mobility

error while tring to connect a gps receiver - windows ce 6 platform

Last post 04-27-2007 4:43 PM by thomas. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-26-2007 2:12 PM

    • thomas
    • Not Ranked
    • Joined on 04-26-2007
    • Posts 0

    error while tring to connect a gps receiver - windows ce 6 platform

    Hi all,

    I'm a newbie in bluetooth programming and I'm making some test in order to communicate with a bluetooth GPS receiver.

    My platform is: Windows CE 6.0, .netCF2.0 (Sp2), InTheHand2.1 

    The final goal is to succeed in using the SerialPort service.

    Here's my code (the discovery part... works, since I can see all the devices in the range).

                bool res1 = InTheHand.Net.Bluetooth.BluetoothSecurity.PairRequest(arrayDev[listBoxDevices.SelectedIndex].DeviceAddress, "0000");
                BluetoothEndPoint btep = new BluetoothEndPoint((BluetoothAddress)address_array[listBoxDevices.SelectedIndex], InTheHand.Net.Bluetooth.BluetoothService.SerialPort);
                bc.Connect(btep);

    Here's the exception I receive (at the bc.connect instruction): 

    System.Net.Sockets.SocketException was unhandled
      Message="No connection could be made because the target machine actively refused it"
      ErrorCode=10061

     

    Could it be something to the hardware I'm using? (I'm using a Trust USB-bluetooth dongle and an Hamlet GPS receiver)

    many thanks in advance! 

    Filed under: ,
  • 04-27-2007 11:14 AM In reply to

    Re: error while tring to connect a gps receiver - windows ce 6 platform

    Well that normally means that the requested service is not supported...  Can you connect to the serial port service manually, through either version of Windows' Bluetooth control-panel?

    The development version includes SDP (service discovery protocol) functionality and a sample program (SdpBrowserDesktop/-PPC) that will list all the services a peer device supports.  If you run that against your GPS device does it list SerialPortProfile?  If you want to try, download the source from http://www.codeplex.com/32feet

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 04-27-2007 4:43 PM In reply to

    • thomas
    • Not Ranked
    • Joined on 04-26-2007
    • Posts 0

    Re: error while tring to connect a gps receiver - windows ce 6 platform

    well,

    I can connect to the device throught my desktop (XP): there I'm using the same USB-dongle with a Widcomm stack driver. I can connect to the device, get the service, and communicate throught the virtual port

    In windows ce, in the control panel, I can discover the device... but I don't know if I can connect to it (windows ce doesn't have a bluetooth manager like windows mobile).

    PS: in the previous post I've forgotten to specify that the pair attempt seems to work fine: it returns true.
     

    Now I'm going to try the sample application u've mentioned... I'll let u know!

    thanks for the help!
     

Page 1 of 1 (3 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.