Re: attendance system in pybluez

2014-08-11 Thread Michael Torrie
On 08/09/2014 09:07 PM, luofeiyu wrote:
 in the http://homepages.ius.edu/rwisman/C490/html/PythonandBluetooth.htm
 
 *Discovery*

That only works for phones if the phones are manually switched to
discoverable mode, which is off by default for security reasons.  By
default they are not going to show up on your discovery scans.

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


attendance system in pybluez

2014-08-09 Thread luofeiyu

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

can i search for a given bluetooth mac?

blue_mac=[]  (i can write it in a list in advance,it is not blank,full 
of strings)


for add in blue_mac:
 print(bluetooth.seacrh_given_mac) #result is true or false

Is there a function to run?



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


Re: attendance system in pybluez

2014-08-09 Thread Steven D'Aprano
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?



-- 
Steven

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


Re: attendance system in pybluez

2014-08-09 Thread luofeiyu

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


Re: attendance system in pybluez

2014-08-09 Thread Terry Reedy

On 8/9/2014 12:26 PM, Dennis Lee Bieber wrote:

On Sat, 09 Aug 2014 14:01:53 -0700, luofeiyu elearn2...@gmail.com
declaimed the following:


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.
I have matched them with my pc in win7 .
when all of them seated on the classroom,


As soon as I learned someone was using bluetooth presence to determine
I was in such a class -- I'd turn the bluetooth feature off!


And if attendance was part of your grade?

Actually, I agree with you and Steven that the premise that all have an 
android phone, with battery charge, turned on, with bluetooth enabled, 
is a bit dubious.  At the Univesity of Delaware, students buy a 
'clicker', about $20, with an ID (I presume) and a few buttons for 
answering pop quizzes.  I can only guess that they use bluetooth, but 
with extremely limited function and probably no writable memory, power 
draw is minimal and hijacking not an issue.


--
Terry Jan Reedy

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


Re: attendance system in pybluez

2014-08-09 Thread Chris Angelico
On Sun, Aug 10, 2014 at 3:43 AM, Terry Reedy tjre...@udel.edu wrote:
 And if attendance was part of your grade?


Then it'd be easy enough to prove that you were actually there, and
therefore that the find a Bluetooth device method is flawed.

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