I finally used the socket.Connect() function (I looked at the client.Connect() code and it does the same)
I am getting this kind of Exception very often:
No connection could be made because the target machine actively refused it
Now I am trying to connect to two kinds of devices:
A Windows XP computer: and in this case it works fine, it always connects.
An electronic device: and in this case it connects one time every 6 or 7.
The strange thing is that if I use the normal WindowsCE serial port emulation it works always. I mean that if I associate the device to a virtual serial port, and then access the serial port (not taking into account BT, just a serial port access) the connection works fine. I guess there's some problem when I am using the connect call, is there any way I can debug this better?
Any idea?
Thanks very much.
Dario