attendance system in pybluez

luofeiyu elearn2014 at gmail.com
Sat Aug 9 23:07:23 EDT 2014


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?
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140809/f82c3e94/attachment.html>


More information about the Python-list mailing list