10-26-2009 11:38 AM
i am not familiar with DBUS. i need to communicate with an API over DBUS and would prefer to use LabVIEW with it. Any ideas on how to do this?
Thanks in advance.
10-26-2009 01:46 PM
nobody? :--(
10-26-2009 02:01 PM
Please be a little more patient. Mostly everyone on here is volunteers. I, for one, have never heard of DBUS. Can you give us a little bit more description about it? What are you trying to use it with?
10-26-2009 02:29 PM
^ i just panicked since my thread was at the bottom of the page within a few hours. :--)
Here is some info on D-Bus [http://www.freedesktop.org/wiki/Software/dbus]:
D-BUS is an Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism originally developed for Linux to replace existing and competing IPC solutions with one unified protocol. It has also been designed to allow communication between system-level processes (such as printer and hardware driver services) and normal user processes.
http://en.wikipedia.org/wiki/D-Bus
And:
D-Bus is an IPC system for software applications to communciate with one another.
On a side note i found an additional thread on this also but not very helpful......i could have contacted one of the posted from the thread but his contact info is empty.
http://forums.ni.com/ni/board/message?board.id=140&requireLogin=False&thread.id=18637
10-27-2009 02:20 AM - edited 10-27-2009 02:22 AM
USar wrote:^ i just panicked since my thread was at the bottom of the page within a few hours. :--)
Here is some info on D-Bus [http://www.freedesktop.org/wiki/Software/dbus]:
D-BUS is an Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism originally developed for Linux to replace existing and competing IPC solutions with one unified protocol. It has also been designed to allow communication between system-level processes (such as printer and hardware driver services) and normal user processes.
http://en.wikipedia.org/wiki/D-Bus
And:
D-Bus is an IPC system for software applications to communciate with one another.
On a side note i found an additional thread on this also but not very helpful......i could have contacted one of the posted from the thread but his contact info is empty.
http://forums.ni.com/ni/board/message?board.id=140&requireLogin=False&thread.id=18637
Very helpful such information! My first assumption when seeing your topic was, ohh yet another hardware fieldbus I never heard of, not realising that you might refer to the Linux D-BUS protocol.
Knowing that now, there sure enough is a way to do D-BUS communication under LabVIEW for Linux but it will certainly involve writing an external shared library as bindings library for LabVIEW which wraps the D-BUS C API to be easily accessible in LabVIEW.
I haven't worked with D-BUS myself and only heard from it from some Open source Linux projects since D-BUS might seem to be used for desktop integration in some of the desktop frameworks but googling about it seems to indicate that its C API is fairly large and therefore the external wrapper shared library might be quite a bit of work.
Another approach would be to use the glib API from Gnome which seems to integrate D-BUS, but I have some doubts that this API is easily integrateable into LabVIEW, since LabVIEW itself is not a Gnome application at all, and even if it would be you would most probably not have access to its internal Gnome implementation of its mainloop and such.
10-27-2009 10:19 AM
Thanks for your response, Rolf. It definitely is helpful. I also spoke to some of the guys at NI also and that is what it seems like i will have to do to use LV with DBus. Unfortunately, LV does not have anything for DBus.
I think your first suggestion seems like a better solution. It would be great if i can find somebody who has already done this.
10-30-2009 09:07 AM
after doing a bit more searching, i am looking into talk to D-Bus in Windows environment over TCP/IP: using d-bus send for windows. The idea here is that i can have as many devices (api's or plugins) which communicate over D-Bus and my application/tool should be able to interface with them over D-Bus. I am not sure how TCP/IP works with D-bus. In addition i think the sending part might be easy to D-Bus but receiving (response from a device/api/plugin) might be tricky.
04-19-2023 03:03 PM
were you able to figure this out? i am currently working on a project where i will need windows machine running labview to communicate to a linux sbc via dbus. Hoping you found something even though this post is old!
04-20-2023 01:16 AM
According to this https://www.freedesktop.org/wiki/Software/dbus/#sourcecode page D-Bus is only really meant for IPC on one system although it has also an unsecured TCP transport layer. Are you sure you want to do that?
Also, D-Bus is specifically designed for desktop integration and not an universal (remote) IPC mechanism. Are you sure your use case fits that?
Creating a LabVIEW binding for libdbus, while possible, is a major project of its own. i would expect the effort to be several man weeks to months depending how much of D-Bus you need and nobody is going to give that away for free, if they even got anywhere usable with this.
I’m pretty sure that it’s much much easier to write your own little deamon on Linux in the programming language of your choice that you can communicate with through TCP with LabVIEW to send the commands and receive responses.