[Patches] [ python-Patches-929192 ] Improvements to Bluetooth support

SourceForge.net noreply at sourceforge.net
Thu Apr 15 16:56:17 EDT 2004


Patches item #929192, was opened at 2004-04-04 13:44
Message generated for change (Settings changed) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=929192&group_id=5470

Category: Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Paul Clifford (pclifford)
>Assigned to: Martin v. Löwis (loewis)
Summary: Improvements to Bluetooth support

Initial Comment:
This patch changes the address format used for
Bluetooth addresses from a tuple of six numbers into a
string of the form "XX:XX:XX:XX:XX:XX", as is more
commonly seen elsewhere.  I've also extended
makesockaddr so that it returns a Python object of the
type expected by bind, connect, etc, when given a
Bluetooth address struct.

A full summary of the changes to socketmodule.c:
 * Added setbdaddr and makebdaddr (conditional on the
definition of USE_BLUETOOTH), which work a bit like
setipaddr and makeipaddr.
 * Extended makesockaddr to understand Bluetooth
addresses, and added a proto argument to distinguish
between the protocols.
 * Changed getsockaddr to expect the Bluetooth
addresses as a string, not a six element tuple.
 * Changed the BDADDR_ANY and BDADDR_LOCAL constants to
strings.
 * Reformatted some of the Bluetooth code to be more
consistent with PEP 7.

I have only tested this patch under Linux, but I've
tried to follow the changes introduced by patch #888148
so it should also work under FreeBSD.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=929192&group_id=5470



More information about the Patches mailing list