|
 |
|
05-26-2009, 10:10 PM
|
#46
|
|
High Voltage
Join Date: Jul 2005
Location: Motorcity
Posts: 1,966
|
What about programming this in PERL?
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
05-26-2009, 10:36 PM
|
#47
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
Quote: Originally Posted by blk02si 
What about programming this in PERL?
Perl is more of a scripting language. I'm sure it's possible using some hacky stuff like perl compilers. But other than that, it's pretty much in the same boat as PHP. Maybe someone knows something I don't on this though...
For the fusion brain, you need a program to sit and constantly monitor it for any changes and send it any commands.
If you look, theres already a program here: http://www.mp3car.com/vbulletin/fusi...ram-linux.html
Which is written in C++. It has a gui made in QT4, but if you just use some of the C++ source code, I'm sure you can get it running as a command line application. Modifying that would probably be the easiest way of going about this as the hardware communication code is already there for you.
|
|
|
05-27-2009, 08:07 AM
|
#48
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
First let me apologize if I am repeating myself. I'm a new poster and every post seems to be moderated - I have no idea how long this continues. As such my posts show up late but before other posts so I suspect they are missed.
Perl, python and php and perfectly fine for this sort of thing - don't get fooled by the word "scripting". I think the differentiators are really third party libraries that support your goals, and all 3 will have lots of them, and your familiarity with them. They all support object oriented programming so you can write perfectly good maintainable code in them (and crap too just like most other languages). They are all cross platform so the work could be ported to windows. Their resource use is pretty low - low enough to be used on cell phones even. They also are capable of being used to develop very large and complex web sites as well.
Java has it's place too, but like PaulF I don't recommend it here personally - mainly because of it's relatively high resource use and memory footprint and for the fact that it *isn't* an interpreted language. But there is no reason you couldn't use it here for this too - especially if that's what you are more familiar with.
Specifically addressing the fusion brain, Kev has already written a dbus daemon and all 3 of these languages have dbus bindings so the problem is already solved - use your language of choice.
I have ordered a sheevaplug and a fusion brain and hope to be able to contribute to this soon myself.
charles
|
|
|
05-27-2009, 08:42 AM
|
#49
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Quote: Originally Posted by cgalpin 
First let me apologize if I am repeating myself. I'm a new poster and every post seems to be moderated - I have no idea how long this continues. As such my posts show up late but before other posts so I suspect they are missed.
Only a couple more posts before you are out of moderation hell. It's a spam thing and it has worked very well for us. Sorry it makes new posts a pain.
Quote:
I have ordered a sheevaplug and a fusion brain and hope to be able to contribute to this soon myself.
Great! I obviously have tons and tons to learn but this will go much faster with some help! Unfortunately, my Sheeva took a good month to arrive because they were back-ordered. Maybe they've caught up and yours will arrive faster.
Okay, I understand that Java isn't an ideal language to run on the plug - it is memory and speed limited. One reason I was asking was that a friend of mine has written a java interface that controls the XM Direct and I was wondering if that would work in this case. I presume there is a Linux solution I probably haven't noticed in the past?
|
|
|
05-27-2009, 08:53 AM
|
#50
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Adding packages?
Two questions and yes, I know they are serious n00b questions. I'm going to look for a couple of good books on Linux and php/perl real soon.
1. I was browsing through the plug computing forum last night and there was a post on how someone added a wireless USB dongle to it. That looked pretty cool to me, so I thought I'd see what it took to do it.
The first thing you have to do is add two packages: eeprom93_Cx6 and rtl8187
How do you do this? Using apt-get install [location of the packages]?
Or do you download them first (apt-source?) and then have to make them?
2. How do you add something when it requires a compile for the ARM processor? Say for example, I want to take kev000's Fusion Brain daemon and recompile it for the Sheeva. I have already located and added a gcc compiler for the Sheeva. So, I download his source to a location the Sheeva can access, then use the gcc to compile it and then...what? How would I add it to the distro that the Sheeva is running? By using the apt-install command?
|
|
|
05-27-2009, 09:34 AM
|
#51
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Whoohoo, I think I'm out of moderation hell already!
Regarding XM Direct I'd need to do some googling. Years ago I used to use an XMPCR on linux just fine. I Still have the device and plan to re-use it for my carputer, but I have no idea if this is the same (or if they even support it)
Quote: Originally Posted by Bugbyte 
Two questions and yes, I know they are serious n00b questions. I'm going to look for a couple of good books on Linux and php/perl real soon.
First let me recommend setting up another computer (or virtual machine) running ubuntu for testing. Besides a graphical interface which can sometimes help when trying to figure out new stuff, you'll get the x86 experience and have a comparison point for things like this. It will at least let you know if snags you are running into are architecture specific or, just linux in general.
Quote: Originally Posted by Bugbyte 
1. I was browsing through the plug computing forum last night and there was a post on how someone added a wireless USB dongle to it. That looked pretty cool to me, so I thought I'd see what it took to do it.
The first thing you have to do is add two packages: eeprom93_Cx6 and rtl8187
How do you do this? Using apt-get install [location of the packages]?
Or do you download them first (apt-source?) and then have to make them?
In this case these are kernel modules, not packages so they need to be compiled for your kernel version. First check if they are already there on your system - one way would be to search for the shared libraries, for example
sudo updatedb
sudo locate eeprom_93cx6
If you have it, you'll get matches under /lib/modules/`uname -r`/kernel/drivers/misc in this case
If not, you need to compile them for your kernel. There should be lots of tutorials on the web for this - it can be a bit daunting at first, but totally doable. In general you don't need to recompile the kernel itself, just the modules, so you need the kernel headers (there should be a package for this).
Once you have the module, if it's not automatically loaded for you by udev, then you can load it with 'modprobe module_name'.
And this is where we can definitely benefit from each other's work. We should be able to add all the goodies to a kernel that would be needed for a carputer and share them with each other.
Quote: Originally Posted by Bugbyte 
2. How do you add something when it requires a compile for the ARM processor? Say for example, I want to take kev000's Fusion Brain daemon and recompile it for the Sheeva. I have already located and added a gcc compiler for the Sheeva. So, I download his source to a location the Sheeva can access, then use the gcc to compile it and then...what? How would I add it to the distro that the Sheeva is running? By using the apt-install command?
You would get the source files and compile them - either on the sheeva itself, or using a cross compiler. Once compiled you will either have the binaries which can be installed directly (usually with 'make install') or you build packages and then install them using dpkg/apt.
Except for being slow and needing more disk space, compiling on the sheeva should be fine, although I think setting up a cross compiling environment might be worth it. Have haven't done this in a very long time, but I think it should be relatively easy.
Again, this is where we can hep each other. If we package these up as packages then we can share them and simply install them using dpkg/apt. Not only is this easier for anyone not doing the building, but it's also easier to maintain on your sheeva.
Looks like you are making good progress though - I sure hope my shiva doesn't take forever!
hth
charles
|
|
|
05-27-2009, 01:41 PM
|
#52
|
|
FLAC
Join Date: May 2006
Location: Calgary, Alberta
Posts: 1,541
|
Quote: Originally Posted by Bugbyte 
The first thing you have to do is add two packages: eeprom93_Cx6 and rtl8187
How do you do this? Using apt-get install [location of the packages]?
Or do you download them first (apt-source?) and then have to make them?
2. How do you add something when it requires a compile for the ARM processor? Say for example, I want to take kev000's Fusion Brain daemon and recompile it for the Sheeva. I have already located and added a gcc compiler for the Sheeva. So, I download his source to a location the Sheeva can access, then use the gcc to compile it and then...what? How would I add it to the distro that the Sheeva is running? By using the apt-install command?
1. Executable files in Linux, or at least the Debian spinoffs, are *.deb packages. Ubuntu is a more user friendly version of Debian and uses the same packages so if you can find them on any sort of apt-get source method, then that will work. If you know where they're located, you can actually go into the sources list and add that location (if you trust it) and it'll automatically download updates for you whenever you update. What's more likely the case is that they're custom packages and you have to download them from a specific website. If this is the case, they're likely not packaged into a .deb file and you have to make/install them yourself. This simply requires a "sudo apt-get update" to get the newest updates and packages, then get the make and install packages if you don't already have them. I did it once a long time ago, can't remember...maybe "sudo apt-get install make"? Can't remember, sorry, you might already have them. Then whenever the make fails because it complains about a missing library, just install the library and try the make again.
2. Pretty much the same as above, but a bit more detail about the make process.....save your downloaded package somewhere like it sounds you have. Then CD into the directory and run "./configure" or it might have a capital C, just check and see what the filename in there is. This will configure the package, then run "make" as a normal use as it will print on the screen for you to do. Then run "sudo make install" and it'll automatically install the application for you and you can run it by simply typing the application name from the command line and hitting enter.
__________________
Ampie Case
2.5" Hard Drive 80GB Samsung 5400RPM
256 MB DDR2 PC5400
Xenarc 700TSV - VGA Monitor
Intel D945GCLF Motherboard
M2-ATX-HV
2005 Honda Civic
|
|
|
05-27-2009, 01:49 PM
|
#53
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
I sent a long reply earlier but it's not showing up so I'm not sure what happened to it. Usually when moderated I can see that I at least posted - I think I might not have hit send or something. I won't redo it until later to save typing in case it shows up.
I just wanted to post to see if I could, but also mention that in this case because of the arm cpu they may not have any repos setup or if they do, they may not have all the same things you normally can get since there are less people compiling for the arm. But if not we can create our own and put whatever we need there (share the effort of building all this stuff).
Bugbyte, if you can post the contents of /etc/apt/sources.list we'll have a better idea of what your apt config looks like. There are likely additional config files under /etc/apt/apt.conf.d as well
hth
charles
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
05-27-2009, 02:02 PM
|
#54
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Ok looks like I didn't send my post earlier. I'll try keep it brief this time - please ask if I have glossed over stuff here
Quote: Originally Posted by Bugbyte 
Two questions and yes, I know they are serious n00b questions. I'm going to look for a couple of good books on Linux and php/perl real soon.
1. I was browsing through the plug computing forum last night and there was a post on how someone added a wireless USB dongle to it. That looked pretty cool to me, so I thought I'd see what it took to do it.
The first thing you have to do is add two packages: eeprom93_Cx6 and rtl8187
How do you do this? Using apt-get install [location of the packages]?
Or do you download them first (apt-source?) and then have to make them?
In this case these are kernel modules which are different. You shouldn't have to recompile the whole kernel but you will need the kernel headers (usually can be installed as a package using 'sudo apt-get install linux-headers-$(uname -r)') and then you need the module source. You'd compile the modules (the exact gcc arguments needed will vary per module) and install them. Then you'd load them with 'modprobe module_name' if they don't automatically get loaded by udev when you plug in the device.
But first check if you have the modules. A quick way is to search for the shared library - something like
sudo updatedb
sudo locate eeprom_93cx6
In this case if you had it, you'd get a result like
/lib/modules/$(uname -r)/kernel/drivers/misc/eeprom_93cx6.ko
You might have to recompile the whole kernel but it's not as daunting as it sounds. There should be lots of howtos out there on this though.
Quote: Originally Posted by Bugbyte 
2. How do you add something when it requires a compile for the ARM processor? Say for example, I want to take kev000's Fusion Brain daemon and recompile it for the Sheeva. I have already located and added a gcc compiler for the Sheeva. So, I download his source to a location the Sheeva can access, then use the gcc to compile it and then...what? How would I add it to the distro that the Sheeva is running? By using the apt-install command?
You compile then install in a sequence that is usually something like
./configure
make
sudo make install
You could do the compilation with a cross compiler but the sheeva should be fast enough to do it onboard.
But you can also build packages which you can then install (a bit easier to manage this way) but more importantly put up on a repo and share with others.
Oh and on the XM I am not sure. Years ago I used a XMPCR on linux just fine. I haven't had the service for a while but plan to re-activate it for the carputer if its still supported. No idea if xm direct is anything like it though
charles
|
|
|
05-27-2009, 02:03 PM
|
#55
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Ok it looks like something I am typing in is causing those messages to require moderation. Expect 2 rather long response from me at some point, sorry
|
|
|
05-27-2009, 02:22 PM
|
#56
|
|
FLAC
Join Date: May 2006
Location: Calgary, Alberta
Posts: 1,541
|
Quote: Originally Posted by cgalpin 
Ok it looks like something I am typing in is causing those messages to require moderation. Expect 2 rather long response from me at some point, sorry 
Maybe they contain links.
__________________
Ampie Case
2.5" Hard Drive 80GB Samsung 5400RPM
256 MB DDR2 PC5400
Xenarc 700TSV - VGA Monitor
Intel D945GCLF Motherboard
M2-ATX-HV
2005 Honda Civic
|
|
|
05-27-2009, 02:45 PM
|
#57
|
|
Variable Bitrate
Join Date: Jun 2008
Location: Seattle, WA
Posts: 231
|
Quote: Originally Posted by Bugbyte 
Two questions and yes, I know they are serious n00b questions. I'm going to look for a couple of good books on Linux and php/perl real soon.
1. I was browsing through the plug computing forum last night and there was a post on how someone added a wireless USB dongle to it. That looked pretty cool to me, so I thought I'd see what it took to do it.
The first thing you have to do is add two packages: eeprom93_Cx6 and rtl8187
How do you do this? Using apt-get install [location of the packages]?
Or do you download them first (apt-source?) and then have to make them?
Those are kernel modules, not packages. They will be automatically loaded when you plug in the USB wi-fi dongle, if that dongle is supported by Linux. You say it comes with Ubuntu 9.04 preinstalled. Hopefully they included all of the kernel modules, and didn't trim it down to save space.
I have two USB wi-fi adapters (that of course work with Linux):
http://www.hawkingtech.com/products/...=33&ProdID=302
Works great, good range, removable antenna, so you can use a bigger antenna, or an antenna mounted remotely.
But this is the one I use in my car:
http://www.data-alliance.net/-strse-...wer/Detail.bok
500mw transmitter, which is 20 times more powerful than the average wi-fi adapter, and this high-gain antenna mounted on the roof:
http://www.data-alliance.net/Detail.bok?no=25
Does an excellent job of picking up unsecured hotspots while on the road.
As for the comments about not using Java, I say if that's what you're most familiar with, and it does what you want, go ahead and use it. Blackberry cell phones are completely Java based. All of the built-in apps, and all third party apps, are written in Java.
-- Kevin
|
|
|
05-27-2009, 03:03 PM
|
#58
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Looks like my last long reply got accepted. Wish I knew what triggered the moderation though.
Sweet info on the wireless adapters Kevin, thanks. Are you running anything to automatically connect to available unsecured hotspots, and if so, what?
I agree java would work fine. I'd say more importantly we should be thinking long term about where we want this to go and that means thinking about things like frameworks and what tools technologies will attract the largest developer base.
|
|
|
05-27-2009, 06:16 PM
|
#59
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
apt-get can install kernel modules if they are deb packages.
A deb package is basically a zip file which gets unzipped to the root of the drive.
So say I made a package which contained a file called bob.sh and I wanted it to end up in /etc/bobapp/bob.sh
In the package I would put it in etc/bobapp/bob.sh
And it would extract there.
When you are using a "stock" kernel, you don't need to compile kerenl modules since someone has already compiled them against that kernel. If you are using a custom kernel, you need to compile the kernel module. In this case, you shouldn't need to do any compiling.
apt-get is a package management system. It is not a package installer itself. What it does is call dpkg to install the packages. It just manages what packages are where and what they depend on. Therefore, when using it you do apt-get install packagename, NOT apt-get install packagepath.
If you download a package some other way and want to install it, I believe the command is dpkg -i packagepath, but the switch might not be i. I haven't used a debian-based distro in a while. I forgot what the command is, but you can easily add sources to apt-get to allow it to look more places for packages and their dependencies. Just make sure that the different sources are compatible with each other or else you'll be stuck with dependency mismatches which are a pain.
apt-get install eeprom93_Cx6 should take care of it.
To install a program from source is pretty simple too.
Assuming it was designed to be compiled and installed it's as simple as going to the folder, running ./configure, then running make, then running make install.
If you read his post here: http://www.mp3car.com/vbulletin/1315226-post12.html
It tells you what you need to do.
|
|
|
05-27-2009, 10:34 PM
|
#60
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Quote: Originally Posted by cgalpin 
this stuff).
Bugbyte, if you can post the contents of /etc/apt/sources.list we'll have a better idea of what your apt config looks like. There are likely additional config files under /etc/apt/apt.conf.d as well
In sources.list there is only one:
deb http://ports.ubuntu.com jaunty main restricted universe multiverse There are three files in /etc/apt/apt.conf.d: 01autoremove 01ubuntu 05aptitude 70debconf
Quote:
But first check if you have the modules. A quick way is to search for the shared library - something like
sudo updatedb
sudo locate eeprom_93cx6
In this case if you had it, you'd get a result like
/lib/modules/$(uname -r)/kernel/drivers/misc/eeprom_93cx6.ko
locate is an unknown command for my system. However, I found out how to use apt-get search [filename] and looked for eeprom_93cx6. But I'm confused. apt searches the repository -or it searches my computer?
Edit: Nevermind. It turns out I had to install mlocate. I did that and updatedb worked, then I was able to search for it:
/etc/updatedb.conf
/etc/alternatives/updatedb
/usr/bin/updatedb
/usr/bin/updatedb.mlocate
/usr/share/man/man5/updatedb.conf.5.gz
/usr/share/man/man8/updatedb.8.gz Searching for eeprom_93cx6 returned nothing, however but I think that is what apt-get search does for me, yes?
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:27 AM.
| |