.NET Components for Mobility

Save a Com Port

Last post 05-21-2008 4:36 AM by Jayakumar. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-11-2008 11:36 AM

    Save a Com Port

     Hi,

    I've paired my PDA device with a bluetooth printer combo adapter.

    This is my code:

                Dim btnet2 As New InTheHand.Windows.Forms.SelectBluetoothDeviceDialog
                Dim btInfo As InTheHand.Net.Sockets.BluetoothDeviceInfo
                btInfo = btnet2.SelectedDevice
                Dim btClient As New InTheHand.Net.Sockets.BluetoothClient
                Dim EP As InTheHand.Net.BluetoothEndPoint = New InTheHand.Net.BluetoothEndPoint(btInfo.DeviceAddress, InTheHand.Net.Bluetooth.BluetoothService.SerialPort)
                EP.Port = 8
                btClient.Encrypt = False
                btClient.Connect(EP)
                If btClient.Connected Then
                    Dim btPort As InTheHand.IO.Ports.BluetoothSerialPort = InTheHand.IO.Ports.BluetoothSerialPort.CreateClient("COM", "8", EP)
                End If
                btClient.Close()
     

    Now I need to save this configuration ("COM8" assigned to outgoing bluetooth) on my pda.

    How can I do this?

    Is there a key in the registry that a must modify? 

    Thanks in advance. 

  • 01-14-2008 10:52 AM In reply to

    Re: Save a Com Port

    We've some new code in BluetoothDeviceInfo.SetServiceState that aims to do that.  Download the code from http://www.codeplex.com/32feet and see if it works for you.  I was wondering whether we should trying creating the BluetoothSerialPort before writing to the registry, that looks what you were thinking of doing too...

    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.
  • 01-14-2008 11:58 AM In reply to

    Re: Save a Com Port

    Thanks for reply me.

    I tryed setServiceState, but unfortunately it doesn't work under WinCe. I'm looking for a solution for Win Mobile.

    Any other suggestion? 

    Thanks 

  • 01-15-2008 6:22 AM In reply to

    Re: Save a Com Port

    Did you download the current working code from codeplex?  Peter did some work on this area after we released 2.2.

    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.
  • 01-15-2008 9:14 AM In reply to

    Re: Save a Com Port

     Yes, I had downloaded latest version (29615), but I receive the same error....

    I give up  Sad

  • 05-21-2008 4:36 AM In reply to

    Re: Save a Com Port

    Hi,

     May i know how u find that your pda virtual serialport is 8.

     Can you please suggest ME!

    Thanks!

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