* Bluetooth Optical Mouse BM083 and BM013
@ 2009-02-10 13:56 Jelle de Jong
2009-02-11 1:26 ` Li, Zhigang
0 siblings, 1 reply; 3+ messages in thread
From: Jelle de Jong @ 2009-02-10 13:56 UTC (permalink / raw)
To: BlueZ development
[-- Attachment #1: Type: text/plain, Size: 394 bytes --]
This message contains the following attachment(s):
Bluetooth Optical Mouse BM083 and BM013.tar.gz
Hello everybody,
I bought two new bluetooth mouses for testing and both do not work
with the simple-agent.py script. Would somebody be willing to fix the
command line tool to connect mouses? I got the logs and device
information attached in this mail.
Thanks in advance,
Best regards,
Jelle
[-- Attachment #2: Bluetooth Optical Mouse BM083 and BM013.tar.gz --]
[-- Type: application/gzip, Size: 1017 bytes --]
[-- Attachment #3: .simple-agent.py --]
[-- Type: text/x-python, Size: 3002 bytes --]
#!/usr/bin/python
import gobject
import sys
import dbus
import dbus.service
import dbus.mainloop.glib
class Rejected(dbus.DBusException):
_dbus_error_name = "org.bluez.Error.Rejected"
class Agent(dbus.service.Object):
exit_on_release = True
def set_exit_on_release(self, exit_on_release):
self.exit_on_release = exit_on_release
@dbus.service.method("org.bluez.Agent",
in_signature="", out_signature="")
def Release(self):
print "Release"
if self.exit_on_release:
mainloop.quit()
@dbus.service.method("org.bluez.Agent",
in_signature="os", out_signature="")
def Authorize(self, device, uuid):
print "Authorize (%s, %s)" % (device, uuid)
@dbus.service.method("org.bluez.Agent",
in_signature="o", out_signature="s")
def RequestPinCode(self, device):
print "RequestPinCode (%s)" % (device)
return raw_input("Enter PIN Code: ")
@dbus.service.method("org.bluez.Agent",
in_signature="o", out_signature="u")
def RequestPasskey(self, device):
print "RequestPasskey (%s)" % (device)
passkey = raw_input("Enter passkey: ")
return dbus.UInt32(passkey)
@dbus.service.method("org.bluez.Agent",
in_signature="ou", out_signature="")
def DisplayPasskey(self, device, passkey):
print "DisplayPasskey (%s, %d)" % (device, passkey)
@dbus.service.method("org.bluez.Agent",
in_signature="ou", out_signature="")
def RequestConfirmation(self, device, passkey):
print "RequestConfirmation (%s, %d)" % (device, passkey)
confirm = raw_input("Confirm passkey (yes/no): ")
if (confirm == "yes"):
return
raise Rejected("Passkey doesn't match")
@dbus.service.method("org.bluez.Agent",
in_signature="s", out_signature="")
def ConfirmModeChange(self, mode):
print "ConfirmModeChange (%s)" % (mode)
@dbus.service.method("org.bluez.Agent",
in_signature="", out_signature="")
def Cancel(self):
print "Cancel"
def create_device_reply(device):
print "New device (%s)" % (device)
mainloop.quit()
def create_device_error(error):
print "Creating device failed: %s" % (error)
mainloop.quit()
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.bluez", "/"),
"org.bluez.Manager")
if len(sys.argv) > 1:
path = manager.FindAdapter(sys.argv[1])
else:
path = manager.DefaultAdapter()
adapter = dbus.Interface(bus.get_object("org.bluez", path),
"org.bluez.Adapter")
path = "/test/agent"
agent = Agent(bus, path)
mainloop = gobject.MainLoop()
if len(sys.argv) > 2:
if len(sys.argv) > 3:
device = adapter.FindDevice(sys.argv[2])
adapter.RemoveDevice(device)
agent.set_exit_on_release(False)
adapter.CreatePairedDevice(sys.argv[2], path, "DisplayYesNo",
reply_handler=create_device_reply,
error_handler=create_device_error)
else:
adapter.RegisterAgent(path, "DisplayYesNo")
print "Agent registered"
mainloop.run()
#adapter.UnregisterAgent(path)
#print "Agent unregistered"
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Bluetooth Optical Mouse BM083 and BM013
2009-02-10 13:56 Bluetooth Optical Mouse BM083 and BM013 Jelle de Jong
@ 2009-02-11 1:26 ` Li, Zhigang
2009-02-11 10:31 ` Jelle de Jong
0 siblings, 1 reply; 3+ messages in thread
From: Li, Zhigang @ 2009-02-11 1:26 UTC (permalink / raw)
To: Jelle de Jong, BlueZ development
DQo+LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj5Gcm9tOiBsaW51eC1ibHVldG9vdGgtb3du
ZXJAdmd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raw reply [flat|nested] 3+ messages in thread
* Re: Bluetooth Optical Mouse BM083 and BM013
2009-02-11 1:26 ` Li, Zhigang
@ 2009-02-11 10:31 ` Jelle de Jong
0 siblings, 0 replies; 3+ messages in thread
From: Jelle de Jong @ 2009-02-11 10:31 UTC (permalink / raw)
To: Li, Zhigang; +Cc: BlueZ development
Li, Zhigang wrote:
>> This message contains the following attachment(s):
>> Bluetooth Optical Mouse BM083 and BM013.tar.gz
>>
>> Hello everybody,
>>
>> I bought two new bluetooth mouses for testing and both do not work
>> with the simple-agent.py script. Would somebody be willing to fix the
> Why you want use simple-agent to make mouse work?
I would like to be able to configure my system from the command line
and documented all steps to get it running. This way I can also
automate the process and provide better support. There are tons of
reasons why to use the command line.
>
>> command line tool to connect mouses? I got the logs and device
>> information attached in this mail.
>
>
> Make the mouse in paring status, Perhaps just rest some button in mouse.
> Hidd -- search
Using hidd --search is depreciated and insecure, at leased this is
tolled to in the past by some developers, so i am not using it. I am
also using the latest git and the hidd tool is disabled for compiling
by default.
>
>
>> Thanks in advance,
>>
>> Best regards,
>>
>> Jelle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-11 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-10 13:56 Bluetooth Optical Mouse BM083 and BM013 Jelle de Jong
2009-02-11 1:26 ` Li, Zhigang
2009-02-11 10:31 ` Jelle de Jong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.