This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Improvements to Bluetooth support
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, pclifford
Priority: normal Keywords: patch

Created on 2004-04-04 11:44 by pclifford, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bluetooth.diff pclifford, 2004-04-04 11:44
Messages (2)
msg45701 - (view) Author: Paul Clifford (pclifford) Date: 2004-04-04 11:44
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.
msg45702 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-06-03 09:25
Logged In: YES 
user_id=21627

Thanks for the patch. Applied as socketmodule.c 1.290.
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40119
2004-04-04 11:44:10pcliffordcreate