Announcement

Collapse
No announcement yet.

Fusion Brain program for Linux

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fusion Brain program for Linux

    Here is a library I have written to allow Fusion Brain V4 access in Linux. I have not added support for previous versions, however I will soon. This library depends on libusb-0.1 which can be installed through most distros' package management utility. (yum install libusb-devel on fedora, or apt-get install libusb-dev on debian). The ./FB program included in this package was compiled on ubuntu, so it may or may not work on other distros of linux. The source code is also included so people who cannot run the program can attempt to compile it themselves

    You will need libqt4-dev (on ubuntu) to compile this program, and then it is just a matter of "qmake && make" to compile it.

    Edit 2/28/2009: Update attached, gui program by Qt. You will need libqt4-dev to compile it, and then just run 'qmake && make' to compile. I have attached an executable, but I don't know how well that will work. I have removed the command line app, that didn't seem to get any interest.
    Attached Files
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  • #2
    FB_Coolness++;
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

    Comment


    • #3
      So where is this program?
      Tidder

      Try RevFE
      The best resurrected frontend I've ever used, period.


      I Wish I could ban people

      Comment


      • #4
        Uh, it WAS linked..... wait a few


        Edit: Main post has the link now. 'bout time someone mentioned I forgot something!
        "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
        RevFE
        My Shop

        Comment


        • #5
          Hey malcom its good too see you have already made progress on this, ill download it soon and test it out.

          -kdog

          Comment


          • #6
            Originally posted by malcom2073 View Post
            Here is a library I have written to allow Fusion Brain V4 access in Linux. I have not added support for previous versions, however I will soon. This library depends on libusb which can be installed through most distros' package management utility. (yum install libusb-devel on fedora, or apt-get install libusb-dev on debian). The ./main program included in this package was compiled in ubuntu, so it may or may not work on other distros of linux. The source code is also included so people who cannot run the program can attempt to compile it themselves

            Command line for compiling on ubuntu:
            g++ main.cpp fblib.cpp -o main `pkg-config libusb --libs --cflags`


            If you run the program from the command line with no arguments, it will print out a list of examples for how to use the program. Currently only the ability to turn digital outputs on and off, and read analog input is supported. I am working on supporting more, such as timers and pwm. If anyone who has a fusion brain and knows how to run linux, can you please test this out? I am working on a GUI interface that can either be picked apart, or embedded into Linux frontends. Nghost will soon have plugin support for the Fusion Brain as well via this library.

            Edit: I never even noticed the error message saying it didn't upload. Why didn't someone mention something! arg!

            http://www.mp3car.com/vbulletin/atta...ains-fblib.tar
            Is it possible for you to write a comedi driver for this device? http://www.comedi.org/
            This hardware looks like it would be perfect for some small robotics projects. http://www.orocos.org/

            Comment


            • #7
              Originally posted by nsaspook View Post
              Is it possible for you to write a comedi driver for this device? http://www.comedi.org/
              This hardware looks like it would be perfect for some small robotics projects. http://www.orocos.org/
              I'm sure its quite possible to adapt it to that, but that's not really useful for most carpc applications which is what this was intended for. You can feel free to use the code and adapt it to comedi (under GPL of course)


              I've edited the original post due to the fact that I rewrote the library to use libusb0.1 rather than libusb1.0. Most distros have a 0.1 binary package, making it much easier for people to compile
              "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
              RevFE
              My Shop

              Comment


              • #8
                haha I work with comedi and orocos on a daily basis

                would be sweet to set this up!

                Comment


                • #9
                  Originally posted by malcom2073 View Post
                  I'm sure its quite possible to adapt it to that, but that's not really useful for most carpc applications which is what this was intended for. You can feel free to use the code and adapt it to comedi (under GPL of course)


                  I've edited the original post due to the fact that I rewrote the library to use libusb0.1 rather than libusb1.0. Most distros have a 0.1 binary package, making it much easier for people to compile
                  I could do it using your code as a example. It looks like the register level bits are defined clearly. I've coded a pcmcia card in the comedi driver lib already and this device is pretty simple. I guess I'll have to buy a few cards for work as product examples and use one to test code with.

                  PS. I work for Microchip at the fab in Oregon. We make a lot of PIC18F wafers.

                  insert:
                  The "I work for a big public company" disclaimer:
                  The views expressed on these pages are mine alone and not those of my employer. I am not now, nor have I ever been employed to speak for anyone.

                  Comment


                  • #10
                    Originally posted by nsaspook View Post
                    I could do it using your code as a example. It looks like the register level bits are defined clearly. I've coded a pcmcia card in the comedi driver lib already and this device is pretty simple. I guess I'll have to buy a few cards for work as product examples and use one to test code with.

                    PS. I work for Microchip at the fab in Oregon. We make a lot of PIC18F wafers.

                    insert:


                    We could certainly set you up. Email us at [email protected]

                    Comment


                    • #11
                      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.

                      Comment


                      • #12
                        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.

                        Comment


                        • #13
                          I do not have Fusion Brain, but still... SWEEEEEEEEETES!

                          Comment


                          • #14
                            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

                            [email protected]:~/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
                            [email protected]:~/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

                            [email protected]:~/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

                            Comment


                            • #15
                              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

                              [email protected]:~/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
                              [email protected]:~/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

                              [email protected]:~/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.

                              Comment

                              Working...
                              X