Results 1 to 4 of 4

Thread: D-Bus communication over the network

  1. #1
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default D-Bus communication over the network

    Hello,

    Is it possible to connect to the d-bus daemon running on the remote host?
    I've started d-bus daemon on the hostA (192.168.0.1 ) port 12345,
    in the config file the <listen>"tcp:host=192.168.0.6,port=12345"</listen> statement is given.
    After the daemon has been started, it is possible to call the telnet 192.168.0.1 12345 from a remote host (192.168.0.2)

    QDBusConnection::connectToBus("tcp:host=192.168.0. 6,port=12345", "test").isConnected();
    does not work (returns false)

    My question:
    Is it possible to connect to the remote d-bus daemon, if yes than how to do this?
    Is there any description?

    Thanks for any hint.

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: D-Bus communication over the network

    From D-BUS Specification http://www.freedesktop.org/wiki/Intr...&redirect=DBus

    You can read
    Introduction to D-Bus

    D-Bus is an inter-process communication mechanism—a medium for local communication between processes running on the same host. (Inter-host connects may be added in the future, but that is not what D-Bus is meant for).
    so, the answer for your question is NO.
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: D-Bus communication over the network

    Actually it is not that simple. D-BUS has a mechanism for connecting across network. The thing is only peer-to-peer connections work, not master-slave connections to a remote bus. At least that was the situation two years ago when we were investigating it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Smile Re: D-Bus communication over the network

    It Works!!!
    Since the version 1.4.1 it is possible to set the
    <alow_anonymous/>
    tag in the d-bus daemon configuration file.
    The file shall contain e.g. following listen tag
    <listen>tcp:host=192.168.0.1,port=12345</listen>
    A D-Bus daemon shall be started on the according host, using this configuration file.
    Than it is possible to open the QDBusConnection over the network. D-Bus works as an ORB !!!

    QDBusConnection::connectToBus("tcp:host=192.168.0. 1,port=12345","myConnection");

    Many thanks to Pavel Strashkin (dbus@lists.freedesktop.org) for help.

Similar Threads

  1. Communication with USB
    By prasenjit in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2010, 00:19
  2. Qt and .Net communication
    By soniaerm in forum Qt Programming
    Replies: 0
    Last Post: 22nd April 2010, 06:37
  3. Network Communication Architecture
    By mhoover in forum Qt Programming
    Replies: 2
    Last Post: 30th May 2009, 03:49
  4. USB communication
    By M. Bashir in forum Qt Programming
    Replies: 1
    Last Post: 29th January 2008, 02:56
  5. Communication Help Pls
    By munna in forum Newbie
    Replies: 1
    Last Post: 25th May 2006, 13:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.