RE: UDP over Bluetooth



Hi Norman,
Nice to see you!

socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
which doesn't say AF_BTH either. So maybe sockets accessing Bluetooth
directly have to be TCP, but sockets accessing Bluetooth indirectly via
IP
can be either UDP or TCP? Maybe something in Windows is emulating UDP on
top of TCP? Is this dependable?
Based on TCP/IP protocol, TCP and UDP are all in Transport Layer, in
another word, they are parallel and have not any dependence. Comparing with
TCP, UDP is simpler, faster and cheaper than TCP. UDP is connectionless and
unreliable which means that it does not establish a virtual circuit like
TCP. So in theory, there shouldn't be anything to emulating UDP on top of
TCP.

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security



--------------------
From: "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx>
Subject: UDP over Bluetooth
Date: Thu, 9 Mar 2006 16:58:02 +0900
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="iso-2022-jp";
reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <OyfP280QGHA.5728@xxxxxxxxxxxxxxxxxxxx>
Newsgroups: microsoft.public.win32.programmer.networks
NNTP-Posting-Host: p1185-ipad501marunouchi.tokyo.ocn.ne.jp 222.148.32.185
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl
microsoft.public.win32.programmer.networks:29236
X-Tomcat-NG: microsoft.public.win32.programmer.networks

I wrote some code that communicates between Windows XP and a device using
UDP over WiFi and it worked as expected. Next I changed the transport to
UDP over Bluetooth and it worked when I thought it wasn't supposed to.
Now,
is this configuration working because of an accident of undocumented
behaviour or did it sneak into the category of defined behaviour? If it's
undocumented then of course I have to fix it to use TCP when the transport
is Bluetooth.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bluetooth/
bluetooth/bluetooth_and_socket.asp
The af parameter of the socket function is always set to AF_BTH for
Bluetooth sockets.
The type parameter of the socket function is always SOCK_STREAM;
SOCK_DGRAM sockets are not supported by Bluetooth.
For the protocol parameter, BTHPROTO_RFCOMM is the supported protocol.
For more information, see the Windows Sockets documentation in the
Platform SDK.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/wi
nsock/socket_2.asp
doesn't seem to say now, but I thought I had previously read an assertion
there too that Bluetooth doesn't support UDP.

This is still the actual code:
socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
which doesn't say AF_BTH either. So maybe sockets accessing Bluetooth
directly have to be TCP, but sockets accessing Bluetooth indirectly via IP
can be either UDP or TCP? Maybe something in Windows is emulating UDP on
top of TCP? Is this dependable?



.



Relevant Pages

  • Re: Multi-Threaded server which can handle UDP, TCP clients
    ... any of the sockets have pending data. ... A TCP packet is a different packet type from a UDP packet. ...
    (comp.os.linux.networking)
  • UDP over Bluetooth
    ... UDP over Bluetooth and it worked when I thought it wasn't supposed to. ... If it's undocumented then of course I have to fix it to use TCP when the transport is Bluetooth. ... The type parameter of the socket function is always SOCK_STREAM; SOCK_DGRAM sockets are not supported by Bluetooth. ... see the Windows Sockets documentation in the Platform SDK. ...
    (microsoft.public.win32.programmer.networks)
  • Re: UDP over Bluetooth
    ... this answer IMHO means that sockets using AF_BTH ... When you use regular UDP, ... UDP is a Transport layer protocol, ... not a Bluetooth address or MAC Address. ...
    (microsoft.public.win32.programmer.networks)
  • Re: UDP, Telnet
    ... >between UDP and Telnet? ... but I don't see a corresponding UDP thingie. ... You really want to know the difference between UDP and TCP. ... The common programming interface to TCP/IP is sockets (Windows sockets ...
    (sci.electronics.design)
  • Re: Netstat zeigt UDP established
    ... TCP entleihen um das zu implementieren? ... Auch die TCP Programmierschnittstelle mit ihrer Semantik ist im ... Sockets sind eine Abbildung der Protokollsemantik auf die ... anstatt ein passendes einfach neu zu implementieren. ...
    (de.comp.security.misc)

Loading