Pocket PC Networking >> Bluetooth socket error 10047

by d2RsaQ » Mon, 05 Dec 2005 22:29:03 GMT


Hi,
I got a socket error when the following socket was being created for a
bluetooth connection on a desktop:

serverSocket = new Socket((AddressFamily)32, SocketType.Stream,
(ProtocolType)3);

The error code was:

System.Net.Sockets.SocketException was unhandled
Message="An address incompatible with the requested protocol was used"
Source="System"
ErrorCode=10047
NativeErrorCode=10047

I double checked the address familiy and protocol number for bluetooth and
they seemed all right.

Any ideas?
Thanks.

David




Pocket PC Networking >> RE: Bluetooth socket error 10047

by d2RsaQ » Tue, 06 Dec 2005 02:10:03 GMT


BTW,

My development machine doesn't have bluetooth interface installed. I
intended to use emulator for the time being. Does it make a difference?








Pocket PC Networking >> Bluetooth socket error 10047

by Peter Foot [MVP] » Tue, 06 Dec 2005 18:30:33 GMT

This occurs if you run on a device with no bluetooth hardware, or bluetooth
hardware using a third-party software stack. The emulator doesn't support
Bluetooth you have to use a real device to run this code and it must use the
Microsoft stack e.g. any of these
:- http://32feet.net/forums/40/ShowPost.aspx )

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com








Bluetooth socket error 10047

by d2RsaQ » Tue, 06 Dec 2005 21:27:04 GMT

Peter,

Thanks for the info.
another question to follow this up (I have asked the same before but didn't
get any answers): Is it possible to simulate bluetooth communication between
two VS.NET 2005 PPC emulators on one development machine?

David








Similar Threads

1. "IPv6 helper serives" issue - error 10047

I have a dell inspiron laptop that i bought last year

since last month I was getting this schost.exe error followed by a generic 
host error

The taskbar hangs for like 30 seconds before the wireless network icon 
appears in the taskbar.

I went thru event viewer and checked for any trouble.  I found an even it 
says. " The IPv6 Helper Service service hung on starting."(event id:7022) - 

so i went to services , found ipv6 helper services. tried to start it, then 
it was showing the following error message

"could not start ipv6 helper service service on local computer. error 10047: 
an address incompatible with the requested protocol was used"

can anyone help me with this issue


2. Error 10047 - Windows XP Network

3. 10047 Address Family is not Supported

"Gisle Vanem" < XXXX@XXXXX.COM > wrote in message news:<406aeec8$ XXXX@XXXXX.COM >...
> "Colin Pimlott" < XXXX@XXXXX.COM > wrote:
> 
> > I get the error code 10047 (Address Family is not supported) when
> > attempting a network broadcast.
> > 
> > The relevant VB6 code is
> > 
> > Winsock1.Protocol = sckUDPProtocol
> > Winsock1.LocalPort = 0 
> > Winsock1.RemotePort = 1000
> > Winsock1.RemoteHost = "255.255.255.255"
> > Winsock1.Bind
> 
> You must enable broadcast by
>   BOOL on = TRUE;
>   setsockopt (sock, SOL_SOCKET, SO_BROADCAST, (const char*)&on, sizeof(on));

Thanks,
I am using the MSWinsck.ocx control, and I have tried to do this with
the following..

Const SO_BROADCAST = &H20
Const SOL_SOCKET = &HFFFF

Public Type OptType
    Opt  As Long
End Type

Public Declare Function setsockopt Lib "wsock32.dll" (ByVal sock As
Long, _
               ByVal level As Integer, ByVal optname As Integer, _
               optval As OptType, ByVal optlen As Integer) As Integer


optval.Opt = 1
intErr = setsockopt(Winsock1.SocketHandle, SOL_SOCKET, SO_BROADCAST,
optval, Len(optval))

..but it always returns -1 (SOCKET_ERROR). I presume I should call
setsockopt after the Winsock1.Bind function call.

I don't know if the socket handle returned by the ocx is the same as
the one it passes to the winsock layer.

Regards
Colin.

4. bluetooth socket error 10050 - Pocketpc Developer

5. Socket Error # 10038 Socket operation on non-socket

We develop an app that receive files from an ftp server, usin idFTP 
component. This app was send to some clients in different places. All they 
connect to the same ftp server normally, list de ftp directory contet, and 
download the apropriate files.
But one of them report an error to us: when the idFTP list command was 
execute, the app generates an exception with the message "Socket Error # 
10038 Socket operation on non-socket".
The passive property is set to false, an no proxy is in use. What can cause 
this problem ?



6. Socket Error 10038 on Multicast Socket

7. windows socket error 10106 simply trying to get a socket

I have a program A that will open a socket and listen.  Just prior to 
listening, it spawns a process B using createprocess.  This new process B 
also opens a socket and then connects to the first process A.

However, process B is failing to open a socket with errror:
The requested service provider could not be loaded or initialized. (10106)

Any ideas why this would be?  Process B can successuflly open a socket if I 
launch it stand alone, rather then be created by process A...

8. Socket and NAT-Router, Asynchronous socket error