You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ruby-dbus to attempt a Bluetooth serial profile callback, and I'm
running into a "Tried to send message with Unix file descriptors to a client that
doesn't support that." error message from dbus.
It's entirely possible I'm defining the callback incorrectly, but I think that's
correct. Example profile definition and registration (as defined here)
classSerialConnection < DBus::Objectdbus_interface('org.bluez.Profile1')dodbus_method(:Release)doputs"... release"nilenddbus_method(:NewConnection,"in device:o, in fd:h, in fd_props:a{sv}")do |device,fd,fd_props|
puts"... incoming connection %p %p %p" % [device,fd,fd_props]# sock = Socket.for_fd( fd )# ...nilenddbus_method(:RequestDisconnection,"in device:o")do |device|
puts"... disconnect"nilendendendserial_conn=SerialConnection.new('/serial/connection')bluez_service=DBus::SystemBus.instance.service('org.bluez').introspectbluez_profile_manager=bluez_service['/org/bluez']['org.bluez.ProfileManager1']bluez_profile_manager.RegisterProfile(serial_conn.path,'1101',{'Name'=>'Serial Port','Role'=>'server','RequireAuthorization'=>false,'Channel'=>DBus.variant('q',22)});# ... enter dbus main loop here
When an RFCOMM compatible client connects, the dbus monitor shows it disconnect
immediately (the callback doesn't fire at all).
You're right, UNIX_FD is not actually implemented.
A major reason is that the spec is vague about the file descriptors are actually passed, and I was not determined enough to dig it up in other implementations.
The Bluetooth use case looks a bit complex but fortunately there's UDisks OpenDevice which is simple enough for me to try and figure it out.
Found this project as well, and I can confirm it works -- clearly a very specific use case, and using a gio library C extension - but more stuff to dig into to see what is going on under the hood, at least. (I'll also be diggin'...)
Heya!
I'm using ruby-dbus to attempt a Bluetooth serial profile callback, and I'm
running into a "Tried to send message with Unix file descriptors to a client that
doesn't support that." error message from dbus.
It's entirely possible I'm defining the callback incorrectly, but I think that's
correct. Example profile definition and registration (as defined here)
When an RFCOMM compatible client connects, the dbus monitor shows it disconnect
immediately (the callback doesn't fire at all).
It seems like it's complaining specifically about the second argument to the
NewConnection method.
Is there a different path I should be taking to tackle this?
Thanks for any insight provided.
The text was updated successfully, but these errors were encountered: