Results 1 to 6 of 6

Thread: DBus over Network?

  1. #1
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question DBus over Network?

    Hi all,

    well I got my DBus applications running on Windows and Linux

    Now I want to use the DBus functionality across an intranet.

    I tried and configured and read and searched and tried again.... Up to now I still dont know if this is possible when using QtDBus and which settings to use.

    ::Scanario::
    Imagine some clients and one server. I can configure them all as I want to with dbus-daemon or not, firewalls off. The clients are demanding services and data by DBus from the server.

    The point is simple, I got a high performance multi-application scenario with powerfuel algorithms but not a lot of data flow. These algos need a lot of CPU power, so I can not start them all locally on the linux embedded system. Some apps I have to start on more powerfuel machines. The software dont need to know if it is started locally or on other systems if I could use DBus. If processor performance grows I just could start the apps all on embedded side without recompiling

    ::Tests::
    My tests did'nt bring up any connection by configuring:

    - dbus env.variables
    - session.conf
    - system.conf

    ::#1 thought::
    I thought about setting the session.conf to use listen for services on a specific IP/DNS (just replace localhost) but I did not succeed. Will I need a dbus-daemon on client side or may be it is enough to set the dbus environment variables to look for a remote dbus-daemon?

    ::#2 thought::
    I have to changed something inside the QtDBus settings and recompile the QtDBus libs

    ::#3 thought::
    It is not possible, because DBus TCP usage differs from 'normal' TCP usage. DBus is event based and puts all content into one single big package where standard TCP will split packages into many.

    ::#4 thought::
    Mikael Hallendal wrote he once implemented an dbus-transporter for TCP but he do not know if it is still working...

    Thanks for reading my poor english.
    I hope you can enlighten me.
    Sebastian

  2. #2
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: DBus over Network?

    Sebastian,

    If it is not a closely guarded secret - can you please post a short instructions and a sample of compiling and using DBus on Windows?

  3. #3
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: DBus over Network?

    Well, I can.

    1st I received an answer from the QtDBus master himself:
    It is possible, but without authentication and cryptography support.
    ... but I am on my own to figure out how to
    So this toppic still lurks for a solution.

    I'll reply soon some samples.

  4. The following user says thank you to shensel for this useful post:

    QPlace (25th March 2009)

  5. #4
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: DBus over Network?

    Thank you!
    I am very excited that you agreed to help with this issue and I am looking forward to read the instruction of how to successfully compile QtDBus for windows and may be a simplest sample of usage on Windows.

  6. #5
    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: DBus over Network?

    We have tried to launch D-BUS over network in a heterogenous (Linux/Windows) environment but it didn't work. The Windows D-BUS implementation was simply crashing (maybe it wasn't mature enough at the time), guys at (then) Trolltech said it wasn't possible to make a network connection between two busses, etc. What seemed possible (although didn't work because of the crashing Windows implementation) was a peer-to-peer network connection between two clients.

    Then I came up with an idea to solve the problem. I thought about creating a simple application that would act as a proxy - it would be installed on both machines and would register objects on a local bus that would be pointed out by the remote end. Then if any message came to the proxy object, it would be transferred over network to the other end of the proxy and distributed on the other bus (and vice versa). I didn't find time to actually implement it but conceptually it should work. If you have time to spare, you could try implementing such a proxy system.
    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.


  7. The following user says thank you to wysota for this useful post:

    shensel (26th March 2009)

  8. #6
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: DBus over Network?

    thx wysota. WinDBus works, but I also saw the crashes you described with the latest Version of dbus-daemon when trying to communicate over network.

    My little WinDBus to QtDBus description:

    1. download bin, src and libs from http://sourceforge.net/projects/windbus
    (I picked the msvc version)
    2. you don't need to compile WinDBus, it is already build
    3. copy src into: c:\Qt\4.5.0\src\dbus\dbus (131 files, no more subdirs)
    4. copy dbus-1.dll and dbus-1d.dll to c:\Qt\4.5.0\bin
    (QtDBus libs and dlls will look for it, but you wont get an error if it isn't found)
    5. copy dbus-1.lib and dbus-1d.lib to c:\Qt\4.5.0\lib
    6. copy dbus executables to something like
    C:\Qt\dbus-1.2.4.1\msvc\bin\
    C:\Qt\dbus-1.2.4.1\msvc\etc\
    libexpat.dll must be in the \bin\ too

    now you have to rebuild the Qt which will also build up QtDBus4.lib QtDBusd4.lib QtDBus4.dll QtDBusd4.dll

    1. run Start/Programs/MS VC 2005/MS VC Tools/Visual Studio 2005 Command Prompt
    2. goto c:\Qt\4.5.0\
    3. you have to configure Qt to build up makefiles with nmake then.
    3.1 nmake confclean (enter) do this 1st. nothing happensif this is your 1st time
    3.2 configure -debug_and_release -dbus (enter)
    //optional: -qt-sql-sqlite -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -qt-style-windows -qt-style-windowsxp -qt-style-windowsvista -qt-style-plastique
    3.3 call nmake (enter) ... wait some hours or call nmake in c:\Qt\4.5.0\src\dbus

    4. if everything succeeded you got
    QtDBus4.lib QtDBusd4.lib QtDBus4.dll QtDBusd4.dll
    in c:\Qt\4.5.0\lib\

    TEST
    run C:\Qt\dbus-1.2.4.1\msvc\bin\dbus-launch.exe (starts dbus daemon)
    run C:\Qt\dbus-1.2.4.1\msvc\bin\dbus-monitor.exe
    execute the samples which can be found in
    C:\Qt\4.5.0\examples\dbus\

    within the bin\ look for qdbusviewer.exe too

    thats it. then you can try to change the samples for experimenting
    have fun!

    Sebastian

Similar Threads

  1. Replies: 12
    Last Post: 22nd March 2009, 11:22
  2. Replies: 0
    Last Post: 5th February 2009, 23:41
  3. Checking network availability
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2008, 19:23
  4. No network when Modem Emulator connect to a real device
    By tommy_tang in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 10th December 2007, 08:24
  5. QSocket - signal for network wire disconnection
    By manivannan_1984 in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2006, 13:52

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.