2
votes

in my application im want to connect to electronic device (it is not a phone or .... !) and get a packet from it. i need to reed data from serial COM port. i used the code below for connection:

        private void bSearch_Click(object sender, EventArgs e)
    {
        var listener = new BluetoothListener(BluetoothService.SerialPort);
        listener.Start();
        listener.BeginAcceptBluetoothClient(this.BluetoothListenerAcceptClientCallback, listener);
    }
    void BluetoothListenerAcceptClientCallback(IAsyncResult result)
    {
        var listener = (BluetoothListener)result.AsyncState;
        listener.BeginAcceptBluetoothClient(this.BluetoothListenerAcceptClientCallback, listener);
        BluetoothClient client = listener.EndAcceptBluetoothClient(result);
        client.Close();
    }

Note: when i can recieve data from serial port when i manually connect to device's bluetooth! but programically by using 32feet i recieve this error: "There seems to be no API in BlueSoleil for RFCOMM servers." IN LINE:

There seems to be no API in BlueSoleil for RFCOMM servers.

what is wrong, what can i do??!!

1
come on guys! any idea?Vahid NazakTabar
where did you get in the end? were you sucessful?Prof
Also. It's normal to connect to a third-party device and read and write data from it -- it is not necessary to run as a server just to receive data.alanjmcf

1 Answers

0
votes

There is (?was) no support in BlueSoleil SDK for being a server, thus 32feet.NET can't support server/listener.

https://32feet.codeplex.com/wikipage?title=BlueSoleil