Am Thu, 24 Sep 2009 18:46:01 +0300 schrieb Murat Demirten:
Hello Murat,
I was not able to run your application, with the same error:
> ./wpa
Initialize
terminate called after throwing an instance of 'DBus::Error'
what(): The name fi.epitest.hostap.WPASupplicant.Interface was not
provided by any .service files Aborted
The reason for my system is probably that I've this DBus service not
running. I use wicd, not sure if this conflicts in any way.
But I tried something else to verify DBus::Connection::SystemBus
working (I most use SessionBus). I took the dbus-browser example from
dbus-c++ sources and changes SessionBus to SystemBus in line 129. There
you could browse the systembus.
Maybe from reading and hacking this example you get your example
working.
regards
Andreas
> Hi Andreas,
> I learned new things about dbus and now I'm working a fork of ruby
> dbus bindings.
>
> There was problems with some programs for example wpa_supplicant which
> doesn't provide introspection, source code also doesn't include any
> xml service definition files.
>
> So, I can find the signal and method names form wpa_supplicant's
> source code and I can call them with ruby dbus bindings.
>
> But, when I want to use it with dbus-c++ it gives me a dbus error
> like that: terminate called after throwing an instance of
> 'DBus::Error' what(): The name
> fi.epitest.hostap.WPASupplicant.Interface was not provided by
> any .service files
>
> In this example, I'm calling wpa_supplicant's state method, which just
> returns a string like "COMPLETED", "SCANNING" etc.
>
> I wrote a wpa.xml declaration file, and I'm sending a dummy code which
> compiles and shows the problem.
> Now wpa signals work properly (you can see that if you comment out
> line 19 of main.cpp)
>
> but I cannot call simple state() method on that interface.
>
> I'm sending whole source to you which includes test.rb file also
> (simple ruby implementation of wpa_supplicant's state() method)
>
> So, I want to find what wrongs and if I could find the problem, my
> next job will be to write a good documentation about that :)
>
> If you have any free time to look at this example, I'll be very glad.
>
> Regards,
>
> 2009/8/12 Andreas Volz <and...@tu...>
>
> > Am Fri, 7 Aug 2009 18:05:56 +0300 schrieb Murat Demirten:
> >
> > Hello Murat,
> >
> > to be honest, I don't know much about the .service stuff in DBus. I
> > never used it. I think it starts a defined service provider binary.
> > Maybe read this:
> >
> >
> > http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-starting-services
> >
> > Are you trying to do something like this?
> >
> > regards
> > Andreas
> >
> > > Hi,
> > >
> > > I want to write both of you because I'm working on this problem in
> > > last 4 dayse maybe you can show correct way to me.
> > >
> > > I just want to use Avahi services from DBus and it seems ok for
> > > some scenarios. For example, I can make an
> > > org.freedesktop.Avahi.Server interface and call the
> > > ServiceBrowserNew() method on it.
> > >
> > > Then, it returns a DBus::Path object and after that I can make a
> > > new instance of ServiceBrowser object with this path (
> > > http://avahi.org/download/ServiceBrowser.introspect.xml)
> > > It triggers the correct signal functions, ItemNew and ItemRemove,
> > > it is ok..
> > >
> > > But, with the same flows I couldn't use the EntryGroup interface.
> > >
> > > Firstly, I take a new DBus::Path from Server interface with
> > > EntryGroupNew() method
> > > (http://avahi.org/download/Server.introspect.xml) After that I'm
> > > trying to create a new EntryGroup interface as before, and it
> > > seems ok. But when I call a method from this objects, it says
> > > "The name org.freedesktop.Avahi.EntryGroup was not provided by
> > > any .service files"
> > >
> > > I tried to debug c++ api a lot but couldn't find a solution. It
> > > is ok if I use the avahi C client api directly.
> > >
> > > So, I want to ask that if there is a known problem with dbus-c++
> > > api or between avahi dbus interface?
> > >
> > > Regards,
> >
> >
> > --
> > Technical Blog <http://andreasvolz.wordpress.com/>
> >
>
>
>
> --
> Murat Demirten
> Genel Müdür
> YeniHayat Bilişim Teknolojileri A.Ş.
> http://www.yh.com.tr
> (212) 210 77 36 (PBX)
|