.NET Components for Mobility

Connection Actively Refused - SerialPort

Last post 12-03-2009 9:02 AM by robertmclaurine. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-25-2009 12:58 AM

    Connection Actively Refused - SerialPort

    I am able to send a file successfully from a Trimble GeoXT 2005 (Windows Mobile 5) to a Trimble Nomad (Windows Mobile 6) using the Obex Listener. I need to trigger an event on one unit based on a command from the other unit. I a have assumed that I must use the BluetoothService.SerialPort to send a command. I cannot connect to the serial port service. I continue to get the "Connection Actively Refused...". I have seen this error quoted many times in the forums, but have never seen it resolved. I have tried SetPin and PairRequest in my latest attempt and nothing seems to have any effect. What am I missing here? Is this a code problem or a hardware driver config issue? First Unit serialep = new BluetoothEndPoint(this.m_BTDevice.DeviceAddress, BluetoothService.SerialPort); client = new BluetoothClient(); BluetoothSecurity.PairRequest(this.m_BTDevice.DeviceAddress,"1234"); client.Connect(this.m_BTDevice.DeviceAddress, BluetoothService.SerialPort); Second Unit serialep = new BluetoothEndPoint(this.m_BTDevice.DeviceAddress, BluetoothService.SerialPort); client = new BluetoothClient(); BluetoothSecurity.SetPin(this.m_BTDevice.DeviceAddress,"1234"); client.Connect(this.m_BTDevice.DeviceAddress, BluetoothService.SerialPort);
    Filed under: ,
  • 11-26-2009 11:20 AM In reply to

    Re: Connection Actively Refused - SerialPort

    For a custom service connection between two programs, see the "General Bluetooth connections" section in the user guide.  One device running a BluetoothListener and the other a BluetoothClient.  Use a custom Service Class ID, like the below, which is then used by server and client. :-)

        Shared ReadOnly MyServiceUuid As Guid = New Guid("{00112233-4455-6677-8899-aabbccddeeff}")

    If you need any more explanation let us know.

  • 12-02-2009 4:12 PM In reply to

    Re: Connection Actively Refused - SerialPort

    I just tried using the BluetoothListener (server and client) on my 2 mobile devices. I still get the connection actively refused error. Only the Obex library connects and passes files. Whats different between the Obex library and the InTheHand library? Can I use the Obex server on each mobile device and pass commands and files both ways between devices? Thanks. Robert McLaurine Matchpoint Inc.
    Filed under:
  • 12-03-2009 5:57 AM In reply to

    Re: Connection Actively Refused - SerialPort

    What Obex library?  Our ObexWebRequest?  The OBEX server does the equivalent of "new BluetoothListener(BluetoothService.ObexObjectPush)" and the client does "btCli.Connect(addr, BluetoothService.ObexObjectPush)".  If a client tries to connect to a service that's not active then the 'connection refused' error will occur.  So I guess there's still something wrong with the BluetoothListener in your case.

    You can use OBEX if it suits the scenario.  If using the built-in server then the user has to accept the transfer.  If you stop the built-in server and use our ObexListener class then the normal transfer functionality will be lost.

  • 12-03-2009 9:02 AM In reply to

    Re: Connection Actively Refused - SerialPort

    I guess that I wasn't using Brecham.Obex for anything. I was using the InTheHand.Net.ObexWebRequest / ObexWebResponse to send a file from one pda to another running the InTheHand.Net.ObexListener. This would successfully send a file without prompting to accept the file. I just could never get the SerialPort or Custom Service to accept a connection in order to "trigger" the sending of the file. No matter what I tried I would always get the connection actively refused error. Only the InTheHand.Net.ObexListener scenario would work. Robert McLaurine
Page 1 of 1 (5 items)
Copyright © 2001-2012 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy. OrcsWeb's Windows Cloud Server Hosting