diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-11 17:32:53 +0000 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-11 17:32:53 +0000 | 
| commit | 807834685aed273794a99cf1111d18825e04488d (patch) | |
| tree | d8c593fc07cc0753f1f235b485a76e09baafb798 | |
| parent | 45c36dbd276501aa76d9798a8fafe6c202db7276 (diff) | |
Make traditional PIN code request interactive
| -rwxr-xr-x | hcid/simple-agent | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/hcid/simple-agent b/hcid/simple-agent index 6a3a4abd..23ff131b 100755 --- a/hcid/simple-agent +++ b/hcid/simple-agent @@ -26,7 +26,7 @@ class Agent(dbus.service.Object):  					in_signature="o", out_signature="s")  	def RequestPinCode(self, device):  		print "RequestPinCode (%s)" % (device) -		return "1234" +		return raw_input("Enter PIN Code: ")  	@dbus.service.method("org.bluez.Agent",  					in_signature="o", out_signature="u") @@ -92,11 +92,11 @@ if __name__ == '__main__':  			device = adapter.FindDevice(sys.argv[2])  			adapter.RemoveDevice(device) -		adapter.CreatePairedDevice(sys.argv[2], path, "DisplayOnly", +		adapter.CreatePairedDevice(sys.argv[2], path, "DisplayYesNo",  					reply_handler=create_device_reply,  					error_handler=create_device_error)  	else: -		adapter.RegisterAgent(path, "DisplayOnly") +		adapter.RegisterAgent(path, "DisplayYesNo")  		print "Agent registered"  	mainloop.run() | 
