in the http://homepages.ius.edu/rwisman/C490/html/PythonandBluetooth.htm

*Discovery*

   The address and name of enabled devices within range can be
   discovered by other Bluetooth devices. Discovery can take some time
   to complete, given that radio communications is unreliable. The
   following displays address and name of all enabled devices nearby.

       from bluetooth import *

       print "performing inquiry..."

       *nearby_devices = discover_devices(lookup_names = True)*

       print "found %d devices" % len(nearby_devices)

       for name, addr in nearby_devices:
             print " %s - %s" % (addr, name)

       performing inquiry...
       found 2 devices
       Ray's Nokia - 00:12:D2:5A:BD:E4
       Ray's MacBook - 00:1E:C2:93:DA:6F



On 8/9/2014 4:53 AM, Steven D'Aprano wrote:
luofeiyu wrote:

I want to write a program to help my teacher to take attendence.

There are 300 students in a big room,everyone has android phone.
If your students allow strange devices to connect to their android phones,
then they won't remain their android phones for very long. They will belong
to whatever hacker takes control of them first.

http://blog.kaspersky.com/bluetooth-security/


I have matched them with my pc in win7 .
when all of them seated on the classroom,

import bluetooth
nearby_devices = bluetooth.discover_devices(lookup_names = True)
print("found %d devices" % len(nearby_devices))


The function can discover all of them ? 300 bluetooth mac address?
You will have to ask the author of the bluetooth module. Where did you find
it? Does it come with documentation? Did you read it?




-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to