()
| 46 | f=os.popen(zcmd)#------------send the command to terminal. |
| 47 | |
| 48 | def BluetoothScan():#-----------------------Performs the actual scan for Bluetooth Devices |
| 49 | f = os.popen("hcitool scan")#-----------Sends the command to the terminal |
| 50 | for i in f.readlines():#-----------------Step through the list of information returned from the above command. |
| 51 | if (i.find(":") != -1):#-------------search for the ":" symbol. |
| 52 | DevAdd =i[1:18]#-----------------If it's found then strip out the device bluetooth address |
| 53 | DevLab=i[19:-1]#------------------and then strip out the device name |
| 54 | x=DevLab#------------------------a copy of the Device label/name |
| 55 | scan.append(x)#-------------------add the device to the array |
| 56 | |
| 57 | while 1:#------------------------------------------start to loop forever |
| 58 | BluetoothScan()#--------------------------------Perform the scan for devices |
no test coverage detected