Re: dell bluetooth mouse and keyboard do not work after "successful" pairing with simple-agent.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dick wrote:
> Hi Jelle,
> 
> Have you tried using hidd --search or hidd --connect?
> If you don't have hidd try the following hidtool.py python script.
> 
> Succes er mee!
> 
> #!/usr/bin/python
> import sys
> import getopt
> import dbus
> 
> bus = dbus.SystemBus()
> 
> bmgr = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
> 'org.bluez.Manager')
> bus_id = bmgr.ActivateService('input')
> 
> imgr = dbus.Interface(bus.get_object(bus_id, '/org/bluez/input'),
> 'org.bluez.input.Manager')
> 
> optlist, args = getopt.getopt(sys.argv[1:], '',
> ['list','connect=','disconnect=','help'])
> 
> for opt,val in optlist:
> 	if opt == '--list':
> 		for path in imgr.ListDevices():
> 			idev = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.input.Device')
> 			print "%s Name: \"%s\" ID: %04x:%04x Connected: %i" % (path, idev.GetName(),
> idev.GetProductId(), idev.GetVendorId(), idev.IsConnected())
> 	elif opt == '--connect':
> 		path = ''
> 		if (val[0] == '/'):
> 			path = val
> 		else:
> 			path = imgr.CreateDevice(val)
> 		idev = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.input.Device')
> 		idev.Connect()
> 	elif opt == '--disconnect':
> 		imgr.RemoveDevice(val)
> 	else:
> 		print 'usage: ', sys.argv[0], '[ --list, --connect=[XX:XX:XX:XX:XX,
> /org/bluez/input/device0], --disconnect=/org/bluez/input/device0, --help ]'
> 		break
> 

Thank you Dick for taking the time to response. Two small comments, the
developers list is moving to linux-bluetooth@xxxxxxxxxxxxxxx and the
hidd program is being replaced/depreciated.

I will try your python script, where can i find the upstream source
place? is it somewhere in the testing directory of the bluez git?

Thanks in advance,

Jelle

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bluez-devel

[Index of Archives]     [Linux Bluetooth Devel]     [Linux USB Devel]     [Network Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux