|
 |
|
05-19-2009, 11:18 AM
|
#1
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Linux help needed - make fun of the N00b
In my search for solutions to replace my car PC with my iPhone, I'm in need of some Linux assistance.
One of the issues with the iPhone is that you can't easily interact with external devices -particularly USB devices such as Fusion Brain, OBDII, XM Direct.
However, the iPhone can easily connect to a WiFi router and theoretically, if you have some type of device (usually a full blown computer), you can control these devices via a javascript web page if a server is running on the computer.
I didn't want to use a full computer but I do have to 'cheat' a little, so I decided to use a Sheeva plug - an embedded Linux system that has a USB port, an ethernet port and an SDIO port.
It arrived yesterday along with lots of really cryptic information about how to make it boot and stuff. I wondered, however, whether it might not already have the basic Debian Linux burned in the flash memory (512mb) already, so I don't have to load it up.
I tried pinging it and it responded.
Then I tried to telnet into it but the connection was refused.
What is the best way to 'see' inside this system? It is entirely possible that I have to build and load a distro for it -which I can painfully figure out. I just want to make sure one isn't already on there.
I'm just a little lost here and need some guidance forward. Once I get it running Linux (maybe Linux ICE?), I'll need advice on what I need to do to get a web server up and running (Apache? Is there one already built into Linux? Feel free to taunt me). After that, I'll look at communicating with some USB devices like the Fusion Brain or the OBDII ELM cables.
P.S. - While I'm using a Mac, I do have VM Ware so I can set up a Linux virtual machine to talk to the plug. It also comes with a Windows Host package that lets you connect to the JTAG port and diagnose the computer.
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
05-19-2009, 12:36 PM
|
#2
|
|
FLAC
Join Date: May 2006
Location: Calgary, Alberta
Posts: 1,541
|
I've set up a few Apache servers on Debian at home before so I might be able to help with this. If the device is already set up with Debian then it hopefully already has the necessary packages on it but possible not. Hopefully it at least has SSH so if you have it hooked to a router, you can log onto the router and get the local IP of the device. Then you can open a terminal in another computer connected on the same router (does the iPhone do SSH?) and just log onto it by running "SSH xxx.xxx.xxx.xxx". The local IP will probably be something like 10.0.0.2.
Once you've done that, you can run any updates you want from there and install Apache. The commands to install something in Debian is "sudo apt-get install XXXXX" for whichever package you want so you can run "sudo apt-get install apache2" and then "sudo apt-get install php5" or you can install them all at once like "sudo apt-get install apache2 php5 mysql" and let it go. The problem here is you'll need the root (sudo) password for the device which is only specified when Linux is first installed. But if you can log onto the device and access its files, I'll tell you how to hack it to change the password.
If there isn't already a version of Linux on it, you might want to look at Damn Small Linux or Puppy Linux, they're both built to run on less than 100 megs of RAM and take up very little disk space.
Good luck.
__________________
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-19-2009, 03:04 PM
|
#3
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Thanks! The internal IP on the router is 192.168.1.11.
It asked me for a password when I did SSH. That seems to indicate to me that it already has the OS loaded on it. I need to root through the docs for the release to find out what that password might be.
|
|
|
05-19-2009, 03:32 PM
|
#4
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Okay, I found out from the wiki here that is comes with Ubuntu 9.04 already installed.
Edit: BAM! I'm in! I ssh'd into it as root. The wiki gave the password.
It appears to run the Jaunty Jackelope -some variant of Ubuntu. I'm editing a couple of scripts and fixing a few bugs they advise to fix in the system, and also updating the distro.
Okay....now what? :-)
|
|
|
05-19-2009, 03:42 PM
|
#6
|
|
Variable Bitrate
Join Date: Mar 2009
Location: Kristiansand, Norway
Posts: 284
|
thought these things had web gui to do everything with.
even upload new files and such alike.
|
|
|
05-19-2009, 04:15 PM
|
#7
|
|
FLAC
Join Date: May 2006
Location: Calgary, Alberta
Posts: 1,541
|
Quote: Originally Posted by Bugbyte 
Okay, I found out from the wiki here that is comes with Ubuntu 9.04 already installed.
Edit: BAM! I'm in! I ssh'd into it as root. The wiki gave the password.
It appears to run the Jaunty Jackelope -some variant of Ubuntu. I'm editing a couple of scripts and fixing a few bugs they advise to fix in the system, and also updating the distro.
Okay....now what? :-)
Jaunty Jackalope is the name of the distribution:
7.04 = Feisty Fawn
7.10 = Gutsy Gibbon
8.04 = Hardy Heron
8.10 = Intrepid Ibex
9.04 = Jaunty Jackalope
9.10 = Karmic Koala (in development)
If I remember correctly the command, run "sudo /etc/init.d/apache2 start" after SSH into it to start Apache. If Apache is not installed it'll give you an error, then follow this guide. If you don't understand it, I can run you through it.
__________________
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-19-2009, 05:53 PM
|
#8
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Very cool. Apache 2 wasn't installed, but I installed it. That was pretty easy. Then I started the web server. Got something that said "could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.x (it's IP address) for server name."
I presume that's because I haven't set up a name for the server yet. Then I logged into the address of the I.P. using http: and got a page that said "IT WORKS!"
Okay, so that means I now have a webserver, php scripting and mySQL running on the plugtop, right?
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
05-19-2009, 06:36 PM
|
#9
|
|
Variable Bitrate
Join Date: Jul 2006
Location: Boston, Ma
Posts: 227
|
awesome to see your plug came in!
sounds like you've got a nice little LAMP [ Linux Apache mysql PHP]there.
a Note: most debian systems are designed [and it's good practice for all *nix distros] to be used as a non root user, this MAY be different on the plug but i doubt it, so you'd ssh in as bugbyte@ip address then when you need to run commands that require root privileges you prefix the command with 'sudo' and then enter your password, example
Code:
sudo touch /root/newfile
would create a new file in the /root/ directory with the permissions of root. I hope I explained that so some of it makes sense
you've tested apache [ i'm pretty sure the "could not reliably determine ..." message is really no big deal for what you're doing but you should be able to fix that easy if you want I think this is the site i used way back]
test to mysql restart mysql:
1)
Code:
sudo /etc/init.d/mysql restart
if it restarts you're good!
if not make sure it actually installed
might want to make sure you have a password set for the root user in mysql [not that you'll have too attacks on the "iBugPlug"]
test php:
umm i'm not great at php but if you create a test.php file
Code:
sudo nano -w /var/www/htdocs/test.php
inside of it add
PHP Code:
< ?php phpinfo() ?>
then save it [ctrl+o ctrl+x] then open up your webbrowser and browse over to your plug http://192.168.1.11/test.php if a page with a bunch of text about php comes up you're all set on php!
next I'd say plug in one of your usb devices and see if it's recognized!
1) ssh in run
Code:
tail -f /var/log/messages
2) plug in device
3) look at output
4) check dmesg
or
as dmesg can output a LOT
if it's recognized then it's time to find some applications or hack away to make it do what you want!
if it's not then it's time to figure out why, odds are you'll need to add support into the kernel. [which is not as scary as a) it sounds b) some people make it out to be]
good luck!
__________________
Carputer Status:MobileOne: retired - via - Gentoo Linux, gps drive, nGhost, tethered e815
MobileTwo: retired - via - Ubuntu Linux, gps drive, nGhost
MobileThree: development - Intel Atom - Gentoo Linux, iGuidance3, navIT, nGhost2 -- worklog--
Last edited by red_parchel; 05-19-2009 at 10:07 PM.
Reason: actually answered the question this time
|
|
|
05-19-2009, 07:06 PM
|
#10
|
|
Maximum Bitrate
Join Date: Mar 2005
Location: Rockledge, FL
Posts: 517
|
have you tried vncing into it?
|
|
|
05-19-2009, 07:12 PM
|
#11
|
|
Variable Bitrate
Join Date: Jul 2006
Location: Boston, Ma
Posts: 227
|
i dont think the plug comes with x11 installed, so you'd first have install x11, then vnc .. but it looks doable
__________________
Carputer Status:MobileOne: retired - via - Gentoo Linux, gps drive, nGhost, tethered e815
MobileTwo: retired - via - Ubuntu Linux, gps drive, nGhost
MobileThree: development - Intel Atom - Gentoo Linux, iGuidance3, navIT, nGhost2 -- worklog--
|
|
|
05-19-2009, 08:03 PM
|
#12
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
I put in an order for one of these guys too. Mine isn't supposed to arrive until early july though. I'm pretty familiar with linux and programming and once I go down that road, I should be able to help you out.
If I were you, I would definitely stick with Ubuntu on it. The Sheeva plug does not have an x86 processor in it. It has an ARM-based processor. Therefore, if anything you put on it needs to be compiled for ARM. There are several operating systems out there designed to run on the sheeva plug. I like FreeBSD much more than linux, so I MIGHT use it instead of Ubuntu. The sheeva is powerful, but I would hate to compile an entire linux distribution on it. It might take days. So ICE as far as I know, is not compiled for the sheeva plug, not even ARM for that matter which leaves it out of the question. Theres a list somewhere with the operating systems that will run on it.
|
|
|
05-19-2009, 08:06 PM
|
#13
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
Woah missed those two posts there. VNC on it is a cool idea, but it seems pointless. What I think would be cool would be to hook up a cheap USB graphics card to that thing and use a screen with it. Sub 200 dollar computer right there with a screen!
|
|
|
05-19-2009, 08:50 PM
|
#14
|
|
Variable Bitrate
Join Date: Jul 2006
Location: Boston, Ma
Posts: 227
|
Quote: Originally Posted by PaulF 
It has an ARM-based processor.
wow I completely ignored that factor.
bugbyte: you talked about this Idea at the Rochester meet, and mentioned using a router in your car to handle the wireless network. Once you've gotten it all working the way you'd like you might consider adding a usb wireless NIC to the sheevaplug and configure the sheevaplug to be the access point, it's not too difficult to do and can eliminate the need for one more device! assuming all your devices work in linux the possibilities are endless. [i'm a bit excited about this project if you can't tell by my large amounts of posts today on this thread]
__________________
Carputer Status:MobileOne: retired - via - Gentoo Linux, gps drive, nGhost, tethered e815
MobileTwo: retired - via - Ubuntu Linux, gps drive, nGhost
MobileThree: development - Intel Atom - Gentoo Linux, iGuidance3, navIT, nGhost2 -- worklog--
Last edited by red_parchel; 05-19-2009 at 10:01 PM.
Reason: thought of something else
|
|
|
05-19-2009, 09:57 PM
|
#15
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
It comes as a devel kit and includes a gcc for the ARM. Not that I know how to USE it, *but* I think you can compile stuff for the ARM if you need to.
Thanks for the pointers, I'll try some of that stuff out and see how it goes!
|
|
|
|
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 07:53 AM.
| |