Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain


Reply
 
Share Thread Tools Display Modes
Old 02-16-2009, 05:50 PM   #1
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,037
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
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
File Type: gz FB-Linux.tar.gz (15.9 KB, 36 views)

Last edited by malcom2073; 03-28-2009 at 11:14 AM.
malcom2073 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 02-17-2009, 12:07 AM   #2
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
FB_Coolness++;
2k1Toaster is offline   Reply With Quote
Old 02-21-2009, 11:09 PM   #3
Super Moderator & Wal-Mart Greeter
 
Tidder's Avatar
 
Join Date: Sep 2003
Location: New Mexico, USA
Posts: 3,391
Tidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant futureTidder has a brilliant future
So where is this program?
__________________
Tidder

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

Best Quote EVER!!
Quote: Originally Posted by bramlet View Post
I try to search but I usually only find posts where people ask questions and darquepervert tells them to search.

Tidder is offline   Reply With Quote
Old 02-21-2009, 11:10 PM   #4
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,037
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
Uh, it WAS linked..... wait a few


Edit: Main post has the link now. 'bout time someone mentioned I forgot something!

Last edited by malcom2073; 02-21-2009 at 11:14 PM.
malcom2073 is offline   Reply With Quote
Old 02-22-2009, 05:35 PM   #5
Newbie
 
Join Date: Mar 2008
Posts: 3
ouellettesr is an unknown quantity at this point
Hey malcom its good too see you have already made progress on this, ill download it soon and test it out.

-kdog
ouellettesr is offline   Reply With Quote
Old 03-03-2009, 11:16 PM   #6
Newbie
 
Join Date: Aug 2008
Posts: 3
nsaspook is an unknown quantity at this point
Quote: 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/
nsaspook is offline   Reply With Quote
Old 03-06-2009, 05:46 PM   #7
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,037
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
Quote: 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

Last edited by malcom2073; 03-06-2009 at 05:51 PM.
malcom2073 is offline   Reply With Quote
Old 03-06-2009, 06:06 PM   #8
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 2,197
greenman100 is on a distinguished road
haha I work with comedi and orocos on a daily basis

would be sweet to set this up!
greenman100 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 03-06-2009, 08:49 PM   #9
Newbie
 
Join Date: Aug 2008
Posts: 3
nsaspook is an unknown quantity at this point
Quote: 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:
Quote:
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.

nsaspook is offline   Reply With Quote
Old 03-07-2009, 09:41 PM   #10
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 2,197
greenman100 is on a distinguished road
Quote: 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 fusioncontrolcentre@gmail.com
greenman100 is offline   Reply With Quote
Old 05-17-2009, 05:33 AM   #11
Newbie
 
Join Date: Dec 2008
Posts: 23
nicr4wks is an unknown quantity at this point
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.
nicr4wks is offline   Reply With Quote
Old 05-21-2009, 01:52 AM   #12
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,038
kev000 will become famous soon enough
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
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Old 05-21-2009, 04:21 AM   #13
Variable Bitrate
 
Join Date: Mar 2009
Location: Kristiansand, Norway
Posts: 284
Crinos is an unknown quantity at this point
I do not have Fusion Brain, but still... SWEEEEEEEEETES!
Crinos is offline   Reply With Quote
Old 06-02-2009, 01:18 AM   #14
Constant Bitrate
 
Join Date: Aug 2007
Location: Northern VA
Posts: 125
cgalpin is an unknown quantity at this point
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

Last edited by cgalpin; 06-02-2009 at 01:26 AM. Reason: show another dbus-send attempt
cgalpin is offline   Reply With Quote
Old 06-02-2009, 01:37 AM   #15
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,038
kev000 will become famous soon enough
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.
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*NEW* USB Input/Output Board -- Fusion Brain 2k1Toaster Fusion Brain 1122 11-07-2009 12:21 AM
eyeR MOD for the Fusion Brain, add PWM, Servo and remote control. (eyeR Interceptor) Civic Modz Fusion Brain Innovations 17 01-16-2009 10:48 AM
September 9, 2008 - The Fusion Brain – How do you use it in your car? Heather Mp3Car Blog Talk 3 09-23-2008 10:00 PM
How to add a Fusion Brain instance to your configuration file 2k1Toaster FB Documentation and Tutorials 0 06-07-2008 09:42 AM
Noob has some biginner questions about the Fusion Brain phreaknes Fusion Brain 14 04-29-2008 03:57 AM



All times are GMT -5. The time now is 08:48 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics