Page 2 of 8 FirstFirst 12345678 LastLast
Results 11 to 20 of 76

Thread: Fusion Brain program for Linux

  1. #11
    Newbie
    Join Date
    Dec 2008
    Posts
    28
    Nice work getting this far!

    Can you please post up the command line app & source?
    osx has libusb 0.1.12 and I'd like to have a go at compiling under Darwin.

    Thanks.

  2. #12
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,560

    FusionBrain Daemon

    Using malcom2073's lib, I created a simple daemon that exposes a DBus interface to the fusion brain.

    This should (IMHO), be used in place of direct access to the library for most applications. DBus's IPC allows you to code in any language that has DBus bindings: Python, C++, C, C#, Java, Ruby, etc, etc, etc rather than just pure C++ which is what the library is written in.

    This is developed for the OpenICE platform under the GPL license.

    To install, run qmake, make. Copy FusionBrain.conf to /etc/dbus-1/system.d/. Run as root.

    See fbddbus.xml for information on the DBus methods and signals available.

    Have fun!
    fbd.tar.gz
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  3. #13
    Maximum Bitrate Crinos's Avatar
    Join Date
    Mar 2009
    Location
    Kristiansand, Norway
    Posts
    489
    I do not have Fusion Brain, but still... SWEEEEEEEEETES!

  4. #14
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Fantastic work guys!

    As soon as I learned about the Fusion Brain I ordered one and it arrived today. I couldn't resist giving it a whirl so I downloaded/built Malcom's FB package and giggled like a little schoolgirl as I toggled LEDs

    I then downloaded/built Kev's fbd and ran it per the instructions above. I know next to nothing about dbus so figured a quick commandline test was a good start, but I ran into problems. It's past my bedtime (I'm getting old) so I figured I'd ask in case there was a quick answer. Using dbus-send, I'm not sure how to toggle one of the digital outputs. I have #1 turned on right now so I tried to turn it off with

    cgalpin@jaunty:~/fbd$ dbus-send --session --print-reply --dest="org.openice.fbd" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int16:1 boolean:false
    Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.openice.fbd was not provided by any .service files
    cgalpin@jaunty:~/fbd$ dbus-send --session --print-reply --dest="org.openice.fbd.fusionbrain" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int16:1 boolean:false
    Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.openice.fbd.fusionbrain was not provided by any .service files

    As you can see, it doesn't seem to understand the destinations. Any ideas? I tried a few other things and perhaps made progress with

    cgalpin@jaunty:~/fbd$ dbus-send --system --print-reply --dest="org.openice.fbd" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int16:1 boolean:false
    Error org.freedesktop.DBus.Error.UnknownMethod: No such method 'SetSingleOutput' in interface 'org.openice.fbd.fusionbrain' at object path '/org/openice/fbd' (signature 'nb')

    Also, I first build FB using libusb-1.0-0 since it was newer, and other than a #include and a makefile tweak it built and ran fine. When I went to build fbd, there were a boatload of differences to both FB, but also the version of usb. I started making the changes from usb to libusb but then started finding functions that didn't seem to have libusb analogs and gave up and just installed libusb-0.1-4 and libusb-dev and it built fine unmodified. In a nutshell, what is the difference between these versions?

    Anyway, just wanted to say thanks and I look forward to being able to get this working, and take some time to contribute myself.

    charles

  5. #15
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,560
    Quote Originally Posted by cgalpin View Post
    Fantastic work guys!

    As soon as I learned about the Fusion Brain I ordered one and it arrived today. I couldn't resist giving it a whirl so I downloaded/built Malcom's FB package and giggled like a little schoolgirl as I toggled LEDs

    I then downloaded/built Kev's fbd and ran it per the instructions above. I know next to nothing about dbus so figured a quick commandline test was a good start, but I ran into problems. It's past my bedtime (I'm getting old) so I figured I'd ask in case there was a quick answer. Using dbus-send, I'm not sure how to toggle one of the digital outputs. I have #1 turned on right now so I tried to turn it off with

    cgalpin@jaunty:~/fbd$ dbus-send --session --print-reply --dest="org.openice.fbd" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int16:1 boolean:false
    Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.openice.fbd was not provided by any .service files
    cgalpin@jaunty:~/fbd$ dbus-send --session --print-reply --dest="org.openice.fbd.fusionbrain" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int16:1 boolean:false
    Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.openice.fbd.fusionbrain was not provided by any .service files

    As you can see, it doesn't seem to understand the destinations. Any ideas? I tried a few other things and perhaps made progress with

    cgalpin@jaunty:~/fbd$ dbus-send --system --print-reply --dest="org.openice.fbd" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int16:1 boolean:false
    Error org.freedesktop.DBus.Error.UnknownMethod: No such method 'SetSingleOutput' in interface 'org.openice.fbd.fusionbrain' at object path '/org/openice/fbd' (signature 'nb')

    Also, I first build FB using libusb-1.0-0 since it was newer, and other than a #include and a makefile tweak it built and ran fine. When I went to build fbd, there were a boatload of differences to both FB, but also the version of usb. I started making the changes from usb to libusb but then started finding functions that didn't seem to have libusb analogs and gave up and just installed libusb-0.1-4 and libusb-dev and it built fine unmodified. In a nutshell, what is the difference between these versions?

    Anyway, just wanted to say thanks and I look forward to being able to get this working, and take some time to contribute myself.

    charles
    I would use (and do use) a utility like qdbusviewer to test fbd. You can use it to browse the system bus to find the org.openice.fbd service and even test out the different functions. If it isn't running there, be sure to copy the fusionbrain.conf to the right dbus directory and restart dbus (or the entire machine). By default, dbus will not allow services to register on the system bus.

    hope that helps.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  6. #16
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,144
    Quote Originally Posted by cgalpin View Post
    Also, I first build FB using libusb-1.0-0 since it was newer, and other than a #include and a makefile tweak it built and ran fine. When I went to build fbd, there were a boatload of differences to both FB, but also the version of usb. I started making the changes from usb to libusb but then started finding functions that didn't seem to have libusb analogs and gave up and just installed libusb-0.1-4 and libusb-dev and it built fine unmodified. In a nutshell, what is the difference between these versions?

    Apparently 0.1 was developed by one person and stabilized, then a second person took over and re-did it and it became 1.0. I used 0.1 because most distros have binaries for 0.1, but not as many have them for 1.0.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  7. #17
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Ok 0.1 sounds good. What about the differences between the FB versions used in the FB package and the fbd one? I'd be happy to help get these checked in somewhere and versioned to help keep track of things.

    Kev, thanks for the pointer to qdbusviewer. It at least let me verify everything was working (other than my dbus-send attempt). It turns out I was using int16 instead of int32 which made the method signature not match (and the error message is slightly misleading so it took me a while to figure it out )

    Anyway, this is a working test from the commandline

    dbus-send --system --print-reply --dest="org.openice.fbd" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int32:1 boolean:true

    I also got the same hello world style test working from apache/php which is something bugbyte wants to do. I'll document it in his linux newbie thread, but I feel like we need to wiki this kind of thing to make it easier for others to start using this stuff. I assume openice.org is the preferred place?

  8. #18
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,560
    Quote Originally Posted by cgalpin View Post
    Ok 0.1 sounds good. What about the differences between the FB versions used in the FB package and the fbd one? I'd be happy to help get these checked in somewhere and versioned to help keep track of things.

    Kev, thanks for the pointer to qdbusviewer. It at least let me verify everything was working (other than my dbus-send attempt). It turns out I was using int16 instead of int32 which made the method signature not match (and the error message is slightly misleading so it took me a while to figure it out )

    Anyway, this is a working test from the commandline

    dbus-send --system --print-reply --dest="org.openice.fbd" /org/openice/fbd org.openice.fbd.fusionbrain.SetSingleOutput int32:1 boolean:true

    I also got the same hello world style test working from apache/php which is something bugbyte wants to do. I'll document it in his linux newbie thread, but I feel like we need to wiki this kind of thing to make it easier for others to start using this stuff. I assume openice.org is the preferred place?
    yep, openice.org would be the place. I've also checked this into the linuxice svn repository: https://linuxice.svn.sourceforge.net...uxice/packages

    Hopefully we can get some packages made so it can be included in the LinuxICE2 testing.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  9. #19
    Low Bitrate UniqelyCommon's Avatar
    Join Date
    Nov 2008
    Location
    Behind you.
    Posts
    76
    much happiness

  10. #20
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Malcom, do you have this checked in somewhere or are you working out of the fbd kev checked in (https://linuxice.svn.sourceforge.net...e/packages/fbd )? I'm interested in getting the latest version to see if there are any changes related to getting analog values.

    Thanks,
    charles

Page 2 of 8 FirstFirst 12345678 LastLast

Similar Threads

  1. *NEW* USB Input/Output Board -- Fusion Brain
    By 2k1Toaster in forum Fusion Brain
    Replies: 1123
    Last Post: 02-22-2010, 02:33 AM
  2. Replies: 17
    Last Post: 01-16-2009, 09:48 AM
  3. Replies: 3
    Last Post: 09-23-2008, 09:00 PM
  4. How to add a Fusion Brain instance to your configuration file
    By 2k1Toaster in forum FB Documentation and Tutorials
    Replies: 0
    Last Post: 06-07-2008, 08:42 AM
  5. Noob has some biginner questions about the Fusion Brain
    By phreaknes in forum Fusion Brain
    Replies: 14
    Last Post: 04-29-2008, 02:57 AM

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
  •